Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Algorithms and Flowcharts

Class 8 - APC Understanding Computer Studies with BlueJ

Fill in the blanks

Question 1

The first symbol in a flowchart is the START symbol.

Question 2

A flowchart is a pictorial representation of a sequence of


instructions that are required to solve a problem.

Question 3

Flow lines are used to connect different boxes.

Question 4

The Decision Box is used for making decisions as well as


comparisons.

Question 5

All mathematical operations are put in a Process box.

Write the names and the symbols of the boxes for the
given statements

Name of
Statement Symbol
the Box

Process
To assign a number
Box
Name of
Statement Symbol
the Box

Input /
To display the result Output
Box

START
To start the process Start Box

To decide whether a number is Decision


smaller than the other Box

Complete the following flowcharts

Question 1

A flowchart to check whether a triangle is possible or not.


Question 2

A flowchart to display the greater of the two numbers.


Write algorithms for the following

Question 1

To go for a class picnic

Answer

Step 1: Start
Step 2: Decide the picnic venue, date and time
Step 3: Decide the picnic activities
Step 4: Hire a vehicle to reach to the venue and comeback
Step 5: Goto to the picnic venue on the decided date
Step 6: Do the activities planned for the picnic
Step 7: Come back to school in the hired vehicle
Step 8: Stop
Question 2

To celebrate New Year

Answer

Step 1: Start
Step 2: Prepare a guest list for New Year party
Step 3: Decide the venue, food menu, games and fun
activities for the party
Step 4: Invite the guests for the party
Step 5: On New Year eve, get ready and enjoy the party
Step 6: Stop

Question 3

To make tea/coffee

Answer

Step 1: Start
Step 2: Boil water in a saucepan
Step 3: Add tea to boiling water
Step 4: Add sugar to boiling water
Step 5: Add milk to boiling water
Step 6: Boil this water with all the ingredients for 2 mins
Step 7: Sieve the tea in a cup
Step 8: Stop

Question 4

To celebrate Teachers' Day

Answer

Step 1: Start
Step 2: Decide the activities for teachers' day like dance
performances, plays, etc.
Step 3: Form groups of students and assign the decided
activities from step 2 to each group.
Step 4: Decide the practice timings for each group.
Step 5: Each group to practice as per the timings decided in
step 4.
Step 6: Invite the teachers to Teachers' Day celebrations.
Step 7: Perform the activities planned in step 2 on Teachers'
Day
Step 8: Stop

Answer the following questions

Question 1

What is a flowchart? What are the features of a flowchart?

Answer

A flowchart is a pictorial representation of an algorithm. It


uses boxes of different shapes to represent different types
of instructions. These boxes are connected with arrow
marks to indicate the flow of operations.

The features of a flowchart are:

1. It is an easy method of communication.


2. It is independent of a programming language.
3. It is the key to correct programming.
4. It helps to plan and design a new system.
5. It clearly indicates the task to be performed at each
level.

Question 2

What is an algorithm? What are its characteristics?

Answer
An algorithm is defined as the sequence of instructions
written in simple English that are required to get the desired
results. It helps to develop the fundamental logic of a
problem that leads to a solution.

Some characteristics of an algorithm are as follows:

1. Each step of an algorithm must be precisely defined.


2. An algorithm must contain blocks that will help to solve
problems more efficiently and logically.
3. It should accept a set of inputs and produce a defined
output.
4. It must be terminated after a finite number of steps.
5. It should be independent from a computer programming
language.
6. It should develop a platform for writing programs.

Question 3

Define the following and draw their symbols:

(a) Process Box

Answer

A process box is used to represent all types of mathematical


tasks like addition, subtraction, multiplication, division, etc.

(b) Terminal Box

Answer

Terminal Box is used to indicate the beginning (START) and


the end (STOP) of a flowchart. A terminal box with the word
'START' is used at the beginning and a box with the word
'STOP' is used at the end of a flowchart.

(c) Input/Output Box

Answer

Input/Output Box is used to represent an input/output


operation of a task. Statements like INPUT, PRINT, etc. are
used in these boxes.

(d) Decision Box

Answer

Decision Box is used to check a condition in a flowchart.


The Decision Box has two paths, one if the condition is true
and the other is the condition is false.

Write algorithms and draw flowcharts for the following


Question 1

Accept the length of two different line segments and check


whether they are equal or unequal. Display the message
accordingly.

Algorithm

Step 1: Start
Step 2: Accept the length of the two line segments as l1 and
l2.
Step 3: If l1 and l2 are equal, then display 'Line Segments
are equal'.
Step 4: If l1 and l2 are not equal, then display 'Line
Segments are not equal'.
Step 5: Stop

Flowchart
Question 2

Accept the age of a person and check whether he/she is eligible


to vote or not. A person is eligible to vote only when he/she is 18
years or more.

Algorithm

Step 1: Start
Step 2: Accept the age of the person.
Step 3: If age is greater than or equal to 18, then display 'You
are eligible to vote'.
Step 4: If age is less than 18, then display 'You are not

You might also like