0% found this document useful (0 votes)
125 views1 page

Year 4 Game Loops Worksheet Answers

The document provides answers for modifying code in a game involving dinosaurs, focusing on different types of loops. It suggests using a forever loop for the green and red dinosaurs to perform continuous actions and a repeat loop for the blue dinosaur to change its costume a specific number of times. The resource is regularly updated and licensed under the Open Government Licence, version 3.

Uploaded by

info
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
125 views1 page

Year 4 Game Loops Worksheet Answers

The document provides answers for modifying code in a game involving dinosaurs, focusing on different types of loops. It suggests using a forever loop for the green and red dinosaurs to perform continuous actions and a repeat loop for the blue dinosaur to change its costume a specific number of times. The resource is regularly updated and licensed under the Open Government Licence, version 3.

Uploaded by

info
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

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

You might also like