Skip to content

Latest commit

 

History

History
15 lines (8 loc) · 704 Bytes

do_now_34.md

File metadata and controls

15 lines (8 loc) · 704 Bytes

Do Now 3.4 Practice using Arguments

Yesterdays you created a "bounce" custom block where multiple sprites could bounce around the screen by writing the code once.

However all the sprites are moving at the same speed. How would we get the sprites to move at different speeds.

We will solve this problem by adding an argument to the custom block named "speed". We can then pass the speed we want each sprite to move.

  1. Open yesterday's do now with the "bounce" custom block.

  2. Add an argument named "speed" to the "bounce" block by clicking the "+".

  3. Change the "move" block to move "speed" spaces.

  4. For each sprite, update the call to the custom block "bounce" to pass different speeds.