Year 4 – Repetition in games Worksheet answers
Lesson 2 – Different loops
Modifying code – answers
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?
Change to a forever loop
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?
Change to a forever loop
I want the blue dinosaur to
change its costume ten times
before stopping.
Change to repeat 10 times loop
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