0

BMI calculator(module 4)

I don't understand why these won't work weight =float(input()) height =float(input()) bmi = weight/(height**2) if (bmi < 18.5): print("Underweight") elif(bmi >= 18.5): print("Normal") elif(bmi == 25): print("Normal") elif(bmi <= 25): print("Overweight") elif(bmi == 30): print("Overweight") elif(bmi >= 30): print("Obesity")

21st Jul 2021, 5:17 PM
Ohida
Ohida - avatar
2 Answers
+ 1
Check your logic again.. Only 1st if or 1st elif works for any input.. next elif conditions are useless. Never going to work.. try to redesign logic..
21st Jul 2021, 6:46 PM
Jayakrishna 🇮🇳