GoalRead and draw a flowchart with yes and no questions, and see programming as a way to solve problems.
New words
flowchart · a picture of an algorithm with shapes and arrowsdecision · a question with the answer yes or nostart · where the chart beginsend · where the chart finishes
Explanation
A flowchart is a picture of an algorithm. It shows a problem as simple logical steps joined by arrows. Ovals mark the start and the end, rectangles hold actions, and diamonds hold yes/no questions called decisions. Start at the beginning and follow the arrow, answer each question honestly, and take the “yes” path or the “no” path. Programming is also a way to solve problems: you break the problem into steps, test your steps, and fix the bugs. People who write code need imagination, because they invent new things, and patience, because trying and fixing is part of the job.
Worked examples
A chart for a plant: if the soil is dry we water the plant, otherwise we wait until tomorrow.
Follow this chart: the bag is packed (yes) and it is not raining (no). The path: go to the door, then wear a hat.
Nour drew a chart for feeding the cat and tested it with her brother. They found a missing question: “Is the bowl empty?” She added it. This is trying and fixing.
Class activity
Draw a flowchart. Choose a simple decision, such as “Do I need a jacket?” or “Is it time to sleep?”. On paper, draw an oval for the start, a diamond for the question with two arrows (yes and no), rectangles for the actions, and an oval for the end. Test it with a partner: ask them to answer once with yes and once with no.
Practice
1
Which shape holds a yes/no question?
The diamond.
2
Follow the chart: the bottle is empty. What action is on your path?
Fill the bottle.
3
Which shapes show the start and end, and which show actions?
Ovals for the start and end, rectangles for actions.
4
How is programming like solving problems?
We break the problem into steps, test them and fix the bugs.