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
2 Antworten
+ 1
Use correct formula for calculating BMI: weight/height**2
+ 1
Oh, i forgot to square height, thanks so much