Flowchart Worksheet Answers PDF
Flowchart Worksheet Answers PDF
Q.1 Create a flowchart and write algorithm for the following tasks
1. Algorithm:
1. Start
2. Input base of triangle (b)
3. Input height of triangle (h)
4. Area = (b * h) / 2
5. Output Area
6. End
Flowchart:
2. Algorithm:
1. Start
2. Input marks of core subject 1 (m1)
3. Input marks of core subject 2 (m2)
4. Input marks of core subject 3 (m3)
5. Average = (m1 + m2 + m3) / 3
6. Output Average
7. End
(Where m are marks)
Flowchart:
Same as Algorithm
3. Algorithm:
1. Start
2. Input first number (a)
3. Input second number (b)
4. Product = a * b
5. Output Product
6. End
Flowchart:
4. Algorithm:
1. Start
2. Input radius of circle (r)
3. Circumference = 2 * π * r
4. Output Circumference
5. End
Flowchart:
Same as Algorithm
5. Algorithm:
1. Start
2. Prompt the user to enter the name of the animal.
3. Read the input animal name.
4. Check if the animal is herbivore:
- If yes, output "Herbivore".
- If no, output "Carnivore".
5. End
Flowchart:
+---------------------+
| Start |
+---------------------+
|
V
Enter animal name
|
V
Is the animal herbivore?
(e.g., eats only plants)
|
+-----+------+
| |
V V
Yes No
| |
Output: Herbivore Output: Carnivore
| |
+------------+
|
+-------+--------+
| End |
+-----------------+
6. Algorithm:
1. Start
2. Prompt the user to enter the type of shape.
3. Read the input shape type.
4. Check if the shape is a square:
- If yes, output "Square".
- If no, output "Rectangle".
5. End
Flowchart:
+---------------------+
| Start |
+---------------------+
|
V
Enter shape type
|
V
Is the shape a square?
|
+-----+------+
| |
V V
Yes No
| |
Output: Square Output: Rectangle
| |
+------------+
|
+-------+--------+
| End |
+-----------------+
7. Algorithm:
1. Start
2. Set count = 100
3. Repeat until count is greater than or equal to 50
a. Print count
b. Decrease count by 1
4. End
Flowchart:
[Start]
|
+----|----+
| |
V |
[Set count = 100]
| |
V |
[Repeat until count >= 50] --->[Print count]--->(Decrease count by 1)
|
V
[End]
8. Algorithm:
1. Start
2. Set counter = 1
3. Repeat 5 times
a. Print "Your Name"
b. Increase counter by 1
4. End
Flowchart:
[Start]
|
+----|----+
| |
V |
[Set counter = 1]
| |
V |
[Repeat 5 times] --->[Print "Your Name"]--->(Increase counter by 1)
|
V
[End]
9. Algorithm:
1. Start
2. Set number = 20
3. Repeat until number is less than or equal to 30
a. If number is even
i. Print number
b. Increase number by 1
4. End
Flowchart:
[Start]
|
+----|----+
| |
V |
[Set number = 20]
| |
V |
[Repeat until number <= 30] --->(If number is even)--->[Print
number]--->(Increase number by 1)
| |
| V
| [End]
V
[End]
Q. 2 Write two advantages and disadvantages of Flowcharts.
Ans. Visual Representation: Flowcharts provide a visual way to represent a
process or algorithm, making it easier for students to understand complex
procedures. They use symbols and arrows to illustrate the sequence of steps,
which can help in grasping the overall logic of a problem.
Q. 3 Name the shape and identify the purpose of following flowchart symbols.