bmi is
In this case you don't need lists, they will not do what you want anyway.
one way to do what you try is like this:
float
, and you compare it with a lists - under_weight
, normal_weight
, over_weight
. They will never be equal.In this case you don't need lists, they will not do what you want anyway.
one way to do what you try is like this:
if 14 <= bmi < 19:by the way,
bmi = weight / Height ** 2
is enough, no need to explicitly cast to float. Also it's good to be consistent with respect to variable names - use height
, not Height
. These are also PEP* recommendations.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs