Getting Started Lesson 2 of 23
Getting Started with Python — Install and Run Your First Program
Install Python on Windows or Mac, use IDLE and the Python shell, save and run a .py file, and options for phones and school computer labs.
Before writing programs, you need a place to run them. This lesson shows the easiest setups for a home computer, a school computer lab and a phone.
Option 1: Install Python on a computer
- Go to python.org and open the Downloads page. It suggests the right version for your computer.
- Run the installer.
- On Windows, tick "Add python.exe to PATH" on the first screen before clicking Install. This lets you run Python from the command prompt.
- Click Install Now and wait until it finishes.
Check that it works
Open the Command Prompt (Windows) or Terminal (Mac) and type:
python --version
Output
Python 3.13.1
On a Mac, you may need to type python3 instead of python. Any version starting with 3 is fine.
The Python shell
Type python (or python3) and press Enter. You'll see >>>, the Python shell. It runs each line as soon as you press Enter, like a calculator:
>>> 2 + 3
5
>>> 15 * 4
60
>>> print("Kumusta?")
Kumusta?
The shell is great for quick experiments. Type exit() to leave.
IDLE: Python's own editor
Python comes with a simple editor called IDLE. Open it from the Start menu (search "IDLE") or Launchpad.
- Click File → New File.
- Type your program.
- Save it with Ctrl + S as
hello.py. Python files end in .py. - Press F5 (Run → Run Module). The output appears in the shell window.
# hello.py
name = input("What is your name? ")
print("Hello,", name + "!")
print("Welcome to Python. 🐍")
Output
What is your name? Maria Hello, Maria! Welcome to Python. 🐍
The program stops at input() and waits for you to type something and press Enter.
VS Code (for bigger projects)
Many programmers use Visual Studio Code, a free editor from Microsoft. Install it, add the "Python" extension, open your .py file and click the ▶ Run button at the top right. It colors your code, warns about mistakes and helps you type faster.
Running a file from the command line
cd Documents
python hello.py
cd moves into the folder where your file is saved, then python hello.py runs it.
Option 2: No computer? Use your phone
- Android: apps like Pydroid 3 run real Python offline.
- Any phone or tablet: search for an "online Python compiler". These run your code on a website, so you need internet.
Phone keyboards make typing symbols slower, but everything in this course works on them.
Option 3: The school computer lab
If you can't install programs on lab computers, ask your ICT teacher if Python or IDLE is already installed, or use an online editor. Save your .py files to a flash drive or your Google Drive so you can continue at home.
Quick Quiz
Check what you learned. Walang grade ito, practice lang. 🙂
By Sir Reyel · Last updated 2026-12-04