Discuss / Python / 试试

试试

Topic source

MODRICISCO

#1 Created at ... [Delete] [Delete and Lock User]
h = float(input('身高(m):'))
w = float(input('体重(KG):'))
BMI = w/(h*h)
print('BMI=%.2f' % BMI)
if BMI<18.5:
    print('过轻')
elif BMI>=18.5:
    print('正常')
elif BMI>=25:
    print('过重')
elif BMI>=28:
    print('肥胖')
elif BMI>32:
    print('死胖子')

  • 1

Reply