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.
Compito
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.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 2. Capitolo 1
single
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione
Suggested prompts:
Riassuma questo capitolo
Explain code
Explain why doesn't solve task
Awesome!
Completion rate improved to 7.69
Available Letters
Scorri per mostrare il menu
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.
Compito
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.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 2. Capitolo 1
single