0

Why does this code not work-it is for the bmi calculator in python basics

bmi = int(input())/float(input()) 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") Thanks for the help

13th Nov 2022, 6:53 PM
Callum Haley
2 Réponses
+ 1
Use correct formula for calculating BMI: weight/height**2
13th Nov 2022, 6:59 PM
Mateusz Kempa
Mateusz Kempa - avatar
+ 1
Oh, i forgot to square height, thanks so much
13th Nov 2022, 7:27 PM
Callum Haley