6 Antworten
+ 2
I can't find it, I ask to expose the problem here, and your code to detect the error
+ 1
Ariel Garcia Aragon Your code is correct, the only problem is in the output, the words must start with a capital letter. It would be better to also convert these integers (25, 30) to float (25.0, 30.0)
+ 1
#your code goes here
weight = int(input())
height = float(input())
result = weight /(height ** 2)
if result < 18.5:
print("Underweight")
elif result >= 18.5 and result < 25.0 :
print('Normal')
elif result > 25.0 and result < 30.0 :
print('Overweight')
else :
print('Obesity')
0
Tks my english is no good but tks your help
weight=int(input());
height=float(input());
bmi= weight/float(height**2);
if bmi<18.5:
print("underweight")
elif bmi>=18.5 and bmi<25:
print ("normal")
elif bmi>=25 and bmi<30:
print ("overweight")
elif bmi>=30:
print ("obesity")
0
Excuse me, would it be like this?
weight=float(input());
height=float(input());
bmi= weight/float(height**2);
if bmi<18.5:
print("underweight")
elif bmi>=18.5 and bmi<25.0:
print ("normal")
elif bmi>=25.0 and bmi<30.0:
print ("overweight")
elif bmi>=30.0:
print ("obesity")
0
pruenba a poner
bmi=weight//height**2