+ 1

BMI project

height = float(1.85) weight = float(52) result = (weight / height**2) if result < 18.5: print("Underweight") if 18.5 <= result <25: print("Normal") if 25 <= result <30: print("Overweight") if result > 30: print("Obesity") Is there anything wrong? I can t pass it

29th Sep 2022, 11:41 AM
Demi
Demi - avatar
4 Answers
+ 3
Hi! Don't hard code variables "weight" and "height". This is input data. And it will be variables five times
29th Sep 2022, 12:39 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 2
float(input) --->>> float(input())
30th Sep 2022, 6:28 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 1
then I also made a little mistake in my mind
30th Sep 2022, 11:46 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
all the same, the program will still not work, since not all errors have been found yet
30th Sep 2022, 10:58 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar