STEP 10: Time to build the subtract() function!

  • Find def·subtract():¬ at the top of your program. Delete ····pass·¬ from the function.
  • From drop two Ask for Float indented inside the subtract() function block.
  • Change the strings in both .ask() commands to "Enter a number."
  • Change the first variable name from guess to num_1 and the second variable name to num_2.

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)