100% found this document useful (1 vote)
109 views

Module 1 Introduction to Programming

Module 1 Introduction to programming

Uploaded by

Gerald Baculando
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
109 views

Module 1 Introduction to Programming

Module 1 Introduction to programming

Uploaded by

Gerald Baculando
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

MODULE 1: INTRODUCTION TO PROGRAMMING

Lesson 1: Programming Ethics

Learning Objectives:

At the end of this lesson students will be able to


 identify programming ethics and
 understand programming ethics

Lesson Proper

1.1 Programming Ethics

The Association for Computing Machinery (ACM) is the world’s largest educational and
scientific computing society. It has its own Code of Ethics and another set of ethical
principles that were also approved by the IEEE as the standard for teaching and practicing
software engineering. These codes are Code of Ethics and Professional Conduct and the
Software Engineering Code of Ethics and Professional Practice, respectively, and some
of their guidelines are presented below:

From the Code of Ethics and Professional Conduct (ACM):

 Contribute to society and human well-being. Programmers should work to


develop computer systems that can reduce negative consequences to society,
such as threats to safety and health, and that can make everyday activities and
work easier. It is “an obligation to develop to high standards” (Savage)
 Avoid harm to others. Computer systems have an indirect impact on third parties.
They can cause loss of information and resources that might result severely
harmful for users, the general public, or employers. Therefore, software developers
should minimize the risk of harming others due to coding errors, or security issues,
by following standards to design and test systems (Code of Ethics and
Professional Conduct)
 Be honest and trustworthy. This principle encourages programmers to be honest
and aware of their limitations in knowledge and education when writing computer
systems. Also, if a programmer knows there is something wrong with a computer
system, he or she should report it immediately to avoid undesirable consequences.
 Give proper credit for intellectual property. It is mandatory for every software
developer to never use and take credit for someone else’s work, even when it has
not been protected by a copyright law, patent, etc. They must recognize and fully
credit other people’s works, and they should use their own ideas to develop
software.
 Respect the privacy of others. Computer systems are wrongly used by some
people to violate the privacy of others. Software developers should write programs

1
Multiple Income Creating Project (MIC P) on ICT
MODULE 1: INTRODUCTION TO PROGRAMMING

that can protect users’ private information and that can avoid other undesired
people to have unauthorized access to it (Code of Ethics and Professional
Conduct).
 Honor confidentiality. Unless required by law or any other ethical guideline, a
programmer must keep secret any additional information related to his or her
employer that arises from working in a project.

From Software Engineering Code of Ethics and Professional Practice (IEEE, AMC):

 Approve software only if they have a well-founded belief it is safe and meets
specifications. Programmers cannot assume that a system is ready to use only
because it performs the tasks needed. They should make sure these systems are
also safe and meet every specification required by the user. If programs are not
safe, users are unprotected from hackers that could steal important information or
money. Therefore, several tests should be performed in order to ensure a system’s
security before approving it.
 Accept full responsibility for their own work. If a program presents errors, the
software developer should accept full responsibility for his or her work, and should
work on revising, correcting, modifying, and testing it.
 Not knowingly use software that is obtained or retained either illegally or
unethically. If a computer system will be used as a base for the creation of
another, then permission to do so should be asked by the programmer. This
principle prohibits using any other software for any purpose if the way it was gotten
is not clear or is known to be illegal or unethical.
 Identify, define, and address ethical, economic, cultural, legal and
environmental issues related to work projects. If a programmer notices and
identifies that working on a project will lead to any kind of problems, then the
programmer should report it to his or her employer before continuing.
 Ensure that specifications for software on which they work satisfy the users’
requirements and they have the appropriate approvals. Software developers
should come to their employers to ask for the correspondent approval to the
system they are creating before continuing working on the next part. If it doesn’t
meet the requirements, then a modification to the source code of the system
should be made.
 Ensure adequate testing, debugging and review of software. Programmers
should perform the appropriate tests to the pieces of software they work with, and
should check for errors and system security holes to make sure that the programs
are well implemented.
 Not engage in deceptive financial practices such as bribery, double billing,
or other improper financial practices. Programmers are exposed to be
participants on illegal activities to get money. They get involved in them due to
threats, economic issues, or simply because they want to obtain easy money
taking advantage of their knowledge about how computer systems work. This
guideline prohibits programmer to form part of such unlawful actions.

2
Multiple Income Creating Project (MIC P) on ICT
MODULE 1: INTRODUCTION TO PROGRAMMING

 Improve their ability to create safe, reliable, and useful quality software.
Since technology advances faster year by year, and so does virtual criminality, the
need of well-structured and designed programs is increasing. Computer systems
get old and limited by new ones and new devices. Programmers should “further
their knowledge of developments in the analysis, specification, design,
development, maintenance, and testing software and related documents”
(Software Engineering Code of Ethics and Professional Practice) in order to create
better pieces of software.

Activity
 Choose 3 code of ethics mentioned above. For each code of ethics site a
scenario where these are properly applied and where violated. Submit it to your
teacher. This is can be encoded or hand written (then take a photo), upload to
online submission folder assigned by your teacher.

Summary

From the Code of Ethics and Professional Conduct (ACM):

 Contribute to society and human well-being.


 Avoid harm to others.
 Be honest and trustworthy.
 Give proper credit for intellectual property.
 Respect the privacy of others.
 Honor confidentiality.

From Software Engineering Code of Ethics and Professional Practice (IEEE, AMC):

 Approve software only if they have a well-founded belief it is safe and meets
specifications.
 Accept full responsibility for their own work.
 Not knowingly use software that is obtained or retained either illegally or
unethically.
 Identify, define, and address ethical, economic, cultural, legal and environmental
issues related to work projects.
 Ensure that specifications for software on which they work satisfy the users’
requirements and they have the appropriate approvals.
 Ensure adequate testing, debugging and review of software.
 Not engage in deceptive financial practices such as bribery, double billing, or other
improper financial practices.
 Improve their ability to create safe, reliable, and useful quality software.

3
Multiple Income Creating Project (MIC P) on ICT
MODULE 1: INTRODUCTION TO PROGRAMMING

Lesson 2: Software and Programming Life Cycle

Learning Objectives:

At the end of this lesson students will be able to


 identify classification of software
 understand programming life cycle
 apply programming life cycle to real life scenario

Lesson Proper

2.1 Software and Classification of Software

Software refers to any computer program or instructions that cause the hardware to
work.

Classification of Software
 Application Software – is a computer program people use to get their work done.
Example: Word Processors, Spreadsheets
 System Software – is a program needed to keep all the hardware and software
systems running together smoothly.
Example: Operating Systems (Microsoft, Unix), Language Processors

Language Processors – Software that converts computer Languages into


machine readable form. It is a standardized communication technique for expressing
instructions to a computer. Like human languages, each language has its own
syntax/format and grammar.
Interpreter – It is system software that converts the instructions into machine
code line by line.
Compiler – Converts the whole program into machine code at once.

2.2 Computer Programming


The process of developing and implementing various sets of instructions to enable
a computer to do a certain task. These instructions are considered computer programs
and help the computer to operate smoothly. (businessdictionary.com)
Computer Programming is a process that leads from an original formulation of a
computing problem to executable programs. It involves activities such as analysis,
understanding, and generically solving such problems resulting in an algorithm,
verification of requirements of the algorithm including its correctness and its resource
consumption, implementation (commonly referred to as coding) of the algorithm in a
target programming language, testing, debugging, and maintaining the source code,

4
Multiple Income Creating Project (MIC P) on ICT
MODULE 1: INTRODUCTION TO PROGRAMMING

implementation of the build system and management of derived artifacts such as machine
code of computer programs.

A program is a set of commands that instructs a computer to perform a specific


command. Programming then is the process of formulating and organizing these
commands for a computer to understand, perform, and execute.

2.3 Programming Life Cycle


Program Life Cycle is a process by which a programmer follows to obtain a good and
effective program.

5 Steps of Programming Life Cycle


1. Defining the Problem
2. Planning the Solution
3. Coding the Solution
4. Checking the Program
5. Implementation and Feedback

1. Defining the Problem


-answers: “What has to be Done?”
-understand the problem & careful analysis
-know exactly what the program will do before it is written

2. Planning the solution


-select the best method in solving the problem
-make a program flowchart
-select an appropriate programming language

3. Coding the Solution


Convert the steps depicted in the program flowchart into readable instructions that make
up the actual program.

5
Multiple Income Creating Project (MIC P) on ICT
MODULE 1: INTRODUCTION TO PROGRAMMING

4. Checking the Program


Debugging is tracing the program step by step to eliminate big or small errors.
It is the task of finding errors (bugs) and correcting them so that the program runs
correctly.
Testing is running the program with input data.

Types of errors:
Clerical Error – occurs in the coding or data entry process
Logical Error – occurs when the program runs well but the output is erroneous.

5. Implementation and Feedback


The deployment of the system includes changes, enhancements and maintenance.
Once the program begins, feedback from clients begins.

Defining the Planning the


problem solution

Implementation Coding the


and Feedback solution

Checking the
program

Activity
 Think of a real-life scenario where you can apply the concept of programming life
cycle. Submit it to your teacher. This is can be encoded or hand written (then
take a photo), upload to online submission folder assigned by your teacher.

6
Multiple Income Creating Project (MIC P) on ICT
MODULE 1: INTRODUCTION TO PROGRAMMING

Summary
 Software refers to any computer program or instructions that cause the hardware
to work.
 Classification of software: Application and System software
 Language Processors – is part of the system software that converts computer
Languages into machine readable form.
 Steps of Programming Life Cycle
o Defining the Problem
o Planning the Solution
o Coding the Solution
o Checking the Program
o Implementation and Feedback

7
Multiple Income Creating Project (MIC P) on ICT
MODULE 1: INTRODUCTION TO PROGRAMMING

Lesson 3: Algorithm and Flowchart

Learning Objectives
At the end of this lesson students will be able to
 understand programming algorithm
 identify flowcharting symbols and their functions
 learn how to convert mathematical

Lesson Proper

3.1 Algorithm
Algorithm is a finite set of instructions that specify a sequence of operations to be
carried out in order to solve a specific problem or class of problems.
It is called a “recipe for solving problem”.

It can be in a form of
1. Human language (English, Tagalog)
2. Pseudocode - which is a cross between human language and a programming
language. We will do this when we discuss JavaScript programming.
3. Flowchart - A diagram representing the logical sequence in which a combination
of steps or operations is to be performed.

Sample Algorithm for frying an Egg: (using English Language)


1. Prepare the materials and ingredients
2. Beat or scramble the egg first in a bowl then add some seasoning.
3. Heat the pan and pour in some oil to it.
4. Once the oil becomes hot, put the egg to the pan and wait until it’s fried.
5. Serve hot.

Sample Algorithm for Cooking Rice:


1. Clean up the pot
2. Put the rice in it and rinse with water.
3. Add a proportional amount of water
4. Turn on the stove
5. Place the pot into the stove for cooking
6. Wait until the rice becomes tender and ready for eating

8
Multiple Income Creating Project (MIC P) on ICT
MODULE 1: INTRODUCTION TO PROGRAMMING

Sample solution using flowchart


Problem: Create a flowchart that will ask for two numbers. Compute and display the
sum.

3.3 Flowchart
A flowchart is a diagram representing the logical sequence in which a combination of
steps or operations is to be performed. It is a 2-dimensional representation of an
algorithm.

Flowcharting Symbol
1. Terminal Symbol (oval) – used to designate the beginning and the end of a
program.
STAR END

2. Input/Output Symbol (parallelogram) – represents an instruction to an


input/output device.
Input Display Displa
x “GOOD y
” X
3. Processing Symbol (rectangle) – represents a group of program instructions that
perform a processing function of the program.
sum = a + b p=a*b

4. Flow Lines (line) – connects each symbol together.

9
Multiple Income Creating Project (MIC P) on ICT
MODULE 1: INTRODUCTION TO PROGRAMMING

5. Flow Direction Indicators (arrowheads) – used to show the direction of


processing or data flow.

6. Decision Symbol (diamond) – a point in the program where more than one path
can be taken.

Y If N
x=

7. On-Page Connector (small circle) – used to connect one part of a flowchart to


another without drawing flow lines within the same page.

A A

8. Off-Page Connector (small pentagon) – designate entry to or exit from a page


when a flowchart requires more than one page.
B
B

3.4 Operators
There are 3 basic types of operators in programming.

Arithmetic Operator
These are the operators used in performing simple mathematical operations.

* Multiply values of operands a=x*y


/ Divide values of operands a=x/y
+ Adds values of operands a=x+y
- Subtract values of operands a=x-y
% Modulus operator to get the remainder a=b%2
of a division process
() Used for grouping equations / operations

Relational Operator
These are operators used to compare relative values. These are commonly used
in the IF statement and loop statement.

> Greater than x>5


< Less than y<5

10
Multiple Income Creating Project (MIC P) on ICT
MODULE 1: INTRODUCTION TO PROGRAMMING

>= Greater than or equal num1 >= x


<= Less than or equal p <= 10
== Equal L == 2
!= Not Equal r != 2

Logical Operator
These are operators used to show how two or more quantities are connected
together using the rules of logic.

&& AND if(grade >= 90 && grade <= 100)


|| OR x > 2 || x < 10
! NOT if(! (c < 20 ))

Truth Table

AND OR

x y Result X y Result

F F F F F F

F T F F T T

T F F T F T

T T T T T T

3.5 Mathematical Equation to Programming Notation


All math equation must be written in linear form. You need to use available operators
discussed above.

Example:
1. AxC  A*C
2. ab+2y  a*b+2*y
3. X+Y  (X + Y) / Z
Z
4. a2 + b3  a*a+b*b*b

Activity
1. Think of 2 house tasks that you are doing and create an algorithm on how you do
it using human language.

11
Multiple Income Creating Project (MIC P) on ICT
MODULE 1: INTRODUCTION TO PROGRAMMING

2. Convert the following mathematical equation to programming notation:


a. c = a2 + b2

b. a=2L + 2W

c. A= b + c
d

d. X = 2 3 +y
2
e. X = a – bc3

Summary
 Algorithm is a finite set of instructions that specify a sequence of operations to be
carried out in order to solve a specific problem or class of problems. It can be in in
a form of human language, pseudocode, or flowchart.
 There are 3 types of operators that includes Arithmetic, Relational, and Logical.
 Mathematical equation must be written in linear form or programming notation
using programming operators.

12
Multiple Income Creating Project (MIC P) on ICT
MODULE 1: INTRODUCTION TO PROGRAMMING

Lesson 4: Problem solving using flowchart - Sequential

Learning Objectives
At the end of this lesson students will be able to
 identify basic logic structure
 apply Input-Process-Output Model in problem solving
 apply proper mathematical operators
 create problem solution using flowcharts

Lesson Proper

4.1 Basic Logic Structure


Programming is an organization of logical statements or instructions to provide solution.
There are 3 basic logical structure that are being used in programming:
 Sequential - instructions are executed based on its linear sequence.
 Branching - A programming instruction that directs the computer to another part
of the program based on the results of comparison.
 Loop / Iteration - allow you to run one or more set of instructions repetitively.

4.2 Input-Process-Output Model


Before we proceed to creating flowcharts let’s discuss first the IPO Model to guide us in
creating our solution.

Basically, computer programming requires us to define the problem first before we even
try to create a solution. Usually, this step involves breaking up of the problem into
smaller and simpler sub-problems through identifying the INPUT, PROCESS, AND
OUTPUT.

The input–process–output (IPO) model is a widely used approach in systems analysis


and software engineering for describing the structure of an information processing
program or another process. Many introductory programming and systems analysis texts
introduce this as the most basic structure for describing a process.
(https://en.wikipedia.org/wiki/IPO_model)

A computer program or any other sort of process using the input-process-output model
receives inputs from a user or other source, does some computations on the inputs, and
returns the results of the computations. The system divides the work into three categories:

 A requirement from the environment (input)


 A computation based on the requirement (process)
 A provision for the environment (output)

13
Multiple Income Creating Project (MIC P) on ICT
MODULE 1: INTRODUCTION TO PROGRAMMING

For example, a program might be written to convert Fahrenheit temperatures into


Celsius temperatures. Following the IPO model, the program must:

 Ask the user for the Fahrenheit temperature (input)


 Perform a calculation to convert the Fahrenheit temperature into the
corresponding Celsius temperature (process)
 Display the Celsius temperature (output)

Now we are ready to solve problem sets and apply the solution using flowchart.

4.2 Flowcharting - Sequential


Programs are linear in nature. Instructions are executed based on its linear sequence.
Knowing this you must structure your program based on its logical ordering

Sample Problem:
Create a flowchart that will ask for two numbers. Compute and display the sum.

Solution:
 Based on the given problem we will identify the Input, Process and Output
needed.
Input – 2 numbers; let x represent the first number and y represents the second
number
Process – Add the values of x and y then store the result to variable sum;
sum = x + y
Output – display the value of sum

 To create a flowchart, we start with the terminal symbol to start the flowchart
input symbol for the needed input  process symbol for the operation or formula
 display symbol to display the value of sum  terminal symbol with Stop label to
end the flowchart

14
Multiple Income Creating Project (MIC P) on ICT
MODULE 1: INTRODUCTION TO PROGRAMMING

 Final answer

START

Input x, y

sum = x + y

Display sum

END

 Tip: You may write your solution first in a sentence case format to fully
understand the problem and your solution before creating the actual flowchart.

15
Multiple Income Creating Project (MIC P) on ICT
MODULE 1: INTRODUCTION TO PROGRAMMING

Activity

Create a flowchart for each of the problem sets.


1. Create a flowchart that will ask for 5 quizzes grades then compute and display
the average.
2. Create a flowchart that will ask for the radius of a circle then compute and display
the area of the circle.
3. Create a flowchart that will ask for feet value then convert it to equivalent inches
value.
1 ft = 12 in
4. Create a flowchart that will ask for the length and the width of a rectangle then
compute and display the perimeter.
5. ABC Sari-sari Store wants to make their sales transaction be computerized.
Given the following requirements create a flowchart for the new sales
transactions flow.
Input: 5 items prices, discount, cash
Output: Total amount to Pay (less discount amount), change

Summary
 Basic logic structure: sequential, branching, and looping.
 Input–Process–Output (IPO) model is a widely used approach in systems analysis
and software engineering for describing the structure of an information processing
program or another process.
 Computer Programming requires us to define the problem first before we even try
to create a solution. Breaking up a problem into smaller subproblem by identifying
the input, process, and output requirements.

16
Multiple Income Creating Project (MIC P) on ICT
MODULE 1: INTRODUCTION TO PROGRAMMING

Lesson 5: Problem solving using flowchart - Branching

Learning Objectives
At the end of this lesson students will be able to
 apply appropriate control structure to a problem set
 apply Input-Process-Output Model in problem solving
 apply proper mathematical operators
 create problem solution using flowcharts

Lesson Proper

5.1 Branching / Selection


A programming instruction that directs the computer to another part of the program based
on the results of comparison. When an "Algorithm" makes a choice to do one of two (or
more things) this is called branching. This uses conditions to change the flow of the
program. If conditions are met it will execute specified process otherwise it will execute a
different one.

Examples:
 Verifying whether username and password is correct or wrong. If username and
password is correct then you can proceed to your account otherwise it will display
an error message and/or the program will ask you to input again your username
and password.
 In online exam, it can automatically tell you if you pass or fail the exam based on
the given condition or passing score.
 In an elevator, if passengers reached the limit weight it will automatically alarm.
 Discounts for senior citizen and PWD in different stores, if you present an ID or
you qualify as Senior Citizen or PWD you get a discount otherwise you will be
charged with regular price.

Sample Problem 1:
Create a flowchart that will ask for two numbers and display the larger number.

Solution:
 Based on the given problem we will identify the Input, Process and Output
needed.
Input – 2 numbers; let x represent the first number and y represents the second
number
Process – verify/evaluate which is greater; x > y or y > x this may result to either
True or False depending on the given value
Output – display either the value of x or the value of y

17
Multiple Income Creating Project (MIC P) on ICT
MODULE 1: INTRODUCTION TO PROGRAMMING

 To create a flowchart, we start with the terminal symbol to start the flowchart
input symbol for the needed input  instead of process symbol, since we are
comparing values we will use the decision symbol (diamond) then write the
identified condition inside ( if x > y ); this will let us create a path depending on the
possible result (True or False)  we create a path for the True result and False
result  for True result (label with Y for yes), we will use display symbol to
display the value of x as the greater number  for the False result (label with N
for no), we will use display symbol to display the value of y as the greater number
 both path will connect to terminal symbol with Stop label to end the flowchart.

 Final flowchart

START

Input x, y

N
If
x>y Display y

Display x

END

Sample Problem 2:
Create a flowchart that will ask for a number then determine if the number is Positive,
Negative or Zero.

Solution:
 Based on the given problem we will identify the Input, Process and Output
needed.
Input –a numbers; let n represent the number
Process – verify/evaluate if n is positive, negative or zero;
if n > 0 the number is Positive; if n < 0 the number is negative; if n = 0 the
number is Zero
Output – either Positive, Negative, or Zero
 To create a flowchart for this problem we need to consider that we already have
3 possible results.

18
Multiple Income Creating Project (MIC P) on ICT
MODULE 1: INTRODUCTION TO PROGRAMMING

Logic:
if n > 0
for Y path  Display “Positive”  Stop
for N path  we still have 2 options left for Negative or Zero
if n < 0 (you can also choose if n = 0 then apply
correct path)
for Y path  Display “Negative”  Stop
for N path  this path means the number is
not Positive and not Negative meaning the number is Zero, Display “Zero” 
Stop

 Final solution

The results can be rearrange depending on the order of condition. Like you can start
with n < 0 then n = 0.

Activity

Create a flowchart for each of the problem sets.


1. Create a flowchart that will ask for a grade then evaluate and display the grade
status whether “PASSED” or “FAILED”. Since the output is not variable you can
use the sample below. You just need to put double quote if you want to display
word/s as an output.
Display Display
“PASSED” “FAILED”

19
Multiple Income Creating Project (MIC P) on ICT
MODULE 1: INTRODUCTION TO PROGRAMMING

2. Create a flowchart will ask for an age then evaluate the age if it is a qualifying
age to vote or not.
3. Create a flowchart that will ask for two numbers. If the first number is greater
than the second number compute and display the sum otherwise compute and
display the product of the numbers.
4. Create a flowchart that will ask for a number then determine if the number is Odd
or Even number.
5. Create a flowchart that will ask for a grade then display the equivalent remarks
Grade Remarks
100-91 Excellent
90-81 Very Good
80-71 Good
70-51 Fair
50-0 Poor
Out of range Invalid

Summary
 Branching structure is when an "Algorithm" makes a choice to do one of two (or
more things)
 We use decision symbol to apply branching structure.
 We use comparison statement inside decision symbol.
 Decision symbol has Y and N path to take based on the result of the condition.

20
Multiple Income Creating Project (MIC P) on ICT
MODULE 1: INTRODUCTION TO PROGRAMMING

Lesson 6: Problem solving using flowchart - Looping

Learning Objectives
At the end of this lesson students will be able to
 apply appropriate control structure to a problem set
 apply Input-Process-Output Model in problem solving
 apply proper mathematical operators
 create problem solution using flowcharts

Lesson Proper
6.1 Loop / Iteration
In cases that certain instructions or processes are repeated the programming language
has a way through that by making use of loops. Loops allow you to run one or more set
of instructions repetitively.

Sample Problem
Create a flowchart that will display numbers form 1 - 10.

Solution:
 Based on the given problem we will identify the Input, Process and Output
needed.
Input – no input needed instead we will define a variable that will represent the
number to be displayed. Let c represent numbers 1 to 10 and will start to 1, c = 1
Process – counting numbers 1 - 10
Output – display numbers from 1 to 10

 To created a flowchart, we start with a terminal symbol with Start label  process
symbol to define the value of c, c = 1
 we set up a series of processes that will be executed again and again
until we achieve our goal, in this case we will have a decision symbol to check if
the value of c in the range of 1 to 10 since c will represent numbers 1 to 10
if c <= (less than or equal) 10, our goal is for our c to reach 10
for Y path  Display c, since we want to display numbers 1-
10  process symbol to add 1 to c, c = c + 1 (this will
increase the value of c by 1  then go back to decision
symbol if c <= 10  repeat process
for N path  this path means the value of c exceeds to 10
already and this ends the flowchart

21
Multiple Income Creating Project (MIC P) on ICT
MODULE 1: INTRODUCTION TO PROGRAMMING

 Final solution

START

c=1

Y
If
c <= 10 Display c c=c+1

END

 In looping problems, we really need to know the requirements needed and


identify processes that will be repeated multiple times.

Activity
Create a flowchart for each of the problem sets.
1. Create a flowchart that will display the numbers from 1-20.
2. Create a flowchart that will display the numbers from 20-1.
3. Create a flowchart that will ask for 10 numbers then compute and display the
sum and average of the inputted numbers.
4. Create a flowchart that will ask for numbers until a negative number is inputted.
5. Create a flowchart that will ask for N number then display the numbers from 1 to
N.
6. Create a flowchart that will ask for 20 numbers then count the Positive, negative
and zero inputted values.

Summary
 Loops allow you to run one or more set of instructions repetitively.
 We use decision symbol to go back to a path already executed.
 In looping problems, we really need to know the requirements needed and
identify processes that will be repeated multiple times.

22
Multiple Income Creating Project (MIC P) on ICT

You might also like