I finished my code for the Arithmetic Formatter, and it works fine when I try out different examples, but repl.it keeps giving me Error messages and I don‘t get why.

Here‘s my code:

```
def arithmetic_arranger(problems, x=False):
if len(problems) > 5:
print('Error: Too many problems.')
quit()
nums = ''
dens = ''
sums = ''
dashs = ''
for k in problems:
op = k.split()[1]
if op == '+' or op == '-': num,den = k.split(op)
else:
print("Error: Operator must be '+' or '-'.")
quit()
num = num.strip()
den = den.strip()
if len(num) > 4 or len(den) > 4:
print('Error: Numbers cannot be more than four digits.')
quit()
length = max(len(num), len(den)) + 2
if num.isnumeric() == False or den.isnumeric() == False:
print('Error: Numbers must only contain digits.')
quit()
sump = int(num) + int(den)
top = num.rjust(length)
mid = op + ' ' + den.rjust(length - 2)
nums += top + ' '
dens += mid + ' '
dashs += '-' * length + ' '
sums += str(sump).rjust(length) + ' '
if x == False:
arranged_problems = nums + '\n' + dens + '\n' + dashs
if x == True:
arranged_problems = nums + '\n' + dens + '\n' + dashs + '\n' + sums
return arranged_problems
```

Here‘s the link to the repl.it

What am I doing wrong?