Programming with Scratch

advertisement
Programming with Scratch- Assignments
Name:___________________________
Save all projects to a file named SCRATCH. Fill out this packet as you go along.
[5 pts]
1) a) Create a new Scratch project. Change the standard cat sprite into a “bee”. Then construct the
following two Scratch scripts for that sprite:
Run the program by clicking on the green flag.
Q1: What happens when you move your mouse around on the stage while the program is running?
-
(While the program is executing, you should occasionally press the space key and see what happens.)
b) Now add some code to this project so that every time you press the letter “C” on the keyboard the
stage will entirely get erased before the sprite starts drawing again.
c)Save this as beeDraw.yourLastName.scratch
[6 pts] 2) a) Look at this code:
Q1: What do you predict will happen?
-
b) Now construct the program and see what happens. Draw:
c) Now modify the program so it can produce an output like this:
(The square shape from the original drawing is now drawn six times. The modification you need to
make should be really simple: repeat loop that encloses the existing repeat loop along with another
turn command.)
d) Save this as rotatingSquares.yourLastName.scratch
[6 pts] 3) Look at the program below:
Q1) What will the program “say” at the end?
Q2) Suppose you change the number 18 to 25 and run the program. What will the program “say”?
Q3) Suppose you change the number 18 to 100 and run the program. What will the program “say”?
[5 pts] 4) Go back to the original Scratch project featured in Problem #2.
a) Modify this project so that instead of drawing a single square, it will instead draw a row of 6 squares,
spaced apart as shown below:
You will need to adjust the starting (x, y) coordinate so the pen begins drawing toward the top left of
the stage.
b) Save this project as sixSquares.yourLastName.scratch.
[5 pts] 5) Now modify your program from problem #4.
a) Instead of six squares, you get six equilateral triangles.
b) Save this project as sixTriangles.yourLastName.scratch.
[5 pts] 6) Now modify your program from problems 4 and 5.
a) Have your program draw a row of six objects of your choice (hexagons, pentagons, etc.)
b) Save this project as sixOtherShapes.yourLastName.scratch.
[15 pts]
7. HONORS ONLY
a) Modify your programs from 4, 5, and 6 so that it produces a row of six five-point stars like this:
Remember: The Scratch stage is 480 units wide and 360 units tall.
b) Save your project as sixStars.yourLastName.scratch.
c) Now draw a field of 9 rows in order to produce an image that resembles the upper left of an
American flag:
Five rows have six stars, and four of the rows have five stars.
Option 1: You can write nine chunks of code, one for each row. This will get you half credit for the
project.
Option 2: You can use a repeat-until or a repeat puzzle piece and look for a pattern. If all the stars line
up diagonally, you will get full credit. If the correct number of stars appears but is off by a little, you
will get partial credit.
d) Save this project as flagStars.yourLastName.scratch.
[6 pts]
8) Look at the project below called Move1.scratch
Make the following 3 changes
a) Modify the project so that every time the cat sprite travels to within ten pixels of the origin (position
[0,0]) you should make the sprite “grow” in size. This should occur if the cat reaches inside of positions
[0, 10], [0, -10], [10, 0], [-10, 0], [10, 10], etc.
-It will be helpful to use the ‘abs’ puzzle piece.
-You can change the size by using the ‘change size by ___’ puzzle piece
b) Every time the cat “bounces” off one of the 4 edges, the cat should “shrink”.
c) Make this program STOP after the cat has bounced off the stage EXATLY 10 times.
-You will need to introduce a variable
d) Save this as newBouncer.yourLastName.Scratch.
TOTAL POINTS EARNED: ________________ out of (38 OR 53)
Download