+ 1
Help please!
hi! I am trying to do an easy BMI calculator but there is an error which I can't find. Someone helps me pls https://code.sololearn.com/cx4a9JmoBCbc/?ref=app
5 Answers
+ 7
Also, you have the formula backwards. It should be
bmi = weight_kg / (height_m * height_m)
+ 6
Python is case-sensitive, so don't capitalize 'if' and 'else' đ
+ 3
You might also want to change line 6 to
print('bmi:', bmi)
+ 2
David Ashton thx for the help, it now works properly.
Thanks also for the like! đ
+ 2
If you're getting too many decimal places, you can round it to, say, 3 places using the round() function.
print('bmi:', round(bmi, 3))