+ 2

My bmi calculator is ok but why this app not accepting my test of bmi calculator?

15th Feb 2021, 8:10 AM
Aryan King
Aryan King - avatar
8 ответов
+ 4
The new end of module challenges look for exact outputs so don't have any unspecified prints (outputs).
15th Feb 2021, 10:37 AM
Sonic
Sonic - avatar
+ 4
We're usually advised not to post exact solutions.
16th Feb 2021, 6:29 AM
Sonic
Sonic - avatar
+ 3
weight=int(input()) height=float(input()) BMI=weight/height**2 print(BMI) if BMI<18.5: print ('Underweight') elif BMI >=18.5 and BMI<25: print('Normal') elif BMI>=25 and BMI<30: print('Overweight') elif BMI>=30: print('Obesity')
15th Feb 2021, 8:54 AM
Aryan King
Aryan King - avatar
+ 2
This plz
15th Feb 2021, 8:54 AM
Aryan King
Aryan King - avatar
+ 2
I think the error was that you were printing the BMI value.
15th Feb 2021, 10:36 AM
Sonic
Sonic - avatar
+ 1
What is mistake in my code?
15th Feb 2021, 9:25 AM
Aryan King
Aryan King - avatar
+ 1
My code's only mistake is that BMI is in capital whereas they aceppt it as bmi🙄🙄😡
15th Feb 2021, 9:29 AM
Aryan King
Aryan King - avatar
+ 1
bmi = float(input())/float(input())**2 if bmi<18.5:print('Underweight') elif 25>bmi>=18.5:print('Normal') elif 30>bmi>=25:print('OverWeight') elif bmi>=30:print('Obesity')
21st Feb 2021, 5:01 PM
RXRX
RXRX - avatar