Coding with Nested Events
Grade 6 math worksheet · mathbonk.com/learn
Name: ______________________ Date: ____________
Look
- repeat 5 [repeat 5 [stamp]] makes this grid. How many stamps in all?
- The inner loop is changed to repeat 4. How many stamps now?
- Both loops are changed to 6. How many stamps now?
Practice
- How many stamps does repeat 2 [ repeat 7 [ stamp ] ] make?
- How many stamps does repeat 5 [ repeat 2 [ stamp ] ] make?
- A program says repeat 2 [ repeat 6 [ print a star ]; new line ]. How many lines are printed?
- In that program, how many stars are on each line?
- Write shorter code for 15 stamps in a row.
- How many stamps does repeat 4 [ move 10; stamp ] make?
- True or false: a nested loop is a loop inside another loop.
- A program says repeat 3 [ repeat 3 [ stamp ]; turn 90 ]. How many turns happen?
- Rewrite this with a loop: forward 5, forward 5, forward 5.
- Two sprites move at the same time. What kind of event is that?
- A stamp program makes 5 rows with 6 stamps in each row. How many stamps in total?
- To make a stamped picture taller, which loop's count do you change?
Think it through
- Draw the grid of stamps made by repeat 3 [repeat 4 [stamp]].
- Explain the difference between the outer and the inner loop.
Challenge
- How many stamps come from repeat 6 [repeat 7 [stamp]]?
- A program is repeat 2 [repeat 3 [stamp]; new line]. Rewrite it so that it prints 4 lines.