0

What’s the problem

A program to calculate BMI: weight = int(input()) Height = float(input()) BMI = weight / Height ** 2 if (BMI < 18.5) : print ("Underweight") elif(BMI >= 18.5 < 25): print ("Normal") elif(BMI >= 25 < 30): print ("Overweight") if (BMI >= 30): print ("Obesity")

16th Nov 2021, 1:46 PM
Joudy Ramy
Joudy Ramy - avatar
2 odpowiedzi
+ 1
Conditions of ellif block is in Incorrect way .. Ex: correct way (18.5 <= BMI <25) #means BMI is in between 18.5 and 25 ?
16th Nov 2021, 1:56 PM
Jayakrishna 🇮🇳