0
I need help. I get an error in case number 3 in the BMI calculator exercise. After the others are fine. I leave my code.
Calculadora IMC
7 Respuestas
+ 4
Share Your code
+ 1
peso = int(input())
altura = float(input())
masa = peso / (altura)**2
masa = round(masa,2)
if masa < 18.5:
print("Underweight")
elif masa >= 30.0:
print("Obesity")
elif masa >= 18.5 or masa <= 24.9:
print("Normal")
else:
masa == 25.0 or masa <=29.9
print("Overweight")
+ 1
Walter,
Last else part needs to be modified. Modified part of the code is below,
elif masa >= 25.0 or masa <= 29.9:
print ("Overweight")
This should solve.
DHANANJAY PATEL
+ 1
Yes. I managed to solve it by changing the code
0
still with the same error
0
thank you very much to all
0
Walter Gimenez
Did you resolve the problem?