Add keyboard interrupt
This commit is contained in:
parent
f09d4ba213
commit
20d5499bf9
|
@ -4,6 +4,7 @@ random.seed()
|
|||
number = random.randrange(100, 999)
|
||||
number = list(str(number))
|
||||
guesses = 0
|
||||
try:
|
||||
while True:
|
||||
|
||||
if guesses == 5:
|
||||
|
@ -31,3 +32,5 @@ while True:
|
|||
print(hint[index], end=" ")
|
||||
guesses += 1
|
||||
print("\n")
|
||||
except KeyboardInterrupt:
|
||||
pass
|
Loading…
Reference in New Issue