# Author:Liu Ren age_of_oldboy=56 ''' pathon的语言特点初体验: 1.while后可以接同级的else判断 2.语句之间的断句不需要使用分号,通过缩进判断语句的执行顺序 3.判断语句不需要使用括号,且后面必须跟上冒号 ''' count=0 while count<3: age=int(input('age:')) if age==age_of_oldboy: print("yes,you got it!") break elif age<age_of_oldboy: print("think bigger!") else: print("think smaller!") count+=1; else: print("you have tried too many times,byebye!")
原文链接:https://blog.csdn.net/living_ren/article/details/78868139
本站声明:网站内容来源于网络,如有侵权,请联系我们,我们将及时处理。
还没有人抢沙发呢~