Using Replit for Python Programming
Step‑by‑step lab guide · CS 165
- Create your Replit account – Sign up for a new account on the Replit platform.
- Log in to your Replit account – Access your dashboard by signing in with your credentials.
- Start a new Python project – From the left-hand menu, select either Import Code or Design to begin.
-
Set up an empty project –
Choose the Empty tab, then click Create Empty Project.
Replit will generate a random project name by default. To rename it, click on the project name located at the top left corner.
In the Edit Project Details window, change the name to python_lab1 and click Save Changes.
-
Open the file tree – Click the library symbol (book icon) in the top right corner. Under the File tree section, click the three dots (…) and select New File.
- Name the new file – Enter main.py as the filename and confirm.
-
Copy the lab code – Navigate to the following URL to access the provided main.py code:
https://www.labs.cs.uregina.ca/165/intro_lab1/index.html#need
Copy the code and paste it into the Replit editing area.
- Open the Shell terminal – Click the + icon to add a new Shell panel.
-
Run the Python script – In the terminal, at the ~/workspace$ prompt, type:
~/workspace$ python main.py
If prompted to install Replit's Python tools, enter y and press Enter.
You should then see the output:
Hello everyone!
Have fun learning Python.
~/workspace$
The process completes with the terminal returning to the ~/workspace$ prompt.
✅ Tip: If you encounter any permission prompts or tool installation dialogs, simply follow the on‑screen suggestions (typically enter y to confirm). Replit will handle the environment setup automatically.