Problem with arithmetic formatter

Tell us what’s happening:

i just started with python, i’m stuck in this problem.
i tried everything i know … please, give me some hints

Your code so far

Your browser information:

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

Challenge: Arithmetic Formatter

Link to the challenge:

At what part exactly are you stuck? What did you try already?

in one case you are returning the arranged numbers instead of the too many mumbers error - maybe check your condition

because in pycharm i have zero error but return 6 failed… i dont know where i’m failing

in one case you are returning the arranged numbers instead of “Too many problems”

what’s the max number of problems?

max number of problems are 5

now everything passes, have you changed anything?


that’s why i dont know where to change the code to pass the exam

(same in pycharm… it gave me 0 error)

if you pass all tests than it’s done

You will want to check every operator for and error by adding the operator check to the for loop. Also your code always returns “Error: Operator…”. For that you might want to try:
if not (operator == "+" or operator == "-"):

thank you
I have added a function for handling errors and now it works