📝 Overview
Before writing complex Python programs, you need two tools:
-
Python itself
-
A code editor or IDE (Integrated Development Environment) to write and run your code
This lesson walks you through installing Python and setting up your first IDE so you can start coding!
🎯 What You’ll Learn
-
How to download and install Python on your system
-
How to choose and set up a code editor (IDE)
-
How to run your first
.py
file locally or online
🧑💻 Step 1: Install Python
-
Visit the official site: https://www.python.org/downloads
-
Click Download Python [version]
-
Run the installer
-
Make sure to check the box:
✅ “Add Python to PATH” -
Click Install Now
✅ Python is now installed on your system!
🧪 How to Check If Python is Installed
Open your Command Prompt (Windows) or Terminal (Mac/Linux) and type:
Expected Output:
If you see a version number, Python is working!
🧰 Step 2: Set Up Your IDE (Code Editor)
You can use any of the following:
✅ Recommended Editors:
IDE | Notes |
---|---|
VS Code | Lightweight, extensions, beginner-friendly |
Thonny | Simple and made for beginners |
PyCharm | Full-featured IDE for bigger projects |
🚀 Running Your First Python File
-
Open your IDE (e.g., VS Code or Thonny)
-
Create a new file:
hello.py
-
Type this code:
-
Save and run the file
You should see:
💡 Online Option (No Install Needed)
Don’t want to install anything yet? Try coding in:
Just paste your code and click Run.
✅ Lesson Summary
-
You’ve installed Python on your computer
-
You’ve set up your first Python code editor (IDE)
-
You successfully ran a Python file from your system or online
⏭️ Next Lesson Preview
→ Variables, Data Types & Operators