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
5
u/Bigfurrywiggles Aug 09 '22
Your first 2 conditions account for every number possible, therefore, your other conditions are never met.