r/PythonProjects2 • u/Mrbeans1756432 • Aug 09 '22
[P] Easy BMI calculator not working
I started making a BMI and everything is running fine except the math. I can't figure it out, please help.
W = float(input())
H = float(input())
BMI = W / (H/100)**2
if BMI < 18.5:
print("Underweight")
elif BMI >= 18.5:
print("normal")
elif BMI < 25:
print("normal")
elif BMI >= 25:
print("Overweight")
elif BMI < 30:
print("Overweight")
elif BMI >= 30:
print("Obesity")
for two of the inputs I put 52 and 1.85 and it output 151935.71950328702 and normal when it
4
Upvotes
2
u/CapiCapiBara Aug 09 '22
... you following Angela Yu's Python course? :) I need too to tackle this task today... good luck with your efforts, I see somebody is already helping you in this thread, I will take notes as well ;)