tall=float(input("请输入身高/m:"))
kg=float(input("请输入体重/kg:"))
BMI=kg/tall/tall
print(BMI)
if BMI<18.5:
print("轻")
pass
elif BMI>18.5 and BMI<25:
print("正常")
pass
elif BMI>25 and BMI<32:
print("肥胖")
pass
else:
print("严重肥胖")
运行示例:
耶!