Skip to content
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
20 changes: 10 additions & 10 deletions game.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@
# for every character in secret_word
for char in word:

# see if the character is in the players guess
# see if the character is in the players guess
if char in guesses:

# print then out the character
# print then out the character
print (char),

else:

# if not found, print a dash
# if not found, print a dash
print ("_"),

# and increase the failed counter with one
# and increase the failed counter with one
failed += 1

# if failed is equal to zero
Expand All @@ -55,7 +55,7 @@
if failed == 0:
print ("You won")

# exit the script
# exit the script
break

print
Expand All @@ -69,17 +69,17 @@
# if the guess is not found in the secret word
if guess not in word:

# turns counter decreases with 1 (now 9)
# turns counter decreases with 1 (now 9)
turns -= 1

# print wrong
# print wrong
print ("Wrong")

# how many turns are left
# how many turns are left
print ("You have", + turns, 'more guesses')

# if the turns are equal to zero
# if the turns are equal to zero
if turns == 0:

# print "You Loose"
# print "You Loose"
print ("You Loose")