**Tell us what’s happening:**

Describe your issue in detail here.

I don’t understand what`s wrong with my code.

**Your code so far**

```
def arithmetic_arranger(problems, show=False):
e = 0
while e == 0:
if len(problems) > 5:
return "Error: Too many problems."
e = 1
break
if show == False:
arranged_problems = ["" for _ in range(3)]
elif show == True:
arranged_problems = ["" for _ in range(4)]
for _ in problems:
lst = _.split(" ")
try:
i = int(lst[0]) + int(lst[2])
except:
return "Error: Numbers must only contain digits."
e = 1
break
if len(lst[0]) > 4 or len(lst[2]) > 4:
return "Error: Numbers cannot be more than four digits."
e = 1
break
if len(lst[0]) >= len(lst[2]):
gensize = len(lst[0]) + 2
else:
gensize = len(lst[2]) + 2
sign = lst[1]
if sign != "-" and sign != "+":
return "Error: Operator must be '+' or '-'."
e = 1
break
if show == True:
for x in range(4):
string = ""
if x == 0:
string = " " * (gensize - len(lst[0])) + lst[0]
elif x == 1:
string = sign + " " * (gensize - len(lst[2]) - 1) + lst[2]
elif x == 2:
string = "-" * gensize
elif x == 3:
if sign == "-":
string = " " * (gensize - len(str(int(lst[0]) - int(lst[2])))) + str(int(lst[0]) - int(lst[2]))
elif sign == "+":
string = " " * (gensize - len(str(int(lst[0]) + int(lst[2])))) + str(int(lst[0]) + int(lst[2]))
arranged_problems[x] += string + " " * 4
elif show == False:
for x in range(3):
if x == 0:
string = " " * (gensize - len(lst[0])) + lst[0]
elif x == 1:
string = sign + " " * (gensize - len(lst[2]) - 1) + lst[2]
elif x == 2:
string = "-" * gensize
arranged_problems[x] += string + " " * 4
a = ""
for _ in arranged_problems:
a += _[:-4] + "\n"
a[:-2]
return a
break
```

**Your browser information:**

User Agent is: `Opera (Windows 10.; Win64; x64) `

**Challenge:** Arithmetic Formatter

**Link to the challenge:**