用python写如何保留有效数字,求解
查看原帖
用python写如何保留有效数字,求解
1315379
zhuimengNB楼主2024/3/18 20:36

m,h=input().split() m=float(m);h=float(h) BMI=m/h**2 if BMI < 18.5: print('Underweight') elif BMI > 18.5 and BMI < 24: print('Normal') elif BMI > 24: print('%.6g'%BMI) print(Overweight)

2024/3/18 20:36
加载中...