输入版
Topic sourcedef BMI(height,weight): return weight/pow(height,2) h=input('身高:') w=input('体重:') h=float(h) w=float(w) result=BMI(h,w) if result<18.5: print('过轻') elif result>=18.5and result<25.0: print('正常') elif result>=25.0and result<28.0: print('过重') elif result>=28.0and result<32.0: print('肥胖') elif result>=32.0: print('严重肥胖')
- 1
Tired_Shi