STEP 4: Let's call our flip!

Remember, a function only runs if it is called. We can call a function anytime after it is created!

  • From LOGIC, drop Function Call at the bottom of your program, OUTSIDE of the function.
  • Change the function name in the call line from my_function() to flip(). If you do not change the function name in the call line, you will get an error, because there is no function named my_function() in this program!

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)