PASO 9: ¡Necesitamos una instrucción if DENTRO de nuestro ciclo for para probar si el usuario adivinó el número correctamente!

  • Ir a y arrastre If . Suéltalo dentro del bucle for .
  • Cambie la variable de prueba de choice a guess .
  • Arrastre Say de y colóquelo dentro de la instrucción if .

.say() tendrá una sangría morada y amarilla ···· ···· ¡ porque está dentro de un bucle y una declaración if!

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)