Hi’
so i think i’ve done everything right but i keep failing all of the tests on replit although the results are exactly as they should be .
Your code so far
boilerplate-arithmetic-formatter - Replit
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Edg/116.0.1938.76
Challenge: Scientific Computing with Python Projects - Arithmetic Formatter
Link to the challenge:
You should not print the errors. As soon as you encounter an error condition, you need to return the error string.
Also, it looks like you are adding extra spaces at the end of each line.
run = “run = python3 main.py”
This line in .replit
should just be:
run = “python3 main.py”
1 Like
thank you so much
i just passed 4 of the test that are probably related to errors; but i still am failing 6 of them
As Jeremy mentioned you have some extra spaces at the end of your lines:
AssertionError: Expected different output when calling "arithmetic_arranger()" with ["3801 - 2", "123 + 49"]
' 3801 123 \n- 2 + 49 \n------ ----- \n'
' 3801 123\n- 2 + 49\n------ -----'
First it shows your output, then the expected output. You can see how you have extra space between 123
and \n
1 Like
oh so thats why it didn’t work, i just gave up on that and used the shell window instead, which does the same job.
thank you for that.
1 Like
oh, thats because i put 4 spaces at the end of all the problems, i should remove the last one.
thanks
2 Likes
Hi! I have the same error to run the test, when I add that command on the shell I just receive this error there is not matter what I choose:
run = python3 main.py
run: command not installed. Multiple versions of this command were found in Nix.
Select one to run (or press Ctrl-C to cancel):
Adding run to replit.nix
success
/nix/store/cyacznw8hx0glvj9l48hm390n0vxwx17-run-0.11.2
run: ERROR: runfile ‘Runfile’ not found: please create the file or specify an alternative.
This line goes in the .replit
file. You might need to enable show hidden files
to see it.
You can replace that run =
line.
system
Closed
April 14, 2024, 12:35am
10
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.