STEP 7: We cast a fireball! Let's set up the other spell in the same way.

  • Find the elif statement in the cast_spell() function. If we choose choice b, we'll cast rock_smash()!
  • Replace the pass in the elif statement with this function call: rock_smash(caster)
  • Click Run and try choosing b this time to cast the Rock Smash spell!

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)