Download presentation
Presentation is loading. Please wait.
1
Mod 2 Lesson 2 Repeating with loops
Intro to Programming Mod 2 Lesson 2 Repeating with loops
2
Intro Learning Objectives
Use the pen commands to introduce the concept of iteration and loops in Scratch. Students will be able to write programs that incorporate looping. Students experiment with drawing shapes in Scratch.
3
How can you do this with less code?
(240, 180) (-240, 180) What does this code do? Note: Starting location is in the middle, starting direction is to the right, starting pen color is black. How can you do this with less code? (-240, -180) (240, -180)
4
What do you think this program does?
Create the script in Scratch to check, Hide Makes the sprite disappear. Show Makes it reappear. Pen up Lifts the pen off the canvas, so when moved nothing is written. Pick random () In the operators set of commands. Picks a random number from 1 to 10. Clear Clears the pen marks and stamps from the stage. (Note: Background will still remain.) Set pen color to Sets the pen color. Over 200 options. Tells you what position on the stage the drawing will start. Pen down Start leaving a pen trail when moved. This repeat loop draws the square.
5
Your Turn Using to loop, try to create the following. Triangle
Pentagon Circle Show to Smith when you have them completed. Try to draw a circle and hexagon side by side.
6
Assignment Create a piece of art in Scratch using the pen.
It must have at least 6 figures and at least 3 loops. Push: Create the snowman. Push: Have the figure (not a sprite) move. Save it as YourNameMod2Lesson2
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.