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

Predict first

Week 24 · Unit 10: Be a storyteller · 3 lessons
3

Predict a story program

Computing 2: Unit 10, pp. 134–148
GoalPredict what a ScratchJr program will do before you run it, and then check.
New words
scene · one part of a storyoutput · what the program does and saysrun · to start a program
Explanation

A program is an algorithm too. Its input can be a tap or the green flag. Its output is what the characters do and say. Before you run a program, read each block and predict the output. Then run it and watch. If the output is not what you predicted, look at the blocks again.

32Wow!start ontapmoverighthopsayend
Worked examples
2Look!2
Predict: the character goes up 2, says “Look!” and then goes down 2. It ends where it started.
Bunny5Turtle1
Both characters start on the green flag, so they move at the same time. The bunny moves right 5 and the turtle moves right 1. The bunny gets much farther.
A wrong prediction is useful. It shows that we made a mistake when we read the blocks, or that the program has a bug.
Class activity

Act it out: draw three short programs on cards, for example “start on green flag, right 2, hop 1, say Hi!”. Mark a grid on the floor with chalk or tape. A friend predicts what you will do. Then you act out the cards on the grid: one step for each number. Score a point for each right prediction.

Practice
1
What will the character do, in order?
43Hi!
2
Where does the character finish compared with where it started?
323
3
Which character moves when you press the green flag?
Fish3Bird2
4
A character moves right 2, then up 1, then left 2. Where does it end compared with the start?