It is also possible to nest one
repeat block inside another. Since Snap! processes scripts from top to bottom, the first repeat will begin first, and the second repeat will have to complete its entire process before the process of the first repeat is called again.-
Predict what this script will do without building:
- How many times in total will the script say "Hip"?
- How many times in total will the script say "Hooray"?
- Here is another script that has nested
repeatblocks.
- Sketch on paper what you expect it to do.
- Build it and try it out.
- Embed one more
repeat (move, turn)loop betweenmove 50 stepsandturn right 90 degrees.
You'll want to use the
command tells the sprite to set its penpoint down to draw.
command tells the sprite to set its penpoint down to draw.
No comments:
Post a Comment