https://code.sololearn.com/cTJRlSo5bxBY/?ref=app
5/19/2022 8:53:45 AM
Sun110 Answers
New AnswerIt works for me. I suggest specifying the units. The formula you use applies to kg/m² hence you should specify that height must be in metres and not anything else. I used 1.7 and 80 and received the second message. Also, bmi = 18 would give conflicting answers. I would suggest including a healthy bmi range in the future)
No. I understand it now. Others bmi (code coach task) takes weight as first input and height as second so just asking,do you aware of it! Program is correct but enter input as per program.. Taking both floats no problem, but Height must be in float type. Bmi <= 18 condition covers all bmi less than 18. So second <18 no need. Never works also. Next conditions must check for Bmi greater than 18
In between 18 and 20, both inclusive ? if bmi >= 18 and bmi <=20 : Or also in python if 18<= bmi <= 20 : works fine. your condition works for " not between 18 and 20" ..
so how do you code bmi <=18 or bmi>20 without getting an error? because I tried adding putting and in between but it always gives me errors.
If comparing other bmi calculater, what are your inputs to your calculator? Sun1 want to know just you are inputs are in proper...
well this is my first time making so if i were to say my inputs were proper then no not really I'm just putting in random numbers to see if it would give me a good output.
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message