h=input("小明的身高指数h:" ) w=input('小明的体重指数w: ') h=float(h) w=float(w) s=w/(h*h) if s<=18.5: print('体重过轻') elif s<=25: print('体重正常') elif s<=28: print('体重过重') elif s<=32: print('肥胖') elif s>32: print('严重肥胖')
Sign in to make a reply
天问一生
h=input("小明的身高指数h:" ) w=input('小明的体重指数w: ') h=float(h) w=float(w) s=w/(h*h) if s<=18.5: print('体重过轻') elif s<=25: print('体重正常') elif s<=28: print('体重过重') elif s<=32: print('肥胖') elif s>32: print('严重肥胖')