I am facing an assertion error where the test is failing for the comput_cost function. I think I have written the correct code, but the output doesn’t match the expected output and the test is failing. Can anyone help me understand what the ‘assertion error’ is?
Hi @rumszzz ,
The assertion error is raised because your code produced the cost value is not the same as the expected test result which is 2 in this case.
If you click the Hints link, you will find the pseudo code for this function. Carefully check your code against the pseudo code to see if your code logic is correct.
This always means your code is not correct.
Thank you, I found the error, was missing a bracket in the calculation for total_cost.