EXTEND: Now let's customize the program!

  • Look in the calculate_damage() function and customize the amount of damage each spell does!
  • Add a loop of your choice in the MAIN CODE section to repeat the code for each wizard to cast a spell. If you use a while loop, make sure it is not infinite!
  • Three lines of code are needed for each wizard to cast a spell and update HP. Include all of this in your loop!

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)