PASO 1 : Tenga en cuenta que configuramos la escena para usted. Comencemos preguntando cuántos dragones quiere derrotar el usuario.

El comando int() convierte una string en un integer .

  • En , arrastre Ask for Integer .
  • Cambie el nombre de la variable de guess a dragon_count .
  • Cambia la cadena dentro del comando .ask() a "How many dragons will I have to defeat?"

    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)