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
- Go to cursor.com
- Click the download button for your operating system (Mac or Windows)
- Open the downloaded file and follow the installation prompts
- 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:
- Open Cursor
- Open the terminal using View > Terminal (or
Cmd + ~on Mac,Ctrl + ~on Windows/Chromebook) - Type
python --versionand press Enter - 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
- Click File > New File (or
Cmd + Non Mac,Ctrl + Non Windows/Chromebook) - Save the file immediately with File > Save As
- Name it
achievement.py— the.pyextension tells the computer this is a Python file - 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
| Problem | Solution |
|---|---|
| "Python not found" error | Ask your instructor to help install Python |
| Can't find your file | Use File > Open Recent, or check your Downloads folder |
| Terminal won't open | Try View > Terminal from the menu bar |
| File won't save | Make sure the filename ends in .py |
Quick Reference
| Action | Menu | Mac | Windows/Chromebook |
|---|---|---|---|
| New file | File → New File | Cmd + N | Ctrl + N |
| Save file | File → Save | Cmd + S | Ctrl + S |
| Open terminal | View → Terminal | Cmd + ~ | Ctrl + ~ |
| Run Python file | (in terminal) | Type python filename.py in terminal |