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 2e744fd commit 680c4b7Copy full SHA for 680c4b7
LETTER GUESSER
@@ -0,0 +1,32 @@
1
+import random
2
+import string
3
+
4
+ABCS = string.ascii_lowercase
5
+ABCS = list(ABCS)
6
7
+play = True
8
9
+compChosse = random.choice(ABCS)
10
11
+print(":guess the letter (only 10 guesses):")
12
+userInput = input("guess:")
13
14
+failed = 10
15
16
+while failed > 0:
17
+ if userInput == compChosse:
18
+ print("---------->")
19
+ print("You are correct!")
20
21
+ print("Your guesses: " + str(10 - failed))
22
+ break
23
24
+ elif userInput != compChosse:
25
+ failed = failed - 1
26
27
+ print(":no your wrong: " + "left: " + str(failed))
28
29
+ userInput = input("guess:")
30
31
+ if failed == 0:
32
+ print("out of guesses")
0 commit comments