Activity: Loops

EXERCISE 1: This code is inefficient. We wrote the same commands NINE times! Let's refactor with a Custom Block!

  • Click on SUBJECT and then . Click Create Block and title it Move and Turn.
  • Copy lines 8 and 9 from the code editor into your custom block.
  • There should be one sprite.move_forward(250) line and one sprite.turn_left(160) line. Click Save!
  • Click Run, Submit, and Next to continue.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
Support