Set up the Replit online editor - IncrediCoders/Python1 GitHub Wiki

Set up your Replit and GitHub accounts

To create a Replit account, go to Replit.com and click the sign-up button. It will ask you for your email and a unique username and password for the site.

Once logged into your account, you're going to fork the replit we set up:

  1. Click the replit link: https://replit.com/@Incredicoders/IncrediCoders-Template.
  2. Click the green Fork button on the upper right.
  3. Click the blue Fork Repl button on the lower-right corner of the pane. It will say it's forking. Welcome to your new Replit workspace!

The forked replit includes the Pygame template (with all the library modules loaded).

How to run the games

If you're a Windows user, we have the EXE files ready for you to download and run at [link to the Run the games page].

If you're using Mac or Linux, you can run the games from Replit (or if you're a Windows user who wants to use Replit instead of Visual Studio Code or don't want to download the EXE files).

In Replit, navigate to the level you would like to run, and find the file ending with "_Solution.py" (for example, ClassroomQuiz_Solution.py for Level 3).

[Image of the folders and the solution file highlighted or pointed to with an arrow.]

Click the Shell tab on the top of the screen, and then navigate to the folder that your solution file is in. To navigate to the folder of the level, type "cd (Level#)" without the parentheses. (For example, type cd Level3 in the Shell.) The commands are case sensitive, so "cd" is lowercase "Level3" is uppercase with no space in "Level3". We're running level 3 in this example.

It should look like this:

image

Press Enter, and you should now see that the Shell directory changes to Level 3:

image

You are now operating in the Level 3 folder! To run the file, type python ClassroomQuiz_Solution.py in the Shell. It's also case sensitive, so make sure the capitalization is accurate.

It looks like this:

image

Press Enter, and you should see the game running in the Output tab. If you do not see the Output tab next to your Shell tab, you can create an output tab by clicking the "+" symbol and selecting the Output tab in the list. It is also possible that the Output tab might not load when you run the game. If this is the case, press the Refresh Connection button, refresh the page in your browser, OR close the Output tab and reopen it, and then rerun the command above.

Here's an example of what the game looks like when you run it:

image

Congratulations! You should be able to run the game now!

Navigate the folders

Replit makes it very easy to move between folders. You'll find the GitHub repo's folder structure on the left pane of the Replit interface.

Next Steps

If you have any questions, ideas, or issues with this level, then please let us know by creating a GitHub Issue.

Otherwise, when you're done setting up, head over to our Level 1 Online Resources.