Scientific Computing with Python - first project

Hey,
Ive got this far with my first script and have come out with 3 passes but dont know what to focus on next to fix the rest. Could I please have some pointers and advice?
Thanks :slight_smile:
arithmetic_arranger.py - boilerplate-arithmetic-formatter - Replit

I haven’t looked at the actual code, but seems the failure messages are indicating that for some reason your code is responding with “Error: Numbers cannot be more than four digits.” when it’s not supposed to.

Below is the output you get when running one of the tests.

E AssertionError: Expected different output when calling “arithmetic_arranger()” with [“3801 - 2”, “123 + 49”]
E assert ‘Error: Numbers cannot be more than four digits.’ == ’ 3801 123\n- 2 + 49\n------ -----’
E + Error: Numbers cannot be more than four digits.
E - 3801 123
E - - 2 + 49
E - ------ -----

Notice it says Expected different output when calling your function on [“3801-2”,“123+49”]. Then it proceeds to say what it got, and what it was supposed to get.

'Error: Numbers cannot be more than four digits.’ == ’ 3801 123\n- 2 + 49\n------ -----’

So its saying that “Numbers cannot be more than four digits.” was supposed to be equal to “3801 123\n- 2 + 49\n------ -----”. This means that instead of responding with an appropriate equation output, your function instead is returning with the error that numbers can’t be more than four digits, even though none of the numbers provided were bigger than four digits… thats the problem you need to fix next I’d guess.