You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed in Hangman that if a student produces a pattern with only zero or one (the last guessed) letter, that all check50 tests pass. But this is not what we want, we want to students to produce the pattern with possibly all letters guessed thus far to be able to show that pattern to the user. Otherwise the user never sees a pattern with more than one letter in it.
So instead of this:
pattern = ""
for letter in word:
if letter == CURRENT_LETTER:
pattern += letter
else:
pattern += "_"
we probably want students to do something like this:
pattern = ""
for letter in word:
if letter in ALL_GUESSED_LETTERS:
pattern += letter
else:
pattern += "_"
But there seems to be no check to enforce this.
Regards,
Bas
The text was updated successfully, but these errors were encountered:
Hello,
I noticed in Hangman that if a student produces a pattern with only zero or one (the last guessed) letter, that all check50 tests pass. But this is not what we want, we want to students to produce the pattern with possibly all letters guessed thus far to be able to show that pattern to the user. Otherwise the user never sees a pattern with more than one letter in it.
So instead of this:
we probably want students to do something like this:
But there seems to be no check to enforce this.
Regards,
Bas
The text was updated successfully, but these errors were encountered: