GitHub Codespaces + VS Code: Hello World Python

Run Python without installing anything on your laptop

GitHub Codespaces lets you open a complete development environment directly in your browser. It feels like VS Code, but runs on GitHub’s cloud machines.

For beginners, classrooms.

Step 1: Create a GitHub Repository

  1. Login to GitHub
  2. Click New Repository
  3. Name it python-codespace-hello
  4. Select Add README
  5. Click Create repository
📷– Creating a new GitHub repository Create repo placeholder Create repo placeholder Create repo placeholder Create repo placeholder

Step 2: Create a Codespace

  1. Open your repository on GitHub
  2. Click the green <> Code button
  3. Switch to the Codespaces tab
  4. Click Create codespace on main
📷 – Create Codespace button Create codespace placeholder Create codespace placeholder Create codespace placeholder Create codespace placeholder
📎 Dummy link: Creating a GitHub Codespace

Step 3: Create hello.py

Inside Codespaces, create a new file named hello.py and write your first Python program:

print("Hello, World! 👋")
print("Welcome to Python on GitHub Codespaces")
📷 Dummy Image – Writing hello.py in VS Code hello.py placeholder hello.py placeholder hello.py placeholder hello.py placeholder hello.py placeholder hello.py placeholder hello.py placeholder

Step 4: Run the Program

Open the terminal and run:

python hello.py
📷 Dummy Image – Terminal output Hello World hello.py placeholder
If python doesn’t work, try:
python3 hello.py

What’s Next?

  • Input & Output programs
  • Conditions and loops
  • Mini Python projects
  • NLP and libraries (NLTK, pandas)