I am still getting two errors but I seem to be returning the correct format. Would someone mind helping me correct them or point me in the right direction. ? Below are the errors. https://replit.com/@GearRatio/boilerplate-arithmetic-formatter-1#arithmetic_arranger.py
python main.py
32 3801 45 123
+ 698 - 2 + 43 + 49
_____ ______ ____ _____
F..F..
======================================================================
FAIL: test_arrangement (test_module.UnitTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/boilerplate-arithmetic-formatter-1/test_module.py", line 10, in test_arrangement
self.assertEqual(actual, expected, 'Expected different output when calling "arithmetic_arranger()" with ["3 + 855", "3801 - 2", "45 + 43", "123 + 49"]')
AssertionError: ' [34 chars]5 - 2 + 43 + 49\n_____ ______ ____ _____' != ' [34 chars]5 - 2 + 43 + 49\n----- ------ ---- -----'
3 3801 45 123
+ 855 - 2 + 43 + 49
- _____ ______ ____ _____+ ----- ------ ---- ----- : Expected different output when calling "arithmetic_arranger()" with ["3 + 855", "3801 - 2", "45 + 43", "123 + 49"]
======================================================================
FAIL: test_solutions (test_module.UnitTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/boilerplate-arithmetic-formatter-1/test_module.py", line 39, in test_solutions
self.assertEqual(actual, expected, 'Expected solutions to be correctly displayed in output when calling "arithmetic_arranger()" with arithmetic problems and a second argument of `True`.')
AssertionError: ' 3[59 chars] 49\n_____ ______ ____ _____\n -666 [21 chars] 172' != ' 3[59 chars] 49\n----- ------ ---- -----\n -666 [21 chars] 172'
32 1 45 123
- 698 - 3801 + 43 + 49
- _____ ______ ____ _____
+ ----- ------ ---- -----
-666 -3800 88 172 : Expected solutions to be correctly displayed in output when calling "arithmetic_arranger()" with arithmetic problems and a second argument of `True`.
----------------------------------------------------------------------
Ran 6 tests in 0.002s
FAILED (failures=2)
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36
.
Challenge: Arithmetic Formatter
Link to the challenge: