🔄 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
Installing Python 3 on your operating system.
Installing VS Code and the Python extension.
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
pythonfrom 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 python3Linux (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 --versionYou should see something like:
Python 3.11.22. Install VS Code & Python Extension
Download VS Code: https://code.visualstudio.com
Open VS Code, click the Extensions icon (📦), search for Python, and install the Python extension by Microsoft.
Restart VS Code if prompted.
3. Create & Run Your First Script
In VS Code, open your project folder (
learn-python-30).In the Explorer, click New File, name it
hello.py.Add the code:
print("Setup complete! Hello, Digital Mago!")Save the file, then in the VS Code terminal run:
python hello.pyConfirm you see:
Setup complete! Hello, Digital Mago!
🧙♂️ Take the Wand and Try Yourself
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.pyyou should see something like:
Python version: 3.11.2 (or your installed version)
Modify your
hello.pyscript: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!")
Run your updated script:
python hello.pyExpected 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!