Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hangman missing test #2

Open
bterwijn opened this issue Oct 21, 2019 · 0 comments
Open

Hangman missing test #2

bterwijn opened this issue Oct 21, 2019 · 0 comments
Assignees

Comments

@bterwijn
Copy link

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:

  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

@bjorn-out bjorn-out self-assigned this Dec 9, 2019
@stgm stgm transferred this issue from minprog/cs50x Jun 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants