
📎 This article includes 2 downloadable practice files ↓
In this article
Python is free, runs on any computer, and you can write something useful in your first hour. This lesson gets it installed and running, which is honestly the hardest step for most beginners.
Install on Windows
- Go to python.org › Downloads and get the latest Python 3 (3.12 or newer). The Microsoft Store version also works.
- Run the installer and tick “Add python.exe to PATH” on the first screen. This is the step everyone misses.
- Click Install Now.
- Open Command Prompt or PowerShell and type
python --version. You should see “Python 3.12.x”.
On Mac, install from python.org and use python3 instead of python.
An editor: VS Code
Install Visual Studio Code (free), then the Python extension from Microsoft. Open a folder (File › Open Folder), create lesson-01.py, and click the ▶ button to run. IDLE, which comes with Python, is fine for first steps too.
Your first program
print("Hello from Python!")
print("2 + 3 =", 2 + 3)
print("GST on 1000 at 18% is", 1000 * 18 / 100)
Save it and run from the terminal in that folder:
python lesson-01.py
The interactive prompt
Type python with no file name and you get >>>. Type 12 * 60 and press Enter: 720. It’s a calculator and a place to test ideas. Type exit() to leave.
Installing packages
Python’s power is in packages. Lessons 8-12 need two:
pip install pandas openpyxl
If pip isn’t found, use python -m pip install pandas openpyxl.
Where beginners go wrong
| Problem | Fix |
|---|---|
| ‘python’ is not recognized | Reinstall with “Add to PATH” ticked, or use py on Windows |
| Typing print(…) into the terminal, not the prompt | Run python first, or put code in a .py file |
| Saving as lesson.py.txt | Turn on file extensions in Explorer |
| Spaces in folder names causing trouble | Use a simple folder like C:\python-course |
Practice
Download the script (and data file, if listed) below into one folder. Open a terminal in that folder and run python lesson-NN.py. Compare with the expected output, then change something and run it again: that’s how Python is learned.
📎 Practice files for this article
- 🐍Lesson 1 scriptThe complete script from this lesson, tested.⬇ PY · 211 B
- 📄Expected outputWhat the script prints when you run it.⬇ TXT · 92 B
Free to use for learning. Files with macros (.bas) are plain text — import them with Alt+F11 → File → Import File, and always test on a copy.
Stuck on a step? Ask a question and the AI answers using this article.