0
What's wrong with my code?......it shows correct output bt still they say it's wrong
x= int(input()) y= float(input()) bmi= x/(y*y) 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')
9 Respuestas
+ 6
First letter of the output variables should be uppercase
Underweight, Normal.....
+ 5
If bmi of 18.5 is considered "Normal", your code would display "Underweight" because of the comparing operators you have used in your first if statement.
bmi <= 18.5
elif bmi>=18.5 and bmi<=25
you can see both have "=" in them.
+ 2
What do you mean "not working"?
Can you give an example where its wrong?
+ 2
Maybe, your internet connection is poor!
+ 2
Thanks dude now its working
+ 1
I did other examples too everything is fine....bt this one is not working..... it's ok thanks for your time dude
0
I even corrected that mistake......and even tried others code still it shows correct output bt it's not working
0
My output shows the correct output bt it still shows try again
0
Right! Bt it's not working for me...