Scientific Computing with Python Projects - Arithmetic Formatter

Tell us what’s happening:
For the last two tests, when I compare the output from my code and the expected output, it seems to be exactly the same but the test fails.

Your code so far

Your browser information:

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

Challenge: Scientific Computing with Python Projects - Arithmetic Formatter

Link to the challenge:

Hey @bigballernation, I looked through your code in Replit and VScode. When I run any test case and set boolean == True, the output is None. When I run the test cases and set boolean == False, the output returns perfectly fine.

I was able to find a minor bug and it worked just fine after correcting it. Go back to your code and find out why the function returns None when boolean == True and why it returns normally when boolean == False. You should pass all the tests if you can fix the issue.

Also, it’s a good idea to utilize the main.py folder (if you weren’t already doing so) and tweak the inputs given to the arithmetic_formatter() function. The output that you see in Replit comes straight from the input given in that folder. If you set boolean to True in the function found in main.py, you should be able to visualize what I was explaining above.

Thank you so much! I just realised what was wrong with my code and have completed the challenge.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.