Python Getting Started
🐍 Python – Getting Started
Before writing Python programs, you need to:
-
Install Python
-
Set up an editor or IDE
-
Run your first Python program
🧩 Step 1: Install Python
✔ Go to the official website:
👉 https://www.python.org/downloads/ (don’t click here — just for reference)
✔ Download the latest version (recommended: Python 3.x).
✔ During installation, make sure to enable the checkbox:
🔧 “Add Python to PATH”
This makes Python available from the command line.
🧩 Step 2: Choose an IDE / Code Editor
You can write Python code in any editor. Popular choices:
| Editor / IDE | Best For |
|---|---|
| IDLE (comes with Python) | Beginners |
| VS Code | Most recommended |
| PyCharm | Professional development |
| Jupyter Notebook | Data science & Machine learning |
🧩 Step 3: Check Python Version
Open Command Prompt (Windows) or Terminal (Mac/Linux) and type:
or
You’ll see something like:
🧩 Step 4: Run Python
There are two ways to run Python programs:
▶️ Method 1: Using Python Interactive Shell (REPL)
Type:
Then type code:
Output:
▶️ Method 2: Using a .py File
-
Open your editor
-
Type code:
-
Save it as:
first_program.py -
Run it using command:
Output:
🧠 Python File Structure
A Python script normally contains:
✔ Comments
✔ Variables
✔ Logic
✔ Functions
Example:
⚙️ Install Useful Python Packages
Using pip (Python package manager):
🎉 Congratulations!
If you’ve reached here, you’re ready to start programming in Python. 🚀
