Algorithms and flowcharts
Answers are for parents and teachers.
1
Write five ordered steps for tidying your school desk. Swap two steps and say what goes wrong.
Any clear, ordered list is correct. For example, wiping the desk before removing the books leaves the desk dirty under the books.
2
Name the shape for each: Start, read num, num > 0 ?, total = a + b.
Start: oval. read num: parallelogram. num > 0 ?: diamond. total = a + b: rectangle.
3
What does the program in the picture show?
Python
1for i in range(3): 2 print("Hi")
Hi three times, one under the other.
4
The positive-or-not program shows Not positive for 0. Why is this message better than Negative, and what would you add to show a special message for 0?
Zero is not negative, so Negative would be untrue. A second question, is num equal to 0, would be needed before the else branch.
5
Is “repeat a step until the bag is full” a sequential, conditional or loop algorithm? Give a reason.
A loop, because a step repeats until the bag is full.