Discuss / Python / 作业---

作业---

Topic source

Lyuynn

#1 Created at ... [Delete] [Delete and Lock User]

-- coding: utf-8 --

W= float(input('weight:')) H= float(input('hight:')) BMI=W / H / H if BMI > 32: print('BMI=',BMI,'严重肥胖',) elif 28<BMI<= 32: print('BMI=',BMI,'肥胖') elif 25<BMI<=28: print('BMI=',BMI,'过重') elif 18.5<BMI<= 25: print('BMI=',BMI,'正常') else: print('BMI=',BMI,'过轻')


  • 1

Reply