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

Term 2 review

Week 21 · Review: Term 2 · 3 lessons
2

Plans, bugs and data

Computing 2: Units 5–8, pp. 66–121
GoalReview algorithms, bugs, questions and kinds of data.
New words
bug · a mistake in an algorithm or programstatistical question · a question that can have many different answersnumerical data · numbers that were counted or measuredcategorical data · data in groups with names
Explanation

We plan an algorithm in the right order before we make a program. If the program does not match the plan, it has a bug. Debugging with a partner is faster and finds more bugs. A statistical question has many possible answers, so we collect data. Numerical data is counted or measured, and categorical data is sorted into named groups. Data helps us to decide what to do.

1 plan2 make blocks3 test4 debug
Worked examples
31Yay!start ongreen flagmoveuphopsayend
The algorithm says: start on green flag, up 3, say “Yay!”, hop 1, end. In the program, steps 3 and 4 are in the wrong order. The character hops first, then says Yay!.
ChildPages readFavourite colour
Yuki12blue
Bilal8green
Tom9blue
Lola5red
A table with one numerical and one categorical column. The most pages were read by Yuki, 12. The colour chosen most often is blue, by 2 children.
0102030MonTueWedThuFrivisitors
A park counts its visitors each day. Thursday is the busiest day, with 30 visitors, so the park decides to open extra toilets and paths for Thursday.
Class activity

Review stations: make six cards. Cards 1 and 2 are programs written in words with one bug each. Cards 3 and 4 are questions: one statistical and one not. Cards 5 and 6 are data: one numerical and one categorical. Swap with a partner. Find the bugs, sort the questions and sort the data. Check each other’s answers kindly.

Practice
1
The algorithm says: start on tap, say “Hi!”, grow 2, pop, end. Find the bug.
Hi!2start ontapsaygrowend
2
Statistical or non-statistical? A: What is your teacher’s name? B: Which games do the children in Class 4 play at break?
3
Numerical or categorical? A: the seconds that each child takes to run to the fence (14, 12, 18). B: the colour of each child’s trainers.
4
A juice stall counted the cups it sold. Which day was the busiest? How many more cups were sold that day than on Wednesday?
0510152025MonTueWedThuFricups sold