首页 > 其他 > 详细

猜年龄-1

时间:2016-11-20 19:28:06      阅读:258      评论:0      收藏:0      [点我收藏+]
print("Do you have 3 chances!")
age_of_oldboy = 56

count = 0
while count <3:
guess_age = int(input("Guess Age:"))
if guess_age == age_of_oldboy :
print("Yes,you got it.")
break
elif guess_age > age_of_oldboy:
print("Think smaller...")
elif guess_age < age_of_oldboy:
print("Think bigger!")
count +=1
if count == 3:
countine_confirm = input("Do you want to keep guessing")
if countine_confirm !=‘n‘:
count =0
else:
print("You have tried too many times.Fuck off..")

猜年龄-1

原文:http://www.cnblogs.com/chzki/p/6083042.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!