I need help with my code, it doesnā€™t pass 2/5 test cases | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

I need help with my code, it doesnā€™t pass 2/5 test cases

https://sololearn.com/coach/207149674/?ref=app

9th Dec 2022, 9:10 PM
Mykola Nesmashnyi
Mykola Nesmashnyi - avatar
4 Respostas
+ 1
I fixed, shouldā€™ve replaced ā€œhā€ with 2 in formula. Thank you for replying anyway!
10th Dec 2022, 7:26 AM
Mykola Nesmashnyi
Mykola Nesmashnyi - avatar
+ 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.
10th Dec 2022, 7:34 AM
Brian
Brian - avatar
0
Mykola Nesmashnyi unfortunately, only you can see your Code Coach solution. Please place a copy into your Code section and link it here.
10th Dec 2022, 2:16 AM
Brian
Brian - avatar
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ā€)
10th Dec 2022, 7:19 AM
Mykola Nesmashnyi
Mykola Nesmashnyi - avatar