Available Letters
To help user we show available letters after every guess. The letter has to be deleted from the available_list if it has been used already. To do that, we create the get_available_letters function.
Tarea
Swipe to start coding
- Set the
get_available_lettersfunction usingletters_already_guessedas an argument. - Set the variable-alphabet
available_listusingstring.ascii_lowercaseto get an alphabet. - Set
forloop to work with elements of theavailable_listin the reverse order. - Set condition if a letter from the
available_listare equal to theletters_already_guessed. - Delete an element from the
available_listif it was guessed. - Test the function using the
test_letters_already_guessedlist.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 2. Capítulo 1
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Suggested prompts:
Resumir este capítulo
Explicar el código en file
Explicar por qué file no resuelve la tarea
Genial!
Completion tasa mejorada a 7.69
Available Letters
Desliza para mostrar el menú
To help user we show available letters after every guess. The letter has to be deleted from the available_list if it has been used already. To do that, we create the get_available_letters function.
Tarea
Swipe to start coding
- Set the
get_available_lettersfunction usingletters_already_guessedas an argument. - Set the variable-alphabet
available_listusingstring.ascii_lowercaseto get an alphabet. - Set
forloop to work with elements of theavailable_listin the reverse order. - Set condition if a letter from the
available_listare equal to theletters_already_guessed. - Delete an element from the
available_listif it was guessed. - Test the function using the
test_letters_already_guessedlist.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 2. Capítulo 1
single