Hints 1/2
It is difficult guessing the word from the such a big file. So, we allow the user to use the hint. We will implement the hint part of the program in 2 steps. The hints_match
function defines if the current state of gameword
(correct guessed letters and gaps) match the exact word from the file. If it does, then function returns True, False otherwise.
Swipe to start coding
- Set the
hints_match
function using theword_to_match
and theword_from_list
as arguments. - Delete spaces in the
word_to_match
. - Compare lengths of the
test_list
andother_list
. - If lengths aren't the same, return
False
. - Set
for
loop to work with thetest_list
. - Increase the
counter
. - Test the function using the
test_word_to_match
andtest_word_from_list
lists.
Løsning
Takk for tilbakemeldingene dine!
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Awesome!
Completion rate improved to 7.69
Hints 1/2
Sveip for å vise menyen
It is difficult guessing the word from the such a big file. So, we allow the user to use the hint. We will implement the hint part of the program in 2 steps. The hints_match
function defines if the current state of gameword
(correct guessed letters and gaps) match the exact word from the file. If it does, then function returns True, False otherwise.
Swipe to start coding
- Set the
hints_match
function using theword_to_match
and theword_from_list
as arguments. - Delete spaces in the
word_to_match
. - Compare lengths of the
test_list
andother_list
. - If lengths aren't the same, return
False
. - Set
for
loop to work with thetest_list
. - Increase the
counter
. - Test the function using the
test_word_to_match
andtest_word_from_list
lists.
Løsning
Takk for tilbakemeldingene dine!
Awesome!
Completion rate improved to 7.69single