Skip to content

Commit

Permalink
Create LETTER GUESSER
Browse files Browse the repository at this point in the history
  • Loading branch information
CLOCK001 authored Nov 22, 2022
1 parent 2e744fd commit 680c4b7
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions LETTER GUESSER
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import random
import string

ABCS = string.ascii_lowercase
ABCS = list(ABCS)

play = True

compChosse = random.choice(ABCS)

print(":guess the letter (only 10 guesses):")
userInput = input("guess:")

failed = 10

while failed > 0:
if userInput == compChosse:
print("---------->")
print("You are correct!")
print("---------->")
print("Your guesses: " + str(10 - failed))
break

elif userInput != compChosse:
failed = failed - 1

print(":no your wrong: " + "left: " + str(failed))

userInput = input("guess:")

if failed == 0:
print("out of guesses")

0 comments on commit 680c4b7

Please sign in to comment.