STEP 14: Let's call the function inside an interval event. This will create a new car once every second.

  • Go to and drag Interval Event to the bottom of your program, outside of the function.
  • Change the interval in the event handler to 1.
  • Delete the .turn_left() command inside the event. Replace it with Function Call.
  • Change the name of the function call to make_car.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)