STEP 8: Now we can subtract the amount of the discount from the full price to find the sale price!

  • Click on . Drag another Float Variable into your program.
  • Change the variable name from my_var to sale_price.
  • Change the variable's value (what's to the right of the equals sign) from 2.34 to price - discount.

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)