Scratch Module 2 Lesson 3 Over and Over
- Slides: 10
Scratch Module 2 Lesson 3 Over and Over Again
Intro. Learning Objectives • Students will become familiar with nested loops. • Students will then apply these skills in creating different shapes and patterns.
Iteration = ? • Iteration = repeating • Today you will put a loop inside another loop. (Nested loop. )
What does the following do? • Enter it into Scratch and use the Debugger to step through it to see what it does. • Nested loops • Trace how they run. • Modify the program to. . – Change the colors of the shapes in the loop – Change the number of Pentagons in the outer loop to 3.
Write the program to create this screen with one set of commands?
Hints • Hide the sprite and clear the screen • Must have an outer loop to repeat the drawing of each shape 5 times • Sides/angles: 360/sides = angle • Set the x and y position before you begin drawing your first triangle. • Remember to use the pen up command before moving to draw the next figure • Once you have drawn the first four shapes, you will need to move the x coordinate back to the right.
Turn it in • Yourname. Mod 2 Lesson 3 Shapes
Exercise 2: Create the following with one set of commands
Hints • Start by drawing one of the small squares. • Modify this to make the first 4 squares. (Rotate about a corner and repeat) • Pen up and move • Repeat the other four squares. Use the nested loop. • Extensions: – Have the second group be a set of 9 smaller squares. – Make 5 sets of 4 squares • Save it as Your. Name. Mod 2 Lesson 3 Squares
Activity 3 • • • Use nested loops to draw the flower. Hints Start at (0, 0) Save it as Your. Name. Mod 2 Lesson 3 Flower Extensions – – Add a stem Change the number of petals Make the petals fatter/thinner Make a bouquet of flowers