- 1
Hi can anyone help me with the BMI calculator?
The calculator is working but it's only outputting under weight. Can anybody please help me? I checked it again and again but can't see the problem. https://code.sololearn.com/cJJPEUtpRRjE/?ref=app https://code.sololearn.com/cJJPEUtpRRjE/?ref=app
11 Respostas
+ 1
Zyt your inputs are reversed. Take weight first, then height.
+ 1
Zyt The original problem description tells you the order that they will supply the inputs. The program cannot pass the tests if it does not take input correctly.
+ 1
Wow, i should always read the problem properly lols. Thanks Brian! Appreciate it!
0
it outputs all of them for me, i assumed you used metric input as your equation is the metric one
0
I don't think I understand what you mean, can you elaborate? Like what's wrong with my code?
0
1) there is no need for the while loop
2) it works regardless of the while loop
As long as you you input metric values
So enter your
height in terms of meters
And weight in terms of kg
0
Am I going to use integer or float? I took out the while loop, as I get what u mean now but it still don't work? It only gives out underweight
0
None simply input metric values. Like ive said before
Your code works lol you probably inputing the same values over and over
0
It's actually for the projects that this app gives us to answer, on control flow, and I'm not the one who is testing it so I don't know what it's putting in.
0
They might be using imperial system ( lb, inches )
So try this
BMI = 703 * weight / height **2
0
Thanks! But how did that affect the whole code tho? I don't understand? is it because the BMI formula is weight/ height^2?