0% found this document useful (0 votes)
425 views9 pages

Algorithm and Flowcharts

This document discusses algorithms and flowcharts. It defines an algorithm as a set of steps to solve a problem and notes that computers use algorithms to solve logical and mathematical problems. It introduces flowcharts as a pictorial way to represent algorithms using standard shapes linked by arrows to show the sequence and flow. Specific shapes are used to denote actions, inputs/outputs, conditions, and starts/stops. The document provides examples of algorithms and their representation in flowcharts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
425 views9 pages

Algorithm and Flowcharts

This document discusses algorithms and flowcharts. It defines an algorithm as a set of steps to solve a problem and notes that computers use algorithms to solve logical and mathematical problems. It introduces flowcharts as a pictorial way to represent algorithms using standard shapes linked by arrows to show the sequence and flow. Specific shapes are used to denote actions, inputs/outputs, conditions, and starts/stops. The document provides examples of algorithms and their representation in flowcharts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

5.

Algorithm and Flowcharts


LEARNING OBJECTIVES

 Algorithm
 flowcharts

ALGORITHM
Every day you do certain things that require certain steps to be performed in order to get the
result that you want.
For example, when you get dressed for school, you have to follow these steps:
 take a bath
 take out uniform
 change into your school uniform
 put on your socks
 polish your school shoes
 put on your school shoes
 comb your hair
After following these steps, you will be ready to go to school. Similarly, when you want to
perform a certain task on the computer, you have to follow certain steps and apply a certain
method to achieve the result.
This process of applying steps to solve a problem or perform an action is called an
ALGORITHM. Computers use algorithms to solve logical or mathematical problems. An
algorithm is always written in simple and precise language so that anyone can understand it.
You can write an algorithm on paper using a pen or a pencil; it does not necessarily have to be
done on the computer.

1
FLOWCHART
The different steps of an algorithm are represented in a FLOWCHART. A flowchart is pictorial
representation of an algorithm and displays each step sequentially using shapes to represent
an activity and arrows to indicate the sequence of actions.
The oval shape represents the START or END of a flowchart.
The parallelogram shape represents INPUT or OUTPUT in a flowchart.
The rectangle shape represents the INSTRUCTION being carried out.
The algorithm of how to get ready for school can be represented in a flowchart.

CHECK YOUR PROGRESS

Write an algorithm and draw a flowchart for packing your lunch.

CONDITIONAL
The algorithm being used to solve a problem might change depending on the result of a
certain condition. These are called conditional algorithms. These algorithms provide two or
more possible outcomes. The results of these conditions may also require a certain step to be
repeated. These are called ITERATIONS or LOOPS.

2
For example: Algorithm to fill a glass of water.
Step 1: Place glass below tap
Step 2: Open tap
Step 3: Is glass full? If not then go back to Step 2. If yes then go to Step 4
Step 4: Close tap.

In flowcharts, the diamond shape represents the CONDITION used in the process. Only
one arrow can enter this shape, all other arrows have to come out of it from its corners.

This algorithm can be represented in a flowchart.

You can use flowcharts and algorithms to solve mathematical problems too.
For example: Algorithm and flowchart to find which number is greater.
Step 1: Read A and B
Step 2: Is A>B. if yes, then go to Step 3. If not then go to
Step 4.
Step 3: A is greater.
Step 4: B is greater.
Step 5: stop.

3
SNAP RECAP

 This process of applying steps to solve a problem or perform an action is called an


algorithm
 A flowchart is pictorial representation of an algorithm.
 Computers use algorithms to solve logical or mathematical problems.
 Conditional statements may arise in iterations.
 Flowcharts display each action sequentially.

4
A. Tick the correct option.
1. Computers use algorithms to solve logical or _______ problems.
a. mathematical b. economic c. scientific
2. The rectangle shape represents the ________being carried out.
a. Questions b. problems c. instructions
3. The _______ shape represents the start or end of a flowchart.
a. diamond b. circular c. rectangular
4. A flowchart is a _______ representation of an algorithm
a. physical b. pictorial c. virtual
5. Arrows are to indicate the flow of the ________.
a. algorithm b. set c. sequence
6. An algorithm is always written in ______ and precise language.
a. different b. complicated c. simple
7. the Condition in a flowchart is represented by a ________ shape.
a. Square b. circular c. diamond
8. The algorithm being used to solve a problem might change depending on the result of a certain _____.
a. condition b.situation c. process

B. Fill in the blanks. Choose from the box.

Arrow Iterations parallelogram sequentially diamond conditional flowchart algorithm

1. An __________ is a process of applying steps to solve problems.


2. A ________ is a pictorial representation of a flowchart.
3. An _________ is when a certain action has to be repeated.
4. __________ algorithms provide two or more possible outcomes.
5. The _________ represents input or output in a flowchart.
6. A flowchart displays each step ____________.
7. In a flowchart, _______ represents the sequence of steps.
8. Conditional statements are displayed in_________ shapes.

C. Write T for True or F for False.


1. We can write algorithms only using computers.
2. Algorithms can be used to solve only logical problems.
3. Flowcharts represent algorithms using shapes.
4. Flowcharts represent each action in a random order.
5. Each shape in a flowchart can have two or more arrows coming out of it.
6. Straight lines represent the sequence of actions in a flowchart.

5
7. Diamonds in flowcharts represent conditional statement.
8. Loops are also called iterations.

D. Answer these questions.


1. What is an algorithm?
2. What is a flowchart?
3. How do you make a flowchart? Give an example.
4. Give two advantages of a flowchart.
5. What is the difference between an algorithm and a flowchart?
6. What are the different shapes used as symbols in flowcharts?
7. What are conditional algorithms?
8. What are iterations? Give an example.

6
E. Think and answer.
1. Roshni needs to find out the sum of two numbers. How does she do this using an algorithm?
2. Adam has to draw a flowchart to wash a dirty shirt. How would he do this using conditional
statements?

7
Fun with computers

Finish this flowchart to multiply two numbers.

Hands-on with computers


Write an algorithm and draw a flowchart for the following:

1. Borrowing a book from the library


2. Finding the difference between 20 and 8

8
Project Work
Work in groups of two. Write algorithms and draw flowcharts for any two daily activities.

You might also like