height=input('请输入你的身高(单位/M):')
weight=input('请输入你的体重(单位/KG):')
height=float(height)
weight=float(weight)
ex=weight/(height*height)
print('你当前的BMI指数是:',format(ex,'.1f'))
if ex<18.5:
print('你的体重过轻')
elif ex<=25:
print('你的体重正常')
elif ex<=28:
print('你的体重过重')
elif ex<=32:
print('你的体重肥胖')
else:
print('结论:你的体重严重肥胖')
print('''请参考下列BMI指数依据:
低于18.5:过轻
位于18.5-25:正常
位于25-28:过重
位于28-32:肥胖
高于32:严重肥胖''')
Sign in to make a reply
落寞斑马
height=input('请输入你的身高(单位/M):')
weight=input('请输入你的体重(单位/KG):')
height=float(height)
weight=float(weight)
ex=weight/(height*height)
print('你当前的BMI指数是:',format(ex,'.1f'))
if ex<18.5:
print('你的体重过轻')
elif ex<=25:
print('你的体重正常')
elif ex<=28:
print('你的体重过重')
elif ex<=32:
print('你的体重肥胖')
else:
print('结论:你的体重严重肥胖')
print('''请参考下列BMI指数依据:
低于18.5:过轻
位于18.5-25:正常
位于25-28:过重
位于28-32:肥胖
高于32:严重肥胖''')