Coding with Loops
Grade 3 math worksheet · mathbonk.com/learn
Name: ______________________ Date: ____________
Look
- repeat 4 [repeat 3 [stamp]] makes this grid. How many stamps in all?
- How many rows of stamps are there?
- How many stamps are in each row?
Practice
- A robot runs: repeat 5 times: step forward. How many steps does it take?
- A robot runs: repeat 4 times: forward 2, turn right. How many squares does it move forward in total?
- repeat 3 times: [ clap 2 times, stomp 1 time ]. How many claps are there in all?
- For the same program, how many actions are there in total (claps and stomps)?
- repeat 2 times: [ repeat 3 times: [ clap ], stomp ]. How many claps are there in total?
- For the same nested program, how many stomps are there?
- repeat 4 times: forward 3, turn right a quarter turn. What shape is drawn?
- A robot must move forward 12 squares using only the command "forward 2". How many times should the command repeat?
- Write "step, step, step, step, step, step" using a loop.
- A program to draw a square says "repeat 3 times: forward 2, turn right a quarter turn". How many times should it repeat?
Think it through
- Draw what repeat 3 [forward 2, turn right] traces.
- Explain why a loop inside a loop makes more steps than one loop.
Challenge
- How many steps are in repeat 2 [repeat 4 [forward 1, turn]]?
- A robot draws a triangle with repeat 3 [forward 5, turn]. What kind of turn is it?