We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent acb5497 commit dc479fbCopy full SHA for dc479fb
hangman.py
@@ -2,7 +2,7 @@
2
3
4
def select_word():
5
- with open("words.txt", mode='r') as words:
+ with open("words.txt", mode="r") as words:
6
reading_lines = words.readlines()
7
return choice(reading_lines).strip()
8
@@ -26,7 +26,7 @@ def select_word():
26
player1_guess[index] = char
27
print(" ".join(player1_guess))
28
one_exist += 1
29
- if (one_exist < 1):
+ if one_exist < 1:
30
counter -= 1
31
print(f"That is incorrect. You have {counter} lives left. Please try again!\n")
32
0 commit comments