```
def arithmetic_arranger(problems, ans = False):
num1 = []
num2 = []
oper = []
dash = []
ans = []
spaces = []
#number of equation check
if len(problems) >5 :
return("Error: Too many problems.")
for v in problems:
fnum = v.split()[0]
num1.append(fnum)
op = v.split()[1]
oper.append(op)
lnum = v.split()[2]
num2.append(lnum)
len_1 = len(fnum)
len_2 = len(lnum)
d1 = max(len_1,len_2)+2
spaces.append(d1)
da = d1 * "-"
dash.append(da)
#Error Checkers:
if not fnum.isdigit() or not lnum.isdigit():
return('Error: Numbers must only contain digits.')
if op == '+':
total = int(fnum) + int(lnum)
ans.append(total)
elif op == '-':
total = int(fnum) - int(lnum)
ans.append(total)
else:
return("Error: Operator must be '+' or '-'.")
#check for digits
#check for digit length
if len(fnum) > 4 or len(lnum) > 4:
return('Error: Numbers cannot be more than four digits.')
l1 = []
l2 = []
d_ = []
ans_ = []
for (fl,o,ll,ds,sol,s) in zip(num1,oper,num2,dash,ans,spaces):
line_1 = str(fl).rjust(s) + (4 * " ")
l1.append(line_1)
line_2 = o + ll.rjust(s-1) + (4 * " ")
l2.append(line_2)
line_3 = ds + (4*' ')
d_.append(line_3)
line_4 = str(sol).rjust(s)+ (4*' ')
ans_.append(line_4)
a=''.join(l1)
b=''.join(l2)
c=''.join(d_)
g=''.join(ans_)
arithmetic_arranger= f"""{a}'\n'{b}'\n'{c}'\n'{g}"""
return arithmetic_arranger
```

the output am getting looks like this