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 “README.md”, line 3
This is the boilerplate for the Probability Calculator project. Instructions for building your project can be found at https://www.freecodecamp.org/learn/scientific-computing-with-python/scientific-computing-with-python-projects/probability-calculator
^^^^^^^^^^^
SyntaxError: invalid syntax

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

Any ideas why this is happening?

thanks,

Mike

When you first loaded the replit starter, you accidentally specified for the run command to be the README.md 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

It is easy to skip over that detail.

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 main.py”

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

run = “python3 readme.md”

Thanks Caius,

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

Mike