Guess program in python
g = 5
while(g<6):
print("Enter an Number to guess")
num=int(input())
g=g-1
if num>18:
print("Please try smaller value")
elif num<18:
print("Please try larger value")
elif num==18:
print("Yes!! Right Guess")
break
print("You have ",g,"guesses left")
if g==0:
print("Game Over!!")
break
Comments
Post a Comment