import datetime
myyear = input("请输入您的出生年份:")
nowyear = datetime.datetime.now().year
age = nowyear-int(myyear)
print("您的年龄为:"+str(age))
if age<18:
print("您现在是未成年人@_@")
if age>=18 and age<=66:
print("您现在是青年-_-")
if age>=66 and age<80:
print("您现在是中年~@_@~")
if age>=80:
print("您现在是老年*-_-*")
python-输入输出1
最新推荐文章于 2023-05-21 19:05:03 发布