我的Python之路:找一个幸运数

lucky_num =20
input_num=6
guess_count=1
while input_num != lucky_num and guess_count <=3:
print("guess count: %d"%guess_count)
input_num= input("input the guess num:")
if(input_num>lucky_num):
print("the guess num is bigger...")
elif(input_num
print("thr guess num is smaller...")
guess_count =guess_count + 1
else:
print("Bingo!")
break
else:
print("too many reatrys....")

转载于:https://www.cnblogs.com/alsely/p/6677840.html

你可能感兴趣的:(我的Python之路:找一个幸运数)