Arithmetic Formatter - issue

When I run code through Pycharm everything works fine but when I run it through the tests on Replit I keep getting errors. Here is my code:
https://replit.com/@MichiAnd/boilerplate-arithmetic-formatter#arithmetic_arranger.py

Looking at the printed output, that clearly looks wrong aligned.

     32     3801      45     123    
 + 698    -   2    + 43    + 49    
-----    -----    ----    ----    

Here is the error in color:

-    32         1      45      123      988
?                        -             -
+      32         1      45     123     988    
? ++                                       ++++
- - 698    - 3801    + 43    +  49    +  40
?                             -        -
+  - 698    - 3801    + 43    + 49    + 40

The red is the expected output and green the actual output. There are bunch of excess spaces (indicated by +) and I then I assume those cause other issues down the line (-).

Thanks. I looked it over with fresh eyes and saw a space I was missing that was throwing everything off.

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