
Frogs, Cannonballs, and Flying Fruit, Part 2
1. Of course, not everything has the same trajectory. When you throw a superball into the air, it goes way up and comes down near
the same place. When you throw a baseball to home plate (or a chicken at your friend), it goes pretty flat. So it’s time to play with
trajectories by changing the coefficient of the parabola. (Don’t remember what a coefficient is? Go back to the previous section
and reread the first step.)
2. Click on the stamp tool and click on the when green flag clicked block. This will make a copy of your script.
3. Move the copy to one side and replace the when green flag clicked block with a when space key pressed block.
4. Right after the when space key pressed block, insert a ask What’s your nam?e and wait block (Sensing). Change “What’s your
name?” to “Enter a coefficient between -.1 and .1”.
5. In the two blocks that set the value of y, replace the -.05 with the answer block from Sensing. (answer is a variable whose value is
set by the system to whatever you enter.)
6. Click the green flag, then press the space bar. Enter a value and click the check mark to see what shape your parabola has. Play
with different coefficients and see what shapes you can make: tall and thin, long and flat, etc.
7. Save your project.
Comentarios a estos manuales