0

BMI calculator quize?

I cant understand, why he don't work, i get the correct results in runtime. But still not passed the exam : #this is my code Weight = int(input("")) Hight = float(input("")) def bmi_calculator(Weight,Hight): BMI = Weight / Hight **2 if BMI > 30 : print("obesity") elif BMI >= 25 and BMI < 30: print("Overweight") elif BMI >= 18.5 and BMI < 25 : print("Normal") elif BMI < 18.5 : print("underweight") bmi_calculator(Weight, Hight)

5th Sep 2021, 1:20 AM
Mr. anrsaad
Mr. anrsaad - avatar
1 Antwort
+ 5
Hi Mr. anrsaad I spotted some errors when reading your code. 1. Your output results are not all acceptable. Some have capital letters, some don't. The challenge output must be exactly as expected. 2. What happens if your bmi ==30. Your code does not cover this event. 3. Your inputs don't need the "" int(input()) float(input()) This would not have affected your code though Make those little adjustments & you should be right. I like the use of the definition!
5th Sep 2021, 1:48 AM
Rik Wittkopp
Rik Wittkopp - avatar