STEP 10: Why doesn't the HP change? Currently the damage value is only in the calculate_damage() function.

We use a return statement to access and use information that was created inside another function.

  • Where do we assign a value to the variable damage? Look in the calculate_damage() function.
  • Go to LOGIC and . Drag Return Statement into the bottom of calculate_damage().
  • Change my_var to damage. This will return the damage amount for the spell we cast! But where does it go?

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)