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 2d92ad5 commit acb5497Copy full SHA for acb5497
hangman.py
@@ -18,18 +18,17 @@ def select_word():
18
19
# Get the user player one input
20
counter = 6
21
-while (counter > 0):
+while counter > 0:
22
listening = input("Enter your input \n")
23
one_exist = 0
24
for index, char in enumerate(selected_word):
25
- if (listening == char):
+ if listening == char:
26
player1_guess[index] = char
27
print(" ".join(player1_guess))
28
one_exist += 1
29
if (one_exist < 1):
30
counter -= 1
31
- print(
32
- f"That is incorrect. You have {counter} lives left. Please try again!\n")
+ print(f"That is incorrect. You have {counter} lives left. Please try again!\n")
33
34
35
print("You lose!")
0 commit comments