#BMI
height,weight = eval(input("请输入身高(米)和体重(公斤)[逗号隔开]:"))
bmi = weight/(pow(height,2))
dom,nat = "",""
if bmi < 18.5:
dom,nat = "偏瘦","偏瘦"
elif 18.5<=bmi<24:
dom,nat = "正常","正常"
elif 24<=bmi<25:
dom,nat = "正常","偏胖"
elif 25<=bmi<28:
dom,nat = "偏胖","偏胖"
print("BMI指标为:国际'{0}',国内'{1}'".format(dom,nat))
转载于:https://my.oschina.net/zhangshsURL/blog/2870086