Solutions: Algorithms and Flowcharts Exercise
1. Multiple Choice Answers with Explanation:
a) Correct Answer: (i) To provide a logical and structured way of solving a problem. An algorithm is
a step-by-step procedure used to solve a problem in a systematic and logical manner.
b) Correct Answer: (ii) They help in organizing the steps in an algorithm. Symbols in a flowchart
represent specific actions and help visually organize the process.
c) Correct Answer: (i) One set of statements is executed. In a selection structure, if the condition is
true, only the statements under the 'true' branch are executed.
d) Correct Answer: (ii) To avoid repetition of instructions. Loops allow repeated execution of
instructions without rewriting them multiple times.
e) Correct Answer: (iii) Flowline. A flowline (arrow) connects different symbols in a flowchart and
shows the direction of flow.
2. Flowchart Symbols Explanation:
a) Print the sum of five numbers – Output Symbol (Parallelogram).
b) Accept values from user – Input Symbol (Parallelogram).
c) Compare two numbers – Decision Symbol (Diamond).
d) Calculate product – Process Symbol (Rectangle).
e) Display result – Output Symbol (Parallelogram).
3. Descriptive Answers:
a) Difference between Algorithm and Flowchart: An algorithm is a written step-by-step procedure to
solve a problem. A flowchart is a graphical representation of an algorithm using symbols.
b) Rules while writing an algorithm: 1. Clearly define the problem. 2. Write steps in logical order. 3.
Use simple and clear language. 4. Ensure the algorithm has a start and end. 5. Steps should be
finite and unambiguous.
c) Representation of loops in flowchart: A loop is represented using a decision symbol that checks a
condition. If the condition is true, the flow returns to a previous step. Example: Printing numbers
from 1 to 5 using a condition N <= 5.
d) Algorithm to calculate square and cube of a number: Step 1: Start. Step 2: Accept a positive
number N. Step 3: Calculate Square = N × N. Step 4: Calculate Cube = N × N × N. Step 5: Display
Square and Cube. Step 6: Stop.
e) Flowchart Completion: (A) Display 'Single Digit Number'. (B) Is N < 100? (C) Display 'Double
Digit Number'. (D) Stop.