Page 73 - 2502_Pakistan-kifayat_C-7
P. 73
Double Tap Century #Critical Thinking
21 st
Skills
The following are the steps to grow a plant but the order has been shuffled. Put the correct
step number in front of each picture.
WRITING AN ALGORITHM
The construction of the Algorithm is the stage which requires creative thinking and finding the best
possible combination of steps to get the result. For example:
Example 1: Algorithm for going to the market to purchase a pen.
Step 1: Start
Step 2: Check your wallet for cash.
Step 3: Go to the market.
Step 4: Find the stationery shop.
Step 5: Ask for your favourite pen.
Step 6: If pen is available, then go to step 7 otherwise go to step 10.
Step 7: Give money to the shopkeeper.
Step 8: Keep the purchased pen safely.
Step 9: Go back home and go to Step 12.
Step 10: Ask for any other brand of pen.
Step 11: Go to step 6.
Step 12: Stop
Example 2: Complete the algorithm to find sum and product of three numbers.
Step 1: Start
Factbot
Step 2: Read (Input) the three number as
"a","b","c" from the user. When we search anything on Google, it gives us
result based on an algorithm written for it.
Step 3: Find sum = a + b + c.
#Computational Thinking 71

