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

Update hangman.py #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions games/hangman.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 + "!")
print(name, ", you lost!\nThe word you were looking for was", word + "!")