Tutorpip← About this lessonABCHide 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.
Answer key · Set A
Teo's space game
1A big job is built one small part at a time Nobody builds a puzzle all at once, and big programs work the same way.
2alone Each part must work alone first, and then you join them.
31-C, 2-B, 3-A The ship moves, the rocks fall, and the hearts show the lives.
4True Both parts had a box called speed, so they shared one number.
5They share one number, so the parts move wrongly The ship zoomed about while the rocks crept, because they shared one number.
6ship speed and rock speed Clear names stop mix-ups.
74, 2, 3, 1 Split, build each part alone, then join one at a time and check as you go.
8False Five copies need five fixes. A custom block needs one.
9Changing it once changes every rock Reuse one block. Change it once, and every use changes.
10Break it into parts, Give every box a clear name Parts and clear names help. Hoping and copying lead to bugs and extra fixes.
11random The rocks tumble down from random spots.
12Your own words: a grown-up reads it.
Mark each answer, count the right ones and write the score on the sheet.