在计算BMI(BodyMassIndex ,身体质量指数)的案例基础上,判断人体胖瘦程度。BMI中国标准如下表所示。
多组输入,每一行包括两个整数,用空格隔开,分别为体重(公斤)和身高(厘米)。
针对每行输入,输出为一行,人体胖瘦程度,即分类。
80 170 60 170 90 160 50 185
Overweight Normal Obese Underweight
while 1:
try:
str1=input()
list1=[]
for i in str1.split():
list1.append(int(i))
weight=list1[0]
height=list1[1]/100
BMI=weight/(height*height)
if BMI<18.5:
print("Underweight")
elif 18.5<=BMI<=23.9:
print("Normal")
elif 23.9<BMI<=27.9:
print("Overweight")
else:
print("Obese")
except:
break