Selection and repetition: IF and REPEAT in programs

Year 3 · Free printable game: Secret code joke

learnwith.games
NC Y3
Name:Date:

Secret code joke

What is full of holes but still holds water?

Answer each question. Find the letter next to the right answer and write it in the box with the same number. The letters spell the punchline!

  1. Which of these uses selection (a choice)?Z repeat until you reach the wall: take a stepG repeat 5 times: jumpM repeat 4 times: move forward, turn rightA if the score is 10, say “You win!”
  2. Which of these uses selection (a choice)?Q keep stirring until the sugar dissolvesO forever: flash the light on and offF repeat 4 times: move forward, turn rightS if the cat is hungry, give it food
  3. Why do programmers use REPEAT instead of writing the same instruction many times?P it makes the program shorter and easier to changeS it stops the program workingJ it hides the instructionsN it makes the computer slower
  4. What do we call a part of a program that repeats instructions?J a spriteI a variableW a bugO a loop
  5. Is this selection or repetition? “repeat 5 times: jump”Z selectionN repetition
  6. Which of these uses selection (a choice)?T repeat 4 times: move forward, turn rightG if the door is open, close itC repeat until the bath is full: let the water runY repeat until you reach the wall: take a step
  7. Is this selection or repetition? “if the door is open, close it”E selectionO repetition
1234567

learnwith.games – free to print and copy for home and classroom use. learnwith.games/printables/selection-and-repetition/

Selection and repetition: IF and REPEAT in programs

Year 3 · Worksheet

learnwith.games
NC Y3
Name:Date:

Circle the correct answer.

  1. Is this selection or repetition? “repeat 5 times: jump” selection     repetition
  2. Is this selection or repetition? “repeat until the bath is full: let the water run” selection     repetition
  3. Which of these uses repetition (a loop)? if the sprite touches the wall, turn around     clap your hands 10 times     if the cat is hungry, give it food     if the door is open, close it
  4. Is this selection or repetition? “keep stirring until the sugar dissolves” repetition     selection
  5. Which of these uses repetition (a loop)? if the cat is hungry, give it food     repeat until you reach the wall: take a step     if it is raining, take an umbrella     if the score is 10, say “You win!”
  6. Why do programmers use REPEAT instead of writing the same instruction many times? it hides the instructions     it makes the computer slower     it makes the program shorter and easier to change     it stops the program working
  7. Is this selection or repetition? “if the sprite touches the wall, turn around” selection     repetition
  8. Is this selection or repetition? “clap your hands 10 times” selection     repetition
  9. Which of these uses repetition (a loop)? if the score is 10, say “You win!”     repeat 4 times: move forward, turn right     if the sprite touches the wall, turn around     if the answer is right, add one point
  10. Which of these uses repetition (a loop)? repeat until the bath is full: let the water run     if the cat is hungry, give it food     if the answer is right, add one point     if the light is red, stop
  11. Is this selection or repetition? “forever: flash the light on and off” selection     repetition
  12. Is this selection or repetition? “repeat 4 times: move forward, turn right” repetition     selection
  13. Which of these uses repetition (a loop)? keep stirring until the sugar dissolves     if the sprite touches the wall, turn around     if the door is open, close it     if it is raining, take an umbrella
  14. Is this selection or repetition? “if the answer is right, add one point” selection     repetition
  15. Which of these uses selection (a choice)? repeat 3 times: say “hip hip hooray”     if the score is 10, say “You win!”     clap your hands 10 times     repeat 4 times: move forward, turn right
  16. Which of these uses selection (a choice)? keep stirring until the sugar dissolves     if it is dark, switch on the light     repeat 3 times: say “hip hip hooray”     forever: flash the light on and off
  17. What is a sequence in a program? instructions carried out one after another in order     a type of keyboard     a choice between two things     a picture on the screen
  18. Which of these uses repetition (a loop)? if the door is open, close it     if the answer is right, add one point     repeat 3 times: say “hip hip hooray”     if the sprite touches the wall, turn around
  19. What do we call a part of a program that repeats instructions? a variable     a sprite     a bug     a loop
  20. Is this selection or repetition? “repeat 3 times: say “hip hip hooray”” selection     repetition

learnwith.games – free to print and copy for home and classroom use. learnwith.games/printables/selection-and-repetition/

Selection and repetition: IF and REPEAT in programs

Year 3 · Answer sheet

learnwith.games
NC Y3

Secret code joke

What is full of holes but still holds water? A SPONGE

1. if the score is 10, say “You win!” (A) · 2. if the cat is hungry, give it food (S) · 3. it makes the program shorter and easier to change (P) · 4. a loop (O) · 5. repetition (N) · 6. if the door is open, close it (G) · 7. selection (E)

Worksheet

  1. Is this selection or repetition? “repeat 5 times: jump” repetition
  2. Is this selection or repetition? “repeat until the bath is full: let the water run” repetition
  3. Which of these uses repetition (a loop)? clap your hands 10 times
  4. Is this selection or repetition? “keep stirring until the sugar dissolves” repetition
  5. Which of these uses repetition (a loop)? repeat until you reach the wall: take a step
  6. Why do programmers use REPEAT instead of writing the same instruction many times? it makes the program shorter and easier to change
  7. Is this selection or repetition? “if the sprite touches the wall, turn around” selection
  8. Is this selection or repetition? “clap your hands 10 times” repetition
  9. Which of these uses repetition (a loop)? repeat 4 times: move forward, turn right
  10. Which of these uses repetition (a loop)? repeat until the bath is full: let the water run
  11. Is this selection or repetition? “forever: flash the light on and off” repetition
  12. Is this selection or repetition? “repeat 4 times: move forward, turn right” repetition
  13. Which of these uses repetition (a loop)? keep stirring until the sugar dissolves
  14. Is this selection or repetition? “if the answer is right, add one point” selection
  15. Which of these uses selection (a choice)? if the score is 10, say “You win!”
  16. Which of these uses selection (a choice)? if it is dark, switch on the light
  17. What is a sequence in a program? instructions carried out one after another in order
  18. Which of these uses repetition (a loop)? repeat 3 times: say “hip hip hooray”
  19. What do we call a part of a program that repeats instructions? a loop
  20. Is this selection or repetition? “repeat 3 times: say “hip hip hooray”” repetition

learnwith.games – free to print and copy for home and classroom use. learnwith.games/printables/selection-and-repetition/