BMI calculator | Sololearn: Learn to code for FREE!

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

5/1/2021 9:49:52 AM

Jibin Benny

3 Answers

New Answer

+10

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')