Welcome! This is a simple Python project template designed to help you get started with Python programming.
This project contains a basic Python program that prints "Hello World" to the screen. It's the perfect starting point for learning Python!
GitHub Codespaces provides a cloud-based development environment - no local setup required!
-
Clone this template to your account:
- Click the Use this template button on the repository page
- Select Create a new repository
- Name your new repository and click Create repository from template
-
Open in Codespaces:
- Go to your new repository
- Click the green Code button
- Select the Codespaces tab
- Click Create codespace on main
- VS Code will open in your browser with Python ready to use
Prerequisites:
- Docker installed and running on your machine
- VS Code installed
- Dev Containers extension for VS Code
If you prefer to code on your local machine, you can use Docker and VS Code's dev container support:
-
Clone the repository:
git clone https://github.com/YOUR-USERNAME/YOUR-REPO-NAME.git cd python-project-template -
Open in VS Code:
- Open the folder in VS Code
- If you have Dev Containers extension installed, click the blue button in the bottom-left corner
- Select Reopen in Container
- VS Code will build and open the dev container with Python pre-configured
-
What's included:
- Python 3 and pip3
- Git
- All common development tools
- Full VS Code experience
Prerequisites:
- Python 3.8 or higher installed on your machine
- Git installed
- A text editor or IDE (like VS Code, PyCharm, or similar)
Steps:
If you prefer to work without containers:
git clone https://github.com/YOUR-USERNAME/YOUR-REPO-NAME.git
cd python-project-template
python3 main.pyYou should see Hello World printed to your terminal!
You already have this project open in VS Code. The main file is main.py.
To run your Python program, follow these steps:
-
Using VS Code:
- Open the
main.pyfile - Click the Run button (
▶️ ) in the top right corner of the editor - Watch the output appear at the bottom of the screen
- Open the
-
Using the Terminal:
- Open the terminal (View → Terminal, or press Ctrl+`)
- Type the command:
python3 main.py - Press Enter to run the program
You should see the message:
Hello World
Ready to make changes? Try these experiments:
-
Change the message:
- Open
main.py - Replace
"Hello World"with your own message - Example:
print("My name is Sarah")
- Open
-
Print multiple lines:
- Add more
print()statements - Example:
print("Hello World") print("I'm learning Python!") print("This is fun!")
- Add more
-
Do some math:
- Try these commands inside
print():print(5 + 3) print(10 - 2) print(4 * 5)
- Try these commands inside
Here are some useful Python basics to try:
| Command | What it does | Example |
|---|---|---|
print() |
Display text or values | print("Hello") |
+ |
Add numbers | print(2 + 3) |
- |
Subtract numbers | print(10 - 4) |
* |
Multiply numbers | print(3 * 7) |
/ |
Divide numbers | print(20 / 4) |
Once you're comfortable with the basics, try:
- Creating variables to store information
- Using input() to get text from the user
- Writing if statements to make decisions
- Using loops to repeat actions
- Creating functions to organize your code
✅ Run your code often - Test changes as you make them
✅ Start small - Write one line, test it, then add more
✅ Read error messages - They tell you what went wrong
✅ Experiment - Try new things and see what happens
✅ Ask questions - Reach out to your instructor if you get stuck
- Check the Python Official Documentation
- Visit Python.org for more resources
- Ask your instructor or a classmate
- Use the VS Code integrated help features
python-project-template/
├── main.py # Your main Python program
├── README.md # This file - documentation
└── (add more files as your project grows)
Happy coding! 🐍