Discuss / Python / 练习答案

练习答案

Topic source

危小博

#1 Created at ... [Delete] [Delete and Lock User]
# -*- coding : utf-8 -*-
h = float(input('please input your height'))
w = float(input('please input your weight'))
bmi = w/(h**2)
bmi1 = float('%.1f'% float(bmi))
print('your bmi is :',bmi1)
if bmi1 < 18.5:
    print('过轻')
elif 18.5 < bmi1 < 25:
    print('正常')
elif 25 < bmi1 < 28:
    print('过重')
elif 28 < bmi1 < 32:
    print('肥胖')
else:
    print('你太重了')在此插入代码

  • 1

Reply