Hey there, I’m relatively new to coding (<1year) and learned Python just recently. So last weekend I wrote the first Challenge (arithmetic formatter) in VSCode and everything works fine. However when I copy it into the Repl:.it it gives me a bunch of errors. I’ve tried to figure out how to fix it, but i think it’s fair to say that i’m officially stuck and not sure what what I’m doing wrong. Here is my code which works fine in my VSCode app.

```
def arithmetic_arranger(myList, arg = False):
firstList = []
secondList = []
thirdList = []
fourthList = []
if len(myList) > 5:
print("Error: Too many problems.")
else:
for each in myList:
eachNum = each.split(" ")
# print("Equation:", eachNum)
firstNum = eachNum[0]
secondNum = eachNum[2]
operator = eachNum[1]
# print("Operator:",operator)
#checking in operand are integer:
if firstNum.isdigit() == False:
print("Error: Numbers must only contain digits.")
quit()
elif secondNum.isdigit() == False:
print("Error: Numbers must only contain digits.")
quit()
numWidth = 0
if len(firstNum) + 2 >= len(secondNum) + 2:
numWidth = len(firstNum) + 2
elif len(firstNum) + 2 <= len(secondNum) + 2:
numWidth = len(secondNum) + 2
# print("Length of first element:", len(firstNum), "Length of complete firstLine:", len(firstNum) + 2)
# print("Length of second element:", len(secondNum), "Length of complete secondLine:", len(secondNum) + 2)
# print("Therefore numWidth is:", numWidth, "blocks long (spaces included)")
if numWidth > 6:
print("Error: Numbers cannot be more than four digits.")
quit()
#firstLine:
#spaceCount firstList
spaceFirstList = []
# print(numWidth - (len(firstNum) + 2), "spaces need to be created on the firstLine.")
for eachSpace in range(numWidth - (len(firstNum) + 2)):
spaceFirstList.append(" ")
#printing firstList
firstList.extend([" "])
firstList.extend(spaceFirstList)
firstList.extend([firstNum, " "])
#secondLine:
#spaceCount secondList
spaceSecondList = []
# print(numWidth - (len(secondNum) + 2), "spaces need to be created on the secondLine.")
for eachSpace in range(numWidth - (len(secondNum) + 2)):
spaceSecondList.append(" ")
#printing secondList
secondList.extend([operator, " "])
secondList.extend(spaceSecondList)
secondList.extend([secondNum, " "])
#thirdLine:
for eachSpace in range(numWidth):
thirdList.append("-")
thirdList.extend([" "])
#fourthLine [Answer]:
if arg == True:
if operator == "+":
answer = int(firstNum) + int(secondNum)
# print("The sum of equation is:", answer, "and it's length:", len(str(answer)))
elif operator == "-":
answer = int(firstNum) - int(secondNum)
# print("The diff of equation is:", answer, "and it's length:", len(str(answer)))
else:
print("Error: Operator must be '+' or '-'.")
quit()
spaceFourthList = []
for eachSpace in range(numWidth - len(str(answer))):
spaceFourthList.append(" ")
fourthList.extend(spaceFourthList)
fourthList.extend([str(answer)])
# else:
# print("arg is not set to True, therefore no answer is displayed.")
fourthList.extend([" "])
# print("reloop", "\n", "\n")
#Complete Lists
# print("\n", "FirstLine: ",firstList)
# print("\n", "SecondLine: ",secondList)
# print("\n", "thirdLine: ",thirdList)
# print("\n", "fourthLine: ",fourthList)
#String maker + space/"-" remover at end of string
firstString = "".join(firstList).rstrip(" ")
secondString = "".join(secondList).rstrip(" ")
thirdString = "".join(thirdList).rstrip(" ")
fourthString = "".join(fourthList).rstrip(" ")
#Final product
return_statement = firstString + "\n" + secondString + "\n" + thirdString + "\n" + fourthString
print(return_statement)
arithmetic_arranger(["24 + 8525", "301 - 2", "45 + 43", "123 + 49"],True)
```