Hello,

I have completed the Arithmetic Formatter project but when I run it it gives me an error; /home/runner/boilerplate-arithmetic-formatter/venv/bin/python3: line 3: exec: : not found. I think its referencing the “from pytest import main” in main.py. It had previously given me an error; “pytest not found”. I hope it is just this and not a problem with my code. Please help me with what the problem is really so I can continue with the test.

**I read that you have to remove and reinstall pytest in the boilerplater-arithmetic-formatter repo but I’m not sure how to do this. When I type; pip install pytest, in the shell command I get; /home/runner/boilerplate-arithmetic-formatter/venv/bin/python3: line 3: exec: : not found.

**Your code so far**

def arithmetic_arranger(problems, cond = False):

if len(problems) > 5:

return(“Error: Too many problems.”)

```
foper = list()
soper = list()
oper = list()
rslt = list()
fline = str()
sline = str()
tline = str()
rline = str()
#Splitting the operands
for problem in problems:
problem.lstrip()
problem.rstrip()
sproblem = problem.split()
if len(sproblem[0] > 4 or sproblem[2] > 4):
return("Error: Numbers cannot be more than four digits")
if not (sproblem[1] == '+' or sproblem[1] == '-'):
return("Error: Operator must be '+' or '-'.")
foper.append(sproblem[0])
oper.append(sproblem[1])
soper.append(sproblem[2])
#The arithmetic operations
counter = 0
while counter < len(problems):
try:
x = int(foper[counter])
y = int(soper[counter])
except:
return("Error: Numbers must only contain digits")
if oper[counter] == '+':
rslt.append(str(x + y))
elif oper[counter] == '-':
rslt.append(str(x - y))
#finding length of longest operand
length = max(len(foper[counter]), len(soper[counter]))
#first line
for val in range((length + 2) - len(foper[counter])):
foper[counter] = ' ' + foper[counter]
fline = fline + foper[counter] + ' '
#second line
for val in range((length + 1) - len(soper[counter])):
soper[counter] = ' ' + soper[counter]
sline = sline + oper[counter] + soper[counter] + ' '
#third line
for val in range(length + 2):
tline = tline + '-'
tline = tline + ' '
#result line
for val in range((length + 2) - len(rslt[counter])):
rslt[counter] = ' ' + rslt[counter]
rline = rline + rslt[counter] + ' '
counter = counter + 1
#final output
fline = fline.rstrip()
sline = sline.rstrip()
tline = tline.rstrip()
rline = rline.rstrip()
if cond == False:
arranged_problems = fline + '\n' + sline + '\n' + tline
elif cond == True:
arranged_problems = fline + '\n' + sline + '\n' + tline + '\n' + rline
return arranged_problems
```

**Your browser information:**

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0`

**Challenge:** Scientific Computing with Python Projects - Arithmetic Formatter

**Link to the challenge:**