age=int(input('请输入您的年龄'))
if age>=60:
print('老年')
elif 60>age>=40:
print('中年')
elif 40>age>=18:
print('青年')
else:
print('未成年')
那到底在那输入年龄,全部写完吗
所以只能输入一次而已
age=input('请输入年龄:')
age=int(age)
if 60>age>=40:
if 40>age>=18:
if 18>age>=0:
if age<0:
print('你是个什么鬼东西')
Sign in to make a reply
朗月清风处处游
age=int(input('请输入您的年龄'))
if age>=60:
print('老年')
elif 60>age>=40:
print('中年')
elif 40>age>=18:
print('青年')
else:
print('未成年')