What is Python?
Python is a programming language — a way to give instructions to a computer. It reads almost like English, which makes it perfect for beginners.
Python is used in: data analysis, machine learning, web development, finance, automation, and much more.
What is Data Analysis?
Data Analysis means examining data to find useful answers — like "Which product sells the most?" or "What month had the highest revenue?"
Python makes this easy with powerful libraries: Pandas, NumPy, and Matplotlib.
Why Python for Data?
- ✅ Free and open source
- ✅ Used by Google, Netflix, NASA, banks, hospitals
- ✅ Millions of developers worldwide
- ✅ Thousands of ready-made libraries
- ✅ Easiest language to learn and read
What is Anaconda?
Anaconda is a Python distribution that comes with 300+ pre-installed data science libraries. It's the easiest way to get started — no manual installation needed.
Installation Steps
- Go to anaconda.com/download
- Choose your OS (Windows / Mac / Linux)
- Download the installer and run it
- Click Next until installation is complete
- Open Anaconda Navigator from the Start menu
What's Included?
Keeping Packages Updated
What is Jupyter Notebook?
Jupyter Notebook is an interactive coding environment that runs in your browser. You write code in cells and see results instantly below each cell — perfect for data analysis.
How to Open Jupyter
- Open Anaconda Navigator
- Click Launch under Jupyter Notebook
- Your browser opens at
localhost:8888 - Click New → Python 3 (ipykernel)
Essential Keyboard Shortcuts
Cell Types
Code cells — run Python code and show output.
Markdown cells — write formatted text, headings, and notes using simple symbols.
Hello, World!
Working with Numbers
Getting User Input
Multiple Values in One Print
Errors Are Normal
Every programmer — beginner to expert — sees errors constantly. The skill is reading the error message to understand what went wrong and fix it quickly.
The 5 Most Common Errors
How to Read Error Messages
- Look at the LAST line — it says WHAT went wrong
- Look at the arrow (^) — it shows WHERE
- Read the line number — it tells you exactly where
try / except — Handle Errors Gracefully
Variable Naming Rules
All Arithmetic Operators
Comparison & Logical Operators
Assignment Operators
What is a Virtual Environment?
A virtual environment is an isolated Python workspace. Each project gets its own packages — no conflicts between projects.
Creating a Virtual Environment
Installing Packages with pip
Conda vs pip
Why VS Code?
VS Code is a free, powerful code editor by Microsoft. Many professionals prefer it over Jupyter for writing larger Python files and projects.
Setup VS Code for Python
- Download from code.visualstudio.com
- Install the Python extension by Microsoft
- Install the Jupyter extension to run notebooks
- Press Ctrl+Shift+P → "Select Python Interpreter" → choose your conda env
Essential VS Code Shortcuts
Running Python Files
Ways to Run Python
Python Script Structure
Command Line Arguments
Why Style Matters
Clean code is easier to read, debug, and share. Python has an official style guide called PEP 8.