0
BMI calculator
Output are same as expected but test shows failed... Some mistakes in my code.. Can you plz find it? https://code.sololearn.com/cwuNnKDUkEz4/?ref=app
4 Respostas
+ 12
weight=int(input())
height=float(input())
BMI = weight/(height**2)
if BMI <= 18.5:
print("Underweight")
elif BMI <= 25:
print("Normal")
elif BMI <=30:
print("Overweight")
else :
print("Obesity")
#change the starting letters to upper case
+ 1
#your code goes here
weight = float(input())
height = float(input())
bmi = weight / (height ** 2)
if bmi < 18.5:
print('Underweight')
elif bmi >= 18.5 and bmi < 25:
print('Normal')
elif bmi >= 25 and bmi < 30:
print('Overweight')
elif bmi >= 30:
print('Obesity')
Copy and paste
0
I think it'll works:
#your code goes here
weight = int(input());
height = float(input());
bmi = weight/(height**2)
if bmi<18.5:
print('Underweight')
elif bmi>=18.5 and bmi<25:
print("Normal")
elif bmi>=25 and bmi<30:
print('Overweight')
else:
print('Obesity')
0
weight = float(input())
height = float(input())
bmi = weight / (height**2)
if bmi < 18.5:
print ("your bmi is ",bmi," you are Underweight")
elif (bmi >= 18.5) and (bmi <= 25):
print("your bmi is",bmi," you are Normal")
elif (bmi > 25) and (bmi <= 30):
print("your bmi is",bmi," you are Overweight")
else:
print ("obesity")