guessing game in python
# importing random library
# this game untill work untill u get right answer
import random
a = 1
rand = random.randint(1, 100)
while 1 <= a:
a += 1
winin = int(input("enter a number under 100 : "))
if winin > 100:
print("not valid")
break
else:
if winin < rand:
print("too low")
elif winin > rand:
print("too high")
if winin == rand:
print(f"you got the right answer in {a - 1} times")
break