What is worng in my code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is worng in my code?

I found this code in code coach - "keleidoscopes" https://code.sololearn.com/c4wM3Kk267iL/?ref=app

24th Jun 2022, 9:58 AM
Surya S
Surya S - avatar
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.
24th Jun 2022, 3:03 PM
Lothar
Lothar - avatar
+ 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..
24th Jun 2022, 10:21 AM
Jayakrishna 🇮🇳
+ 1
I have standardized your code and give you the solution for format to two decimals https://code.sololearn.com/cpvIOA8KHG0Q/?ref=app
24th Jun 2022, 10:57 AM
David Delgado
David Delgado - avatar
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.
25th Jun 2022, 2:33 AM
Emerson Prado
Emerson Prado - avatar