From 9216abda4cb4f0eb8b16e7b401e00ea53fdd9490 Mon Sep 17 00:00:00 2001 From: Oshino-MeMe <60491973+Oshino-MeMe@users.noreply.github.com> Date: Thu, 30 Jan 2020 18:04:42 -0600 Subject: [PATCH] Update hangman.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi Derek, Levi here. When Bear and myself were at your presentation, thanks again for that, we came across two issues in your hangman game so we decided to dig in and try and fix it. We just replaced the " ' "/" é " with " "/" e ". We felt that getting rid of the offending words seemed to be the best course of action for the problem but aren't knowledgeable enough yet lol. We also want to try and get the guessed word to print if the guesses run out but that's going to have to wait till tomorrow cause he has homework and my brain already feels fried lol. --- games/hangman.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/games/hangman.py b/games/hangman.py index 5019ffc..ddf5c02 100644 --- a/games/hangman.py +++ b/games/hangman.py @@ -16,7 +16,9 @@ # Print the word list, for debugging... x = 0 for w in lower_words: - print(str(w).replace("'b","")) + # trying to find a way to remove apostrophe and accént aigu. I'm not sure if this is where it needs to go + # but when I run in debug it seems to work. + print(str(w).replace("'b","").replace("'","").replace("é","e")) x += 1 # Count the number of words, so that we can choose one. @@ -76,4 +78,4 @@ turns -= 1 print("\nSorry,", guess, "is not in the word.\n") if turns == 0: - print(name, ", you lost!\nThe word you were looking for was", word + "!") \ No newline at end of file + print(name, ", you lost!\nThe word you were looking for was", word + "!")