EDIT: already solved!
Hi, i made the program from scratch, it runs OK with all conditions given, but the autotests throw that it’s everything wrong.
any thoughts ?
Here is my code, run without autotest and check how it works
boilerplate-arithmetic-formatter - Replit
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36 Edg/99.0.1150.46
Challenge: Arithmetic Formatter
Link to the challenge:
You’re using global variables. This essentially means that your functions can only run once, so whenever you try to use your code more than once, it will fail.
1 Like
Also, you need to return strings, not print them.
1 Like
do you think a simple solutions is to reset them after every use? or do i need to get rid of them?
You should remove the global variables. Variable scope should be as small as possible, as a general rule.
2 Likes
system
Closed
September 27, 2022, 7:33pm
8
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.