Arithmetic Formatter - can't get Replit IDE to accept solution

**Tell us what’s happening:

I am trying to complete the Arithmetic Formatter challenge. I have been working on it all day and I think I’ve got it right. When using my code in Pycharm, as far as I can tell, the correct output is shown for the test cases test_arrangement and test_solutions, which are detailed in the test_module.py file. However, when putting my code in the replit IDE, I fail these two cases.

An example of an output in pycharm is shown in the attached picture. I appreciate that my code is not the most efficient or fastest way to get a solution but I can’t see what’s wrong with it besides that. Any help would be appreciated. **

My code so far: https://replit.com/@angaar96/boilerplate-arithmetic-formatter#arithmetic_arranger.py

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.106 Safari/537.36

Challenge: Arithmetic Formatter

Link to the challenge:

You’re not returning the results, so except for the error cases your function has no output.

2 Likes

:man_facepalming:
It’s funny how I can code all of that and forget something as simple as returning. Thanks a million!!!

No problem. If you look at the error messages they’ll tell you what’s wrong. Took me a while to see it, but it’s right here:

AssertionError: None != '   32         1      45      123\n- 698 [90 chars] 172'

ie, your null output does not equal this string that I was expecting.

3 Likes

Ah, I see. I couldn’t understand what it meant before, I thought it was to do with the statements containing None in the code, but now it makes much more sense. Thanks again!