**Tell us what’s happening:**

Describe your issue in detail here.

Hi everyone.

I don’t really know what is wrong with my code. It seems to work locally however, I am failing all the tests. Could someone help me to identify why I am failing the tests. Below is my code

**

```
def arithmetic_arranger(problems, show = False):
""" This function receives a list of strings that are arithmetic problems and returns the problems arranged vertically and side-by-side.
parameters
problems : a list of strings that are arithmetic problems
"""
# variable names
first_line = ""
second_line = ""
dash_line = ""
result_line = ""
# Situations that will return an error
if len(problems) > 5:
return print("Error: Too many problems.")
for string in problems:
operand1 = string.split()[0]
operand2 = string.split()[2]
operator = string.split()[1]
if (operator != "-") & (operator != "+"):
return print("Error: Operator must be '+' or '-'.")
if (not operand1.isdigit()) | (not operand2.isdigit()):
return print("Error: Numbers must only contain digits.")
if (len(operand1) > 4) | (len(operand2)) > 4:
return print("Error: Numbers cannot be more than four digits.")
dash_len = max(len(operand1), len(operand2)) + 2
result = eval(string)
# Conversion in case of correct format supplied by the user
first_line = first_line + " " * (dash_len - len(operand1)) + operand1 + " " * 4
second_line = second_line + operator + " " * (dash_len - 1 - len(operand2)) + operand2 + " " * 4
dash_line = dash_line + "-" * dash_len + " " * 4
result_line = result_line + " " * (dash_len - len(str(result))) + str(result) + " " * 4
first_line = first_line[:-4] # This is the line of upper operands including spaces
second_line = second_line[:-4] # This is the line of lower operands, including the operator and spaces
dash_line = dash_line[:-4] # This is the dashed line below the first two lines. It also includes spaces
result_line = result_line[:-4] # This is the result line to display the evaluation of operations
vert_ops = first_line + '\n' + second_line + '\n' + dash_line
if show:
arranged_problems = print(vert_ops + '\n' + result_line)
return arranged_problems
else:
arranged_problems = print(vert_ops)
return arranged_problems
```

**

**Your browser information:**

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36`

**Challenge:** Arithmetic Formatter

**Link to the challenge:**