Environment Setup

What It Is

Your coding environment is the software you use to write and run code. In this course, we use Cursor — a modern code editor with built-in AI assistance — along with Python, the programming language we'll be learning.

Why We Use It

Professional developers use code editors every day. Cursor gives you:

  • A clean space to write code with helpful features like syntax highlighting
  • An integrated terminal to run your programs without leaving the app
  • AI assistance to help you learn and debug

Think of it like how sports analysts use specialized software to break down game film — you need the right tools to do the job well.

How to Set Up

Step 1: Download and Install Cursor

  1. Go to cursor.com
  2. Click the download button for your operating system (Mac or Windows)
  3. Open the downloaded file and follow the installation prompts
  4. Launch Cursor when installation is complete

Step 2: Verify Python Is Available

Cursor works with Python, which should already be available on most computers. Let's verify:

  1. Open Cursor
  2. Open the terminal using View > Terminal (or Cmd + ~ on Mac, Ctrl + ~ on Windows/Chromebook)
  3. Type python --version and press Enter
  4. You should see something like Python 3.11.4 (the exact number may vary)

If you see an error, ask your instructor for help installing Python.

Step 3: Create Your First File

  1. Click File > New File (or Cmd + N on Mac, Ctrl + N on Windows/Chromebook)
  2. Save the file immediately with File > Save As
  3. Name it achievement.py — the .py extension tells the computer this is a Python file
  4. Choose a location you'll remember (like a "Code" folder on your Desktop)

Understanding the Cursor Interface

┌─────────────────────────────────────────────────────────┐
│  File Explorer  │           Editor Pane                 │
│  (your files)   │     (where you write code)            │
│                 │                                       │
│  📁 Code        │   print("Hello, sports fans!")         │
│    📄 achievement.py                                    │
│                 │                                       │
├─────────────────┴───────────────────────────────────────┤
│                    Terminal                             │
│  $ python achievement.py                                │
│  Hello, sports fans!                                    │
└─────────────────────────────────────────────────────────┘
  • File Explorer (left): Shows all your files and folders
  • Editor Pane (center): Where you write your code
  • Terminal (bottom): Where you run your code and see output

Common Pitfalls

ProblemSolution
"Python not found" errorAsk your instructor to help install Python
Can't find your fileUse File > Open Recent, or check your Downloads folder
Terminal won't openTry View > Terminal from the menu bar
File won't saveMake sure the filename ends in .py

Quick Reference

ActionMenuMacWindows/Chromebook
New fileFile → New FileCmd + NCtrl + N
Save fileFile → SaveCmd + SCtrl + S
Open terminalView → TerminalCmd + ~Ctrl + ~
Run Python file(in terminal)Type python filename.py in terminal