PASO 11: Si el usuario adivinó correctamente, ¡debemos detener el ciclo!

  • Cambia la cadena a "You guessed my word!" .
  • Vaya a LÓGICA y . Arrastra Break y suéltalo dentro de la instrucción if .
  • ¡También se sangrará dos veces, u 8 espacios en total!

Si el jugador adivina correctamente, el comando de break detendrá el bucle para que no se le pida que siga adivinando.

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)