Year 4 – Repetition in games Worksheet
Lesson 2 – Different loops
Modifying code
Open the Scratch project [Link]/46dino. Look at the existing code
below and circle the code that needs to be changed to match the
tasks. Once you’ve done that modify the Scratch code for each sprite
on your computer to check that your changes are correct.
Dinosaur Task Existing Code
I want the green dinosaur to
keep looking left and right,
but it stops after a few goes.
Can you make it look left
and right continually while
the program is running?
I want the red dinosaur to
change colour as it jumps,
waiting one second between
changes. I want it to do this
continually. Can you change
the code so the red dinosaur
does this?
I want the blue dinosaur to
change its costume ten times
before stopping.
Resources are updated regularly — the latest version is available at: [Link]/tcc.
This resource is licensed under the Open Government Licence, version 3. For more information on this
licence, see [Link]/ogl.
Last updated: 19-03-21