I’ve just finished the first project in the scientific computing with python course. My program completely fills the brief and works fine as far as I can tell. However, when I run it through the test module, I fail at every single check. I’m assuming this is because I’ve done the project differently than they’ve expected. Is there a way to salvage this, or do I need to start from scratch?

**Code so far**

```
def arithmetic_arranger(*args):
#Assigns the list of problems into a variable
problems = args[0]
# print(problems[0].isnumeric())
arranged_problems = ""
#Returns an error if there are * or / operators
for problem in problems:
if ("*" in problem or "/" in problem):
raise ValueError("Error: Operator must be '+' or '-'.")
#Returns an error if more than 5 problems
if len(problems) > 5:
raise ValueError("Error: Too many problems.")
#Splits each problem into 3 elements
for i in range(len(problems)):
problems[i] = problems[i].split(" ")
#For loop that raises errors
for i in range(len(problems)):
#Raises an error if any characters within operons arn't numeric
if problems[i][0].isnumeric() == 0 or problems[i][2].isnumeric() ==0:
raise ValueError("Error: Numbers must only contain digits.")
#Raises an error if any of the operons are more than 4 characters long
if len(problems[i][0]) > 4 or len(problems[i][2]) > 4:
raise ValueError("Error: Numbers cannot be more than four digits.")
#Code used to display the operations
#Calculating length of largest operon for each problem
largest_list = []
for i in range(len(problems)):
if len(problems[i][0]) > len(problems[i][2]):
largest_list.append((len(problems[i][0]), 1))
else:
largest_list.append((len(problems[i][2]), 2))
#First line
for i in range(len(problems)):
for size in range(largest_list[i][0] + 2 - len(problems[i][0])):
arranged_problems += ' '
arranged_problems += problems[i][0] + ' '
arranged_problems += '\n'
#Second line
for i in range(len(problems)):
arranged_problems += problems[i][1] + ' '
for size in range(largest_list[i][0] - len(problems[i][2])):
arranged_problems += ' '
arranged_problems += (problems[i][2] + ' ')
arranged_problems += '\n'
#Dashes
for i in range(len(problems)):
for i in range(largest_list[i][0] + 2):
arranged_problems += '-'
arranged_problems += ' '
#Prints the answer if 2nd arguement is "True"
if args[-1] == True:
arranged_problems += '\n'
for i in range(len(problems)):
#Addition
if problems[i][1] == "+":
answer = int(problems[i][0]) + int(problems[i][2])
#Subtraction
elif problems[i][1] == "-":
answer = int(problems[i][0]) - int(problems[i][2])
#ValueError due to incorrect operator
else:
raise ValueError(F"{problems[i][1]} isn't an accepted operator.")
#Print answer
for size in range(largest_list[i][0] + 2 - len(str(answer))):
arranged_problems += ' '
arranged_problems += str(answer) + ' '
return arranged_problems
```

**Challenge:** Arithmetic Formatter

**Link to the challenge:**