Is there any reason code would work in VS Code but not Replit?

I’m doing the first project in the Scientific Computing with Python certification, formatting the arithmetic. I’ve been working on it in VS Code so that I didn’t need to be online. It works perfectly, with several different inputs, although I’m sure the coding is clumsy. In Replit, however, it is failing 8 out of the 10 tests. At first I thought it was because I had trailing whitespace that the tester wasn’t expecting, but when I fixed that up it still failed.
Is there any reason code would work in one text editor/IDE, but not another?

If not, then it’s probably a formatting issue. I’ll look more carefully over the tests as well.

It’s probably a formatting issue. That’s 98% of the issues with passing those tests once the output looks correct.

Yeah, I know it is frustrating, but often when learners say “it is working locally”, they mean that they aren’t looking closely enough. Computers are veeerrrry picky. They can’t think like us so we need to learn to think like them.

Read the fail messages very closely - they often have valuable clues. If you still can’t figure it out, post a link to the replit and someone will give you some clues.

1 Like

What I thought. Annoying. I’ll look more closely at the tests and see what formatting they’re looking for.

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