
#input()函數(shù)的輸入默認都是字符串,不可以比大小,使用int()內(nèi)嵌就可以定義input的輸入為數(shù)字
age =int(input('please input your age:' ))
# While循環(huán)的意思就是滿足條件的在縮進內(nèi)循環(huán),不滿足條件則跳出循環(huán)
# 循環(huán)及判斷語句都以冒號作為結(jié)尾:
while age <=0 or age >150:
????????print("please re-try,your age must more then ZERO and less than 150!!")
????????age =int(input('please input your age:'))
print("Your age group is as below:")
if age >=18:
????????print('Adult')
# elif就是 else if的縮寫,如果不是,再繼續(xù)做下一個條件的判斷
elif age >=10:
????????print('Teenager')
elif age >2:
????????print('Kid')
else:
????????print("Baby")