# Build an Arithmetic Formatter Project

## any suggestions on how to get format right? everything else should be working.

``````def arithmetic_arranger(agumint,solve):
vlue = []
Num1 = None
Num2 = None
if len(agumint) > 5:
return 'Error: Too many problems.'
else:
for i in agumint:
if '+' in i:
i = str(i)
vlue = i.split(" + ")
Num1 = vlue[0]
Num2 = vlue[1]
Num2 = str(Num2)
try:
Num1 = int(Num1)
Num2 = int(Num2)
except:
return 'Error: Numbers must only contain digits.'
Num1 = str(Num1)
Num2 = str(Num2)
if len(Num1) and len(Num2) > 4:
return 'Error: Numbers cannot be more than four digits.'
break
else:
print(Num1,'\n +',' ',Num2,'\n -----')
if solve == True:
Num1 = int(Num1)
Num2 = int(Num2)
print(Num1+Num2)
else:
pass
if '-' in i:
i = str(i)
vlue = i.split(" - ")
Num1 = vlue[0]
Num2 = vlue[1]
Num2 = str(Num2)
if len(Num1) and len(Num2) > 4:
return 'Error: Numbers cannot be more than four digits.'
break
else:
print(Num1,'\n -',' ',Num2,'\n -----')
if solve == True:
Num1 = int(Num1)
Num2 = int(Num2)
print(Num1-Num2)
else:
pass
if '/' in i:
return "Error: Operator must be '+' or '-'."
break
``````

hi and welcome to the forum.
I’ve edited your post to make sure your code is edited properly for the forum by adding three backticks above and below the code like below:
```
```

You may want to post the output and/or error messages and logs you have so that people know more about what you are needing help with.

Check the console output in the devtools (F12) for a more detailed error message

what am i looking for?

look in the Console area for error messages
try to do some logging as well to debug your code

the first thing I see in the console is

``````python-test-evaluator.ts:177 PythonError: Traceback (most recent call last):
File "/lib/python311.zip/_pyodide/_base.py", line 468, in eval_code
.run(globals, locals)
^^^^^^^^^^^^^^^^^^^^
File "/lib/python311.zip/_pyodide/_base.py", line 310, in run
coroutine = eval(self.code, globals, locals)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<exec>", line 4, in <module>
TypeError: arithmetic_arranger() missing 1 required positional argument: 'solve'
``````

The last line of this is promising on informations given: “arithmetic_arranger() missing 1 required positional”
The instructions say

The function should optionally take a second argument.

You are missing the “optionally” part

giving solve a False as a default value got some stuff to work.