🔄 Quick Recap (Day 1)

  • You met your instructor and learned his journey leading to Python.

  • You discovered why the project is called “Digital Mago” (Digital Wizard) and how the 30-day challenge flows.

  • You defined your personal goals, schedule, and milestones for this journey.

🎯 What You’ll Learn Today

  1. Installing Python 3 on your operating system.

  2. Installing VS Code and the Python extension.

  3. Creating your first Python script and running it in VS Code.

📖 Why Install Python & VS Code?

Python 3 is the foundation—you need the interpreter to run your code. VS Code, with its integrated terminal and extensions, streamlines editing, running, and debugging scripts. Setting these up correctly ensures a smooth experience as you progress through the challenge.

Choosing Python 3

  • Version: Always install the latest stable Python 3 release (e.g., 3.11+).

  • PATH: On Windows, adding Python to your PATH lets you run python from any terminal.

  • macOS/Linux: Python 3 is often preinstalled, but updating to the latest version is recommended.

Why VS Code?

  • Lightweight: Fast startup and low memory usage.

  • Extensions: Python extension by Microsoft provides linting, IntelliSense, and debugging.

  • Integrated Terminal: Run code without leaving the editor.

🛠️ Hands-On: Install & Verify Your Setup

1. Install Python 3

  • Windows: Download installer from the Python website.

    • During install, check “Add Python to PATH.”

  • macOS: Use Homebrew (brew install python) or download the installer from the Python website.

  • Linux (Debian/Ubuntu): Open Terminal and run:

    sudo apt update
    sudo apt install python3
  • Linux (Fedora/CentOS/RHEL): Open Terminal and run:

    sudo dnf install python3      # Fedora
    sudo yum install python3      # CentOS/RHEL

After installation, open a terminal (Command Prompt, PowerShell, or VS Code terminal) and run:

python --version

You should see something like:

Python 3.11.2

2. Install VS Code & Python Extension

  1. Open VS Code, click the Extensions icon (📦), search for Python, and install the Python extension by Microsoft.

  2. Restart VS Code if prompted.

3. Create & Run Your First Script

  1. In VS Code, open your project folder (learn-python-30).

  2. In the Explorer, click New File, name it hello.py.

  3. Add the code:

    print("Setup complete! Hello, Digital Mago!")
  4. Save the file, then in the VS Code terminal run:

    python hello.py
  5. Confirm you see:

    Setup complete! Hello, Digital Mago!

🧙‍♂️ Take the Wand and Try Yourself

  1. Verify your installation by creating and running a one-line script check_version.py:

    import sys
    print(f"Python version: {sys.version}")
    • When you run:

      python check_version.py

      you should see something like:

      Python version: 3.11.2 (or your installed version)
  2. Modify your hello.py script:

    • Change the message inside print() to introduce yourself:

      print("Hello, I'm Alice and I've installed Python!")
    • Add another print() line that says:

      print("Day 2 complete!")
  3. Run your updated script:

    python hello.py
    • Expected output:

      Hello, I'm Alice and I've installed Python!
      Day 2 complete!

Once you see these correct outputs, your setup is confirmed, and you’re ready for Day 3: Hello World & Basic Syntax!

Keep Reading