0
What is worng in my code?
I found this code in code coach - "keleidoscopes" https://code.sololearn.com/c4wM3Kk267iL/?ref=app
4 Answers
+ 5
Surya S ,
it is just the last line of your code that should be:
...
print(round(fcost, 2)) # round(...) takes the argument >fcost< and rounds it to 2 decimal places.
+ 4
Instead of wrong, pls add more details that is "working but failing test cases or not working at all.. "
Task asked to "round the result to 2 decimal places.." Hope it helps..
+ 1
I have standardized your code and give you the solution for format to two decimals
https://code.sololearn.com/cpvIOA8KHG0Q/?ref=app
0
Lothar David Delgado Pls don't give finished code as answer. This is a learning app, and solving the problem is part of the process. Prefer giving hints for the OP to find the solution.