一个小游戏--猜年龄【continue and break and 计数器】very funning!

#猜年龄游戏,你醉了吗

age=24
counter=0
for i in range(10):
print("dddd:",counter)
if counter < 3:
age_num=int(input("input your age:"))
if age_num==age:
print("you are right")
break
elif age_num>age:
print("think smaller")
else:
print("think big..")
else:
confirm=input("please confirm your think:")
if confirm=='y':
counter = 0
continue
else:
print("too many")
break
counter=counter+1

posted on 2016-07-22 10:10  小晓的筱  阅读(273)  评论(0编辑  收藏  举报