#某一舞蹈学院招聘老师,要求年龄小于30周岁,体重不得超过50公斤。
age=int(input("请输入您的年龄:"))
weight=int(input("请输入您的体重:"))
if age <=30:
print("您的年龄是:%d岁"%age)
if weight>50:
print("您的体重超过要求:体重不能超过50公斤。您的体重是:%d"%weight)
else:
print("恭喜您的加入,您的体重是:%d公斤"%weight)
else:
print("很抱歉,年龄不符")
python中If的嵌套循环练习
最新推荐文章于 2024-07-17 11:36:11 发布