What You Need

You don't need an expensive computer or complicated software. Here's the minimum setup:

Required:

  • A computer (Windows, Mac, or Linux)
  • Internet connection
  • Web browser
  • AI assistant account (free tier works)

Recommended:

  • Code editor (free)
  • GitHub account (free)
  • Python installed (free)

Let's set up each piece.

Choosing Your AI Assistant

You'll use an AI assistant constantly while learning. The main options:

Claude (Anthropic) https://claude.ai

Excellent for explanations and teaching. Strong at understanding context and providing nuanced help. Free tier available.

ChatGPT (OpenAI) https://chat.openai.com

Popular, versatile, good for coding. Free tier available. GPT-4 (paid) is more capable than GPT-3.5 (free).

GitHub Copilot https://github.com/features/copilot

AI that integrates directly into your code editor. Suggests code as you type. Paid, but free for students.

My recommendation: Start with Claude or ChatGPT (free). Add GitHub Copilot later when you're writing more code.

For this book, we'll use Claude in examples, but any capable AI works.

Setting Up Your AI Account

  1. Go to claude.ai or chat.openai.com
  2. Create a free account
  3. Verify your email
  4. You're ready to go

Your First Coding Prompt

Test your setup with this prompt:

I'm setting up my environment to learn programming. Can you confirm you can help me with:

1. Explaining programming concepts
2. Reviewing code I write
3. Helping me debug errors
4. Suggesting what to learn next

Just say yes and give me a simple "Hello World" example in Python.

If you get a helpful response with code, you're set.

Installing a Code Editor

You could write code in Notepad, but you shouldn't. A code editor makes coding easier with:

  • Syntax highlighting (different colors for different code elements)
  • Auto-completion (suggestions as you type)
  • Error detection (problems highlighted before you run code)
  • File management (organizing your projects)

Visual Studio Code (Recommended)

VS Code is free, powerful, and beginner-friendly.

Installation:

  1. Go to https://code.visualstudio.com
  2. Download for your operating system
  3. Run the installer
  4. Open VS Code

Essential Extensions: Once VS Code is open, install these extensions (click the extensions icon on the left sidebar):

  • Python — Python language support
  • Prettier — Code formatting
  • Code Runner — Run code with one click

Optional (Later):

  • GitHub Copilot — AI code suggestions (paid)
  • GitLens — Better Git integration

Other Options

Cursor https://cursor.sh

A VS Code fork with AI built in. Great for beginners. Free tier available.

Replit https://replit.com

Browser-based — no installation needed. Good for trying things quickly. Free tier available.

PyCharm Community https://www.jetbrains.com/pycharm/

Full-featured Python IDE. More complex but powerful. Free.

Verifying Your Editor

  1. Open VS Code
  2. Create a new file (File → New File)
  3. Save it as hello.py
  4. Type: print("Hello, World!")
  5. If you installed Code Runner, click the play button
  6. You should see "Hello, World!" in the output

If this works, your editor is ready.

Installing Python

Python is the best language for beginners — clean syntax, massive community, endless tutorials. We'll use it for examples in this book.

Windows

  1. Go to https://python.org/downloads
  2. Download the latest Python 3.x version
  3. Run the installer
  4. Important: Check "Add Python to PATH" during installation
  5. Complete the installation

Verify by opening Command Prompt (search "cmd") and typing:

python --version

You should see the version number.

Mac

Mac comes with Python, but it might be outdated.

Option 1 — Homebrew (recommended):

# Install Homebrew first if you don't have it:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Then install Python:
brew install python

Option 2 — Direct download: Go to python.org and download the Mac installer.

Verify by opening Terminal and typing:

python3 --version

Linux

Most Linux distributions have Python. Verify with:

python3 --version

If not installed:

# Ubuntu/Debian:
sudo apt update
sudo apt install python3

# Fedora:
sudo dnf install python3

Verifying Python

Create a file called test.py with:

print("Python is working!")

Run it:

python test.py
# or on Mac/Linux:
python3 test.py

If you see "Python is working!" — you're set.

Setting Up Your Workspace

Organization matters as you create more files. Set up a clean workspace:

Create a Learning Folder

Create a folder structure like this:

/coding-learning
  /exercises
  /projects
  /notes

On Windows: Use File Explorer On Mac: Use Finder On Linux: Use your file manager or terminal

Open in VS Code

  1. Open VS Code
  2. File → Open Folder
  3. Select your coding-learning folder
  4. This becomes your workspace

Configure for Python

In VS Code:

  1. Open Command Palette (Ctrl+Shift+P on Windows, Cmd+Shift+P on Mac)
  2. Type "Python: Select Interpreter"
  3. Choose the Python version you installed

Now VS Code knows to use Python for your .py files.

Your AI-Assisted Workflow

Here's how to use AI effectively while coding:

Two-Window Setup

Keep two windows open side by side:

  • Left: VS Code (where you write code)
  • Right: Browser with AI assistant (where you get help)

This lets you quickly move between coding and asking questions.

The Learning Loop

  1. Try something in VS Code
  2. Hit a problem or have a question
  3. Ask the AI (be specific, include your code)
  4. Understand the answer (don't just copy)
  5. Implement yourself in VS Code
  6. Repeat

Template for Asking Code Questions

When you need help, include context:

I'm learning Python. Here's what I'm trying to do:
[Describe your goal]

Here's my code:
[Paste your code]

The problem is:
[Describe what's wrong or what you don't understand]

Can you explain what's happening and help me fix it?

Better questions get better answers.

Quick Reference: Setup Checklist

Before moving on, verify:

  • AI assistant account created and working
  • VS Code (or other editor) installed
  • Python installed and verified
  • Learning folder created
  • First Python file runs successfully

If any step failed, ask your AI assistant:

I'm trying to [what you're trying to do] but [what's happening].

I'm on [Windows/Mac/Linux].

What should I try?

Common Setup Issues

"Python not found" or "command not recognized"

Python isn't in your system PATH.

Windows: Reinstall Python and check "Add Python to PATH" Mac/Linux: Use python3 instead of python

VS Code doesn't recognize Python

  1. Open Command Palette
  2. "Python: Select Interpreter"
  3. If nothing shows, reinstall Python

AI responses seem wrong or unhelpful

Be more specific. Include:

  • Your operating system
  • Exact error messages
  • What you already tried

Environments for Later

As you advance, you'll learn about:

Virtual environments — Isolated Python installations for different projects. Not needed yet.

Git/GitHub — Version control for tracking changes and collaborating. Useful once you're building real projects.

Terminal/Command Line — Direct computer interaction. Helpful but not required for basics.

We'll introduce these when they become relevant. For now, your simple setup is enough.

What's Next

Your environment is ready. Time to actually code.

Chapter 3 introduces core programming concepts — variables, types, logic, loops, and functions — with AI as your tutor. You'll write real code from the start.