Tutorpip← About this lessonABCWith the answer keyDownload PDF
Coding · Ages 10+ · Set A
Teo's space game
Scan to mark
on screen
A
Name
Date
Start Finish
Goal: 15 min
Score/ 11
Remember: Build a big program from small parts. Make each part work, then join them one at a time, with clear names and a block you can reuse.

Read and answer

Read the story, then answer.

A space gameTeo and Mina want to build a huge space game with ships, rocks, hearts, shields, bosses and ten levels. Mr. Reyes tips out a jigsaw puzzle, because nobody builds a puzzle all at once. They split the game into three parts: the ship, the rocks and the hearts. Mina builds the ship and Teo builds the rocks, and each part gets its own screen. Each part works alone, but when they join them, the ship zooms about while the rocks creep, because both parts had a box called speed. Mina renames them ship speed and rock speed. Then Teo finds he has copied his rock code five times, so Mr. Reyes shows him a custom block called make a rock.
1
What does Mr. Reyes's jigsaw puzzle show?
A big job is built one small part at a timeA puzzle is easier than a gameA big job is best built all at once
2
Make each part work first, then join them.
twicealonelast
3
Join each job to the part that does it.
  1. 1Slides left and right
  2. 2Tumbles down from random spots
  3. 3Shows how many lives are left
  • AHearts
  • BRocks
  • CShip
4
Two boxes with the same name can clash.
TrueFalse
5
Both the ship and the rocks have a box called speed. What happens when they are joined?
Each part keeps its own speedThey share one number, so the parts move wronglyThe game stops
6
Which new names stop the mix-up?
speed and speeds and rship speed and rock speed

Order, fix and think

7
Put the steps for building a big program in order.
  • Check after every join
  • Make each part work alone
  • Join the parts one at a time
  • Split the game into parts
8
Teo copies his rock code five times, so changing the size needs just one fix.
TrueFalse
9
Why is the custom block make a rock better than five copies?
Changing it once changes every rockIt makes the rocks biggerIt stops the ship
10
Circle every good habit for building a big program.
Break it into partsJoin everything and hopeGive every box a clear nameCopy the same code five times
11
Teo's rocks never fall the same way twice, because each starts at a spot.
randomhiddensame
12
Pick a big job at home, like a picnic. Write three small parts for it.
13
Draw the three screens, one for each part: ship, rocks and hearts.
Scan the code at the top to mark this sheet on screenTake a photo of your answers or type them. It is marked for you automatically, and your score is kept.