-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathday18_100.py
38 lines (32 loc) · 848 Bytes
/
day18_100.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
print("One-Million-To-One")
guessCounter = 1
number = 777777
while True:
guess = int(input("Please guess a number between 1 to 1000000: "))
if guess == number:
print()
print("Holy Cow! You guessed it right!")
break
elif guess < 0:
print()
print("Guh")
break
elif guess < number:
print()
print("Guess Number #", guessCounter)
print("Your guess is \u001b[36mlower\u001b[0m than the number. Guess again!")
guessCounter += 1
continue
elif guess > number:
print()
print("Guess Number #", guessCounter)
print("Your guess is \u001b[36mhigher\u001b[0m than the number. Guess again!")
guessCounter += 1
continue
elif guess < 0:
print()
print("Guh")
break
else:
print("Guess Number #", guessCounter)
print("Please input a number between 1 to 1000000")