Gabriel Medina

Software developer

164

18

Guess Number

"""
Sample 10 - Exercise GUESS Numer.py
# ------------------------------------------
# GUESS NUMBER
#
# ------------------------------------------
"""

secretNumber = 40
guessedNumber = 0

while guessedNumber != secretNumber:
guessedNumber = int(input("Guess the secretNumber: "))
if guessedNumber > secretNumber:
print("Nope, lower!")
else:
if guessedNumber != secretNumber:
print("Nope, upper!")

print("Yes, you are RIGHT!")

Comments

Please sign in or sign up to comment.