📦 Installation

Installation: Step 1: Download and Install Python 3 Windows users: If you forget to check "Add Python to PATH", the `python` command won't work in the terminal.

Step 1: Download and Install Python 3

Windows users: If you forget to check "Add Python to PATH", the `python` command won't work in the terminal. Re-run the installer and choose "Modify", then check PATH.

Step 2: Verify Installation

Micro Lab: Python coding practice

Replace the TODO line with the critical line from the expected solution. This is not a real runtime; the goal is to reinforce writing the correct structure in a controlled way.

Step 3: Virtual Environments (Critical!)

A virtual environment is an isolated Python installation for your project. It prevents dependency conflicts between projects. Project A needs requests==2.28 but Project B needs requests==2.31? Virtual environments solve this.

Always create a venv for every new project. Add the `venv/` folder to .gitignore — never commit it.

Step 4: requirements.txt Pattern

Step by Step: Python coding practice

Read inputs and data types

Complete the critical line with the smallest change

Run the code and compare expected output

If it fails, read traceback or assertion message

Installation steps

  1. Go to python.org/downloads and download the latest Python 3.x (NOT Python 2)
  2. Windows: Run the installer — CRITICAL: check "Add Python to PATH" before clicking Install!
  3. Mac: Use the .pkg installer from python.org, or: brew install python3
  4. Linux (Ubuntu/Debian): sudo apt update && sudo apt install python3 python3-pip