0
I need help with my code, it doesn’t pass 2/5 test cases
4 Antworten
+ 1
I fixed, should’ve replaced “h” with 2 in formula. Thank you for replying anyway!
+ 3
Yes, I saw it, too. Glad you caught that. You may mark your own answer as the solution. Maybe you will get the badge for answering your own question.
0
Mykola Nesmashnyi unfortunately, only you can see your Code Coach solution. Please place a copy into your Code section and link it here.
0
Oh, understood. So the task is BMI calc. Here’s my code:
w = int(input())
h = float(input())
bmi = w/h**h
if(bmi<18.5):
print(“Underweight)
if(bmi>=18.5 and bmi<25):
print(“Normal)
if(bmi>=25 and bmi<30):
print(“Overweight”)
if(bmi>30):
print(“Obesity”)