Class: 6th
Algorithm and Flowchart
Q 1. Select the correct answer.
a) What is the purpose of an algorithm?
i) to provide a logical and structured way of solving a problem
ii) to make the problem more complicated
iii) to find a temporary solution for a problem
iv) to jumble the tasks of a problem
b) What is the significance of symbols in a flowchart?
i) they make the flowchart more visually appealing
ii) they help in organizing the steps in an algorithm
iii) they help in creating a more complex algorithm
iv) all of these
c) What happens if a condition in a selection is true?
i) One set of statements is executed
ii) Two sets of statements are executed
iii) No statements are executed
iv) All statements are executed
d) Why is a loop used in an algorithm or flowchart?
i) to write out the same instruction many times
ii) to avoid repetition of instructions
iii) to execute instructions randomly
iv) to execute all instructions in a program
e. Which flowchart symbol connects the various shapes to show the flow of the process in a
flowchart?
i) connector
ii) Decision box
iii) Flowline
iv) Start
Q. 2 Draw the correct symbol that should be used to represent the following in a
flowchart.
a. Print the sum of five numbers.
Ans:
b. Accept the values of two numbers from the user.
Ans:
c. Compare two numbers.
Ans:
d. Calculate the product of three
numbers Ans:
e. Display the result of a
multiplication Ans:
Q. 3 Answer the following
a) Differentiate between an algorithm and flowchart
Ans: Algorithm refers to a set of rules/instructions that step-by-step define how a work is to be
executed in order to get the expected results.
A flowchart is a graphical representation of an algorithm. It makes use of symbols that are
connected among them to indicate the flow of information and processing.
b) What rules should you follow while writing an algorithm
Ans: Unambiguous and Clear: Each step must be precisely defined and have only one
interpretation. There should be no room for guesswork.
Well-Defined Inputs: The data that the algorithm needs to start must be clearly specified,
including their types and what constraints apply.
Well-Defined Outputs: The expected result or outcome must be clearly specified. The
algorithm should produce one or more outputs that match the desired result.
Finiteness (Termination): An algorithm must terminate after a finite number of steps for all
valid inputs. It cannot run indefinitely or enter an infinite loop.
Feasibility/Effectiveness: Each step should be practical and basic enough that it can be
carried out using available resources (like a computer's memory and processing power).
Language Independence: The logical steps of an algorithm should be a theoretical solution
to a problem, independent of any specific programming language syntax. It can be
expressed in plain English, pseudocode, or a flowchart.
Logical Sequence: The steps must be arranged in a correct, sequential order to solve the
problem
c) Explain how loops are represented in a flowchart with an example.
Ans: Loops in flowcharts show repetition using a decision box(diamond) where an arrow
loops back to an earlier step if a condition is met, creating a cycle until the condition fails,
common for counting or repeating while tasks like adding numbers until a total is reached.
a) Write an algorithm to calculate and display the square and cube of a positive
number entered by the user.
Ans: [Link]
Step [Link] a number and store in num variable
Step [Link] square = num * num
Step [Link] cube = num * num * num
Step [Link] square
Step [Link] cube
Step [Link]
e. Given below is an incomplete flowchart that accepts a number and then displays
whether the number is single-digit, double-digit, or triple-digit. Fill in the shapes indicated
by (A), (B), ( C) and
(D) to complete the flowchart.
Ans:
(A) → Display “Single Digit Number”
(B) → Is N < 100?
(C) → Display “Double Digit Number”
(D) → End