Activity: Functions 2

EXERCISE 4: Now let's set up the wizard's other two spells as functions. Try it out!

  • Create a function named spell_2() at the bottom of the program.
  • Within spell_2(), put the code for the wizard to make treasure appear.
  • Create a function named spell_3() at the bottom of the program.
  • Within spell_3(), put the code for the wizard to call his pet dragon.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
Support