AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Term 1 review

Week 11 · Review: Term 1 · 3 lessons
1

Steps and sheets

Computing 6: Units 1–4, pp. 8–67
GoalReview flowcharts, spreadsheets and data questions from Units 1 and 2.
New words
flowchart · a diagram that uses shapes and arrows to show the steps of an algorithmtrace · to follow the steps one at a time and write down what happensformula · a calculation that starts with = and uses cell referencesclosed question · a question with a fixed set of answers to choose from
Explanation

A flowchart shows an algorithm. An oval is the start or the stop, a parallelogram is for input or output, a rectangle is for a process, an action such as a calculation and a diamond is for a decision. A loop sends an arrow back to an earlier step. A decision has a yes branch and a no branch, and one branch may hold another decision. To trace a flowchart, write down the value of every variable after each step. In a spreadsheet, every cell has a name such as B3, and a range such as B2:B6 is a block of cells. A formula starts with =, and the functions SUM, AVERAGE, MAX and MIN work on ranges. Check every answer by working it out by hand. A closed question gives a fixed set of answers, and an open question lets people write whatever they like.

ShapeMeaning
ovalstart or stop
parallelograminput or output
rectanglea process
diamonda decision with yes and no
rectangle with two side linesa sub-routine
Worked examples
Startset stairs to 0stairs below 3?yessay: Up!add 1 to stairsnosay: Top!End
Trace this flowchart. The variable stairs starts at 0. The question ‘stairs below 3?’ is yes for 0, 1 and 2, so the loop runs three times and says Up! each time. When stairs is 3 the answer is no, so the flowchart says Top! and stops.
Starttype the temperaturebelow 5 degrees?yesnoshow: Wear a coatbelow 15 degrees?yesnoshow: Wear a jumpershow: Wear a T-shirtEnd
Here a decision sits inside the no branch. For 3 degrees the answer to the first question is yes, so it shows Wear a coat. For 10 degrees the first answer is no and the second is yes, so it shows Wear a jumper. For 15 degrees both answers are no, because 15 is not below 15.
B7fx=SUM(B2:B6)
ABC
1DayBeesButterflies
2Mon73
3Tue56
4Wed94
5Thu68
6Fri84
The sheet above counts the insects seen in a garden. To find the total number of bees we select B2:B6 and write =SUM(B2:B6). The bees are 7 + 5 + 9 + 6 + 8 = 35. The average is 35 ÷ 5 = 7, from =AVERAGE(B2:B6).
Class activity

Human flowchart (no computer): draw the stairs flowchart in big shapes on separate sheets of paper and lay them on the floor with arrows. One person is the variable stairs and holds a number card. A second person walks along the path and follows each shape, changing the number card when an action says so. Say each output out loud. Then change the question to ‘stairs below 5?’ and play again. How many times is Up! said? If you have a computer or tablet, draw the flowchart with a drawing tool.

Practice
1
Trace the flowchart. What does it show at the end, and how many times does the loop run?
Startset cups to 10cups more than 4?yessubtract 2 from cupsnoshow cupsEnd
2
Draw a flowchart for this algorithm: type a mark; if the mark is 50 or more, show Pass; if not, show Try again.
3
Use the garden sheet in the third worked example. Write the function and the answer for (a) the total number of butterflies and (b) the difference between the most and the fewest butterflies.
4
Say whether each question in the table is open or closed.
QuestionOpen or closed?
Which sport do you like best: running, swimming or football??
What do you think about our new playground??