Replit Tests Failing - Arithmetic Formatter


I can’t seem to figure out why my code is failing the tests on Replit, even though the output looks as expected. I wrote and tested it with different sets of input problems in VS Code first before testing it in Replit, and everything looked ok. I would appreciate if anyone could help me see what I’m missing here. Thank you!

Link to my Replit: boilerplate-arithmetic-formatter - Replit

According to the spec:

The function should optionally take a second argument. When the second argument is set to True , the answers should be displayed.

Your second argument to arithmetic_arranger() is required, not optional, and is causing these errors:

FAILED[test_two_problems_arrangement1] - TypeError: arithmetic_arranger() missing 1 required positional argument: 'showresult'

The remaining errors are whitespace differences, with the last test complaining about a difference of a newline:

E         -  -666     -3800      88      172     1028
E         +  -666     -3800      88      172     1028
E         ?                                          +

Thank you! I updated my code in the replit and now it passes all tests. I gave the second parameter a default value so that it can be optional, and removed a newline at the end that snuck in there. :slightly_smiling_face:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.