height = input('Please tell us how tall you are(in meters):',)
weight = input('Please tell us how heavy you are(in kg):',)
height = float(height)
weight = float(weight)
BMI = weight/height**2
if BMI <18.5:
print('too slim')
elif BMI <25:
print('normal')
elif BMI <28:
print('too heavy')
elif BMI <32:
print('fat')
else:
print('FAT!!!')
Sign in to make a reply
正晓恰好出生在早晨
height = input('Please tell us how tall you are(in meters):',)
weight = input('Please tell us how heavy you are(in kg):',)
height = float(height)
weight = float(weight)
BMI = weight/height**2
if BMI <18.5:
print('too slim')
elif BMI <25:
print('normal')
elif BMI <28:
print('too heavy')
elif BMI <32:
print('fat')
else:
print('FAT!!!')