Python - probability calculator runtime error

Hi, I am starting to code this project but see the following error on the console when I hit run:
File “”, line 3
This is the boilerplate for the Probability Calculator project. Instructions for building your project can be found at
SyntaxError: invalid syntax

However, if I use the debugger I can step through the program as expected.

Any ideas why this is happening?



When you first loaded the replit starter, you accidentally specified for the run command to be the file. Basically, you did not follow the instructions:

  • Start by importing the project on Replit.
  • Next, you will see a .replit window.
  • Select Use run command and click the Done button.

The last part is what you did not do. The easiest fix is to copy your code into a new starter template and make sure you do that last instruction.

Thanks Randall! Sorry for not following the instructions

Instead of starting a whole new replit, you can simply:
-in the file pane on the left, to the right of the new file & new folder buttons, click the vertical … button to show more options, choose ‘show hidden files’
-now edit the .replit file’s first line to:

run = “python3”

yours probably instead says the following if you accidentally clicked the wrong one at the start:

run = “python3”

Thanks Caius,

Good to know, I figured there must be a way to change the starting file.


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