python身体质量指数(BMI)计算

2019-03-11  本文已影响0人  lfpwhy
height = float(input('请输入身高:'))
weight = float(input('请输入体重:'))
BMI=float(weight/float((height*height)))
if  BMI<18.5:
    print('过轻')
elif BMI>=18.5 and BMI<=25:
    print('正常')
elif  BMI>=25 and BMI<=28:
    print('过重')
else  :
    print('严重肥胖')
上一篇 下一篇

猜你喜欢

热点阅读