PASO 9: Repitamos el mismo proceso para el hechizo Rock Smash.

  • Desde , arrastre Call with Parameters a la parte inferior de la función rock_smash() .
  • Cambie my_function a calculate_damage , my_var1 a caster y my_var2 a "rock_smash" .
  • ¡Pasamos este segundo argumento a la función calculate_damage() para decirle qué hechizo se está lanzando!
  • Hacer clic ¡Ejecute e intente elegir b para ver que el programa está calculando el daño para el hechizo Rock Smash!

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
  • Enviar Trabajo
  • Actividad Siguiente
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)