+ 2

I am facing an unknown error in my code ,the Test Case 3 is not passing.Please help me fix it!

It's a problem in the community section named "Duty Fee". Here's my code:- https://code.sololearn.com/c8jIZs1HGE4r/?ref=app

15th Jul 2023, 5:19 AM
Vaibhav Pandey
7 Respostas
+ 5
Vaibhav Pandey , 2 suggestions for your code: > converting the input to float and multiplying it by 1.1 can be done in one step. > using of the any() function simplifies the code and has an improved readability. https://code.sololearn.com/cOCEPI3ooN9Z/?ref=app
15th Jul 2023, 8:13 PM
Lothar
Lothar - avatar
+ 4
From community section *code coach* ..? Ok. As i already told you, else part should execute only when non of list value is above 20 so you should indent it as belong to for loop, not to if block. Remove break in else part. Condition i > 20 is enough. (Not >=)
15th Jul 2023, 7:31 AM
Jayakrishna 🇼🇳
+ 2
Your loop iterates only ones. You have break in both, if and else statements. What is the task actually? Add description or full track details or link...
15th Jul 2023, 7:13 AM
Jayakrishna 🇼🇳
+ 2
Jayakrishna 🇼🇳 I just changed my code bro thank you!
15th Jul 2023, 7:46 AM
Vaibhav Pandey
+ 2
You're welcome..
15th Jul 2023, 11:35 AM
Jayakrishna 🇼🇳
+ 1
Jayakrishna 🇼🇳 I added bro it's a problem from the community section named Duty Fee.
15th Jul 2023, 7:20 AM
Vaibhav Pandey
+ 1
Lothar Once again bro thank you!!
16th Jul 2023, 2:44 AM
Vaibhav Pandey