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

Plan then program

Week 14 · Unit 6: Be a designer · 3 lessons
3

Start on bump

Computing 2: Unit 6, pp. 80–91
GoalPlan and read a program in which one character starts when another touches it.
New words
bump · when one character touches anotherstart block · the first block of a program; it says when the program runsreact · to do something because something else happened
Explanation

A program can wait for something to happen. The start on bump block waits until another character touches this one. Then its blocks run. In the picture, the cat walks right 4. If it touches the bird, the bird’s program starts. The bird says Hi! and hops. If the cat does not touch the bird, the bird does nothing.

Cat4start ongreen flagmoverightendBirdHi!2start onbumpsayhopend
Worked examples
StepInstruction
1Start on bump
2Say “Hi!”
3Hop 2
4End
The algorithm for the bird, step by step. The bird’s program is the one that starts on bump.
The cat walks along the row and touches the bird. The bump makes the bird’s program start.
This time the bird is farther away. The cat stops before it gets there. They do not touch, so the bird’s program does not run.
Class activity

Bump play: you need three children and a line of five floor tiles or paper squares. The “cat” starts at one end and takes 4 steps along the line. The “bird” stands on the last square and waits. When the cat touches the bird’s hand, the bird says “Hi!” and hops twice. Now the bird stands on a different square, too far for the cat to reach. Does the bird do anything? Then add a third child, a “fish”, who starts when the bird touches it.

Practice
1
Which of these is the start on bump block: A, B or C?
ABC
2
Write the algorithm for the dog.
2Woof!
3
The cat walks right 3. The fish has a start on bump program and sits 5 squares away in the same row. Does the fish’s program run?
4
Why do we plan an algorithm before we make a program?