Discuss / Python / 加入输入值

加入输入值

Topic source

-- coding: utf-8 --

height=input('身高(米):') weight=input('体重(KG):') h=float(height) w=float(weight) bmi=w/h/h print('%.2f'% bmi) if bmi>32: print('严重肥胖') elif bmi>28: print('肥胖') elif bmi>25: print('过重') elif bmi>18.5: print('正常') else: print('过轻') pass

看过最好的答案


  • 1

Reply