0% found this document useful (0 votes)
127 views7 pages

DCIT22-Computer Programming 1 - Learning Module 1

The document provides information about Cavite State University's Silang campus, including its vision, mission, and campus goals. The vision is to be a premier university in Cavite recognized for developing globally competitive and morally upright individuals. The mission is to provide excellent educational opportunities to produce professional, skilled, and morally upright individuals. The campus goals are to develop highly competent students and faculty, provide quality education and research, and respond to community needs.

Uploaded by

Mr. Epiphany
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
127 views7 pages

DCIT22-Computer Programming 1 - Learning Module 1

The document provides information about Cavite State University's Silang campus, including its vision, mission, and campus goals. The vision is to be a premier university in Cavite recognized for developing globally competitive and morally upright individuals. The mission is to provide excellent educational opportunities to produce professional, skilled, and morally upright individuals. The campus goals are to develop highly competent students and faculty, provide quality education and research, and respond to community needs.

Uploaded by

Mr. Epiphany
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 7

Cavite State University

Silang Campus

DCIT22-Computer Programming I Learning Module 1


CvSU Vision

The premier university in historic Cavite recognized


for excellence in the development of globally competitive
and morally upright individuals.

CvSU Mission

Cavite State University shall provide excellent, equitable and relevant


educational opportunities in the arts, science and technology through quality
instruction and relevant research and development activities.
It shall produce professional, skilled and morally upright individuals for
global competitiveness.

Campus Goals

Develop a highly competent human resource by ensuring an enriching


environment to promote professional growth, career advancement for faculty,
staff and students. Provide quality instruction and develop-oriented researches
in cooperation with various institution for the benefit of the community. Respond
effectively to the needs, demands and requirements of the community to
demonstrate the University’s mission of relevance and leadership.
Institutionalize quality assurance policies to keep abreast with national and
international standards of excellence to realize competitiveness in the campus’
products and services.

DCIT22-Computer Programming I Learning Module 2


MODULE I

MODULE I. INTRODUCTION TO
ALGORITHMS,PSEUDOCODE
& FLOWCHART

Learning Objectives:

 Define the terms algorithm, flowchart and pseudocode


 Identify the different symbols used in flowchart
 Comparison of Pseudocode and flowchart
 To apply Pseudocode or flowchart on the given problem.

What is Algorithm?
 A sequence of instructions.
 A step-by-step procedure to solve a given problem.
 A procedure or formula for solving a problem.
 It was created mathematician, Mohammed ibn-Musa al-Khwarizmi.
 Often used for calculation, data processing and programming.
 Algorithms can be expressed in any language.

Algorithms for making things will often be divided into sections;


 the parts/components/ingredients (inputs) required to accomplish the task
 actions/steps/methods (processing) to produce the
 required outcome (output)

A recipe in a cookbook is an example of an algorithm.


The recipe includes the requirements for the cooking or ingredients and the
method of cooking them until you end up with a nice cooked dish.

DCIT22-Computer Programming I Learning Module 3


MODULE I
Flowchart

-Flowchart is a diagram made up of boxes, diamonds


and other shapes,connected by arrows - each shape
represents a steps in the process, and
the arrows show the order in which they occur.

General Rules for Flow charting


1. All boxes of the flowchart are connected with Arrows. (Not lines)
2. Flowchart symbols have an entry point on the top of the symbol with no other
entry points. The exit point for all flowchart symbols is on the bottom except for
the Decision symbol.
3. The Decision symbol has two exit points; these can be on the sides or the bottom
and one side.

DCIT22-Computer Programming I Learning Module 4


MODULE I
General Rules for Flow charting (continued)

4.Generally a flowchart will flow from top to bottom. However, an upward flow
can be shown as long as it does not exceed 3 symbols.
5. Connectors are used to connect breaks in the flowchart. Examples are:
• From one page to another page.
• From the bottom of the page to the top of the same page.
• An upward flow of more then 3 symbols
6. Subroutines and Interrupt programs have their own and independent flowcharts.
7. All flow charts start with a Terminal or Predefined Process (for interrupt
programs or subroutines) symbol.
8. All flowcharts end with a terminal or a contentious loop.

Pseudocode

 Pseudocode is a type of structured English that is used to specify an algorithm.


 Pseudocode cannot be compiled nor executed,and there are no
real formatting or syntax rules..

How to write Pseudocode?

 A computer can receive information


Ex:Read (information from a file)
Get (information from the keyboard)
 A computer can put out information
Ex:Write (information to a file)
Display (information to the screen)

DCIT22-Computer Programming I Learning Module 5


MODULE I
 A computer can perform arithmetic.
Use actual mathematical symbols or the words
for the symbols
Ex:Add number to total
Total = total + number
Calculate, Compute also used
 A computer can assign a value to a piece of data
i. to give data an initial value
Ex: Initialize, Set
ii. to assign a value as a result of some processing“=‟
Ex:x=5+y
iii.to keep a piece of information for later use
Ex:Save, Store
 A computer can compare two piece of information
and select one of two alternative actions
IF condition THEN
some action
ELSE
alternative action
ENDIF
 A computer can repeat a group of actions
WHILE condition (is true)
some action
ENDWHILE

FOR a number of times


some action
ENDFOR

DCIT22-Computer Programming I Learning Module 6


MODULE I
Example

Problem:Input two numbers x and y

then Display the average

of x and y.

Algorithm(Pseudocode):

Steps:

Step 1. input x

Step 2. input y

Step 3. sum = x + y

Step 4. average = sum /2

Step 5. Output average

Algorithm(Flowchart)

DCIT22-Computer Programming I Learning Module 7

You might also like