Selection and repetition: IF and REPEAT in programs
Year 3 · Free printable game: Secret code joke
NC Y3
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!
- 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!”
- 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
- 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
- What do we call a part of a program that repeats instructions?J a spriteI a variableW a bugO a loop
- Is this selection or repetition? “repeat 5 times: jump”Z selectionN repetition
- 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
- Is this selection or repetition? “if the door is open, close it”E selectionO 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 · Worksheet
NC Y3
Circle the correct answer.
- Is this selection or repetition? “repeat 5 times: jump” selection repetition
- Is this selection or repetition? “repeat until the bath is full: let the water run” selection repetition
- 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
- Is this selection or repetition? “keep stirring until the sugar dissolves” repetition selection
- 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!”
- 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
- Is this selection or repetition? “if the sprite touches the wall, turn around” selection repetition
- Is this selection or repetition? “clap your hands 10 times” selection repetition
- 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
- 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
- Is this selection or repetition? “forever: flash the light on and off” selection repetition
- Is this selection or repetition? “repeat 4 times: move forward, turn right” repetition selection
- 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
- Is this selection or repetition? “if the answer is right, add one point” selection repetition
- 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
- 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
- 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
- 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
- What do we call a part of a program that repeats instructions? a variable a sprite a bug a loop
- 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
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
- Is this selection or repetition? “repeat 5 times: jump” repetition
- Is this selection or repetition? “repeat until the bath is full: let the water run” repetition
- Which of these uses repetition (a loop)? clap your hands 10 times
- Is this selection or repetition? “keep stirring until the sugar dissolves” repetition
- Which of these uses repetition (a loop)? repeat until you reach the wall: take a step
- Why do programmers use REPEAT instead of writing the same instruction many times? it makes the program shorter and easier to change
- Is this selection or repetition? “if the sprite touches the wall, turn around” selection
- Is this selection or repetition? “clap your hands 10 times” repetition
- Which of these uses repetition (a loop)? repeat 4 times: move forward, turn right
- Which of these uses repetition (a loop)? repeat until the bath is full: let the water run
- Is this selection or repetition? “forever: flash the light on and off” repetition
- Is this selection or repetition? “repeat 4 times: move forward, turn right” repetition
- Which of these uses repetition (a loop)? keep stirring until the sugar dissolves
- Is this selection or repetition? “if the answer is right, add one point” selection
- Which of these uses selection (a choice)? if the score is 10, say “You win!”
- Which of these uses selection (a choice)? if it is dark, switch on the light
- What is a sequence in a program? instructions carried out one after another in order
- Which of these uses repetition (a loop)? repeat 3 times: say “hip hip hooray”
- What do we call a part of a program that repeats instructions? a loop
- 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/