🐍 EE105 Lab 0.2 β€” Python Bootcamp

In this course we'll use Python to analyze data and (later on) talk to your Arduino boards. You'll write and run Python inside VS Code, using interactive Jupyter notebooks β€” documents that mix runnable code, results, and notes in one place. Python itself is managed by Anaconda.

Part A β€” at home: install two apps (big downloads).
Part B β€” at home: create your course Python environment (three commands).
Parts C & D β€” in the lab: run the notebook and submit your work.

⚠️ Do Parts A and B at home, before the first lab. Together they take about 30 minutes and need ~5 GB of free disk space. If you arrive without them, you'll spend the lab session installing software instead of learning Python.

🏠 Part A β€” Install Two Apps (At Home)

1Install Anaconda
Go to anaconda.com/download. If it asks for your email, click the small "Skip registration" link. Download the installer for your computer.
🍎 Mac users β€” check your chip first: Apple menu β†’ About This Mac. If it says Apple M1/M2/M3/M4, download the Apple Silicon installer. If it says Intel, download the Intel installer.
Run the installer and accept all the default options (on Windows, choose "Just Me" if asked). The install takes a few minutes.
2Install VS Code
Go to code.visualstudio.com and click Download.
πŸͺŸ Windows: run the installer, keep all defaults.
🍎 Mac: unzip the download and drag Visual Studio Code into your Applications folder.
3Add two VS Code extensions
Open VS Code and click the Extensions icon in the left sidebar (four squares β€” or press Ctrl/Cmd + Shift + X).
Search for Python β†’ click Install (publisher: Microsoft).
Search for Jupyter β†’ click Install (publisher: Microsoft).

πŸ§ͺ Part B β€” Create Your Course Environment (At Home)

A Python environment is a named, self-contained copy of Python plus only the packages you choose to install into it. We'll create one called ee105 and use it for every lab this semester.

1Open a terminal
πŸͺŸ Windows
Open the Start menu, type Anaconda Prompt, and open it. (Not the regular Command Prompt!)
🍎 Mac
Press Cmd + Space, type Terminal, and press Enter.
The line should start with (base) β€” that means Anaconda is working.
2Run these three commands, one at a time

Copy each line, paste it into the terminal, press Enter, and wait for it to finish before the next one.

Create the environment:

conda create -n ee105 python=3.12 -y

Step inside it β€” the (base) at the start of the line becomes (ee105):

conda activate ee105

Install the packages this course needs:

conda install numpy matplotlib sympy ipykernel nbconvert -y
3See what you just built (optional)
If you'd like to see your new environment visually, open Anaconda Navigator (from the Start menu / Applications), click the Environments tab, and select ee105. You'll see the packages you just installed.
A fresh environment starts empty β€” Python can't use NumPy, Matplotlib, or any other package until you install it. That's why Step 2 exists, and it's how you'll add any new tool we need later in the course.
βœ… Done at home. Bring your laptop (charged!) to the first lab β€” we'll do Parts C and D together.

πŸ““ Part C β€” Open the Lab in VS Code (in the lab)

πŸ“¦ Lab files

Download mod-0-Lab2-python.zip β†’

Save it somewhere easy to find (Desktop or Documents), then unzip it.

1 Unzip the folder (Windows: right-click β†’ Extract All; Mac: double-click the zip). Working inside the zip file will not work.
2 Open VS Code β†’ File β†’ Open Folder… β†’ select the unzipped mod-0-Lab2-python folder β€” the one with the notebook directly inside it. (Windows sometimes puts a mod-0-Lab2-python folder inside another folder of the same name; open the inner one.) If asked, click "Yes, I trust the authors".
3 In the left sidebar, click
mod-0-lecture-4-ece-105-python-bootcamp.ipynb
4 Click Select Kernel (top-right corner) β†’ Python Environments β†’ choose ee105.
5 Run cells from top to bottom: Shift + Enter runs a cell and moves to the next (Ctrl/Cmd + Enter runs and stays). The first code cell is a setup check β€” if you see green checkmarks, everything works.
6 Right after the setup check, run the check-in cell: put your name and USC email in it so your work counts. As we go through the lab you'll hit 🚩 Checkpoint questions β€” answer them right in the notebook and run the cell. It tells you whether your answer is correct β€” if not, think it over and try again until it is. Points are tallied by the TA after the lab.
Autocomplete is switched off inside this folder β€” on purpose, so you build the habit of typing Python yourself. Only this folder is affected; your other projects are untouched.
This is the routine for every lab this semester: open the lab folder in VS Code β†’ open the notebook β†’ select the ee105 kernel β†’ run.

βœ… Part D β€” Submit Your Work (in the lab)

You submit one file β€” your completed notebook β€” plus your completion code through the Google Form.

πŸ“ Lab Completion Form

Open Submission Form β†’
1 Work through the notebook from top to bottom, answering all five 🚩 Checkpoints along the way: mod-0-lecture-4-ece-105-python-bootcamp.ipynb (this is the only notebook β€” there is nothing else to complete)
2 Finish 🚩 Checkpoint 5 at the end of the NumPy section β€” the coding questions. Their checker cells tell you whether each answer passes β€” fix and re-run until it does
3 Run the 🏁 Finish line cell at the very bottom and copy your completion code (always use the newest code you generated)
4 Save the notebook: Ctrl/Cmd + S. Unsaved work is not in the file you upload!
5 Open the form and fill in:
There is no answer key. Everything you need to work the Checkpoints out is covered in the lecture and in the notebook itself β€” reread the section just above each question, try something, and use the notebook's feedback to close in on the right answer. Ask your TA if you're stuck.
Important: Submitting this form confirms that you have completed the Python Bootcamp lab.

❓ Troubleshooting

Windows: "conda is not recognized"

You're in the regular Command Prompt or PowerShell. Close it and open Anaconda Prompt from the Start menu instead.

Mac: "conda: command not found"

Quit Terminal completely (Cmd + Q) and reopen it. If it still doesn't work, re-run the Anaconda installer.

Windows: installer complains about spaces in the install path

If your Windows username contains a space, the installer may warn about it. Change the install location to C:\anaconda3 and continue.

ee105 doesn't appear in the kernel list

Make sure Part B finished without errors. Then in VS Code press Ctrl/Cmd + Shift + P, type "Developer: Reload Window", press Enter, and click Select Kernel again.

Cells fail with "ModuleNotFoundError: No module named 'numpy'"

The notebook is running on the wrong kernel. Click the kernel name in the top-right corner and switch to ee105.

Which file do I upload, and where is it?

Just one: the file ending in .ipynb inside your unzipped mod-0-Lab2-python folder β€” the notebook you worked in. In VS Code you can right-click it in the sidebar β†’ Reveal in Finder / File Explorer to find it. Save (Ctrl/Cmd + S) before uploading.

Checkpoint cells say I'm not registered

Scroll up and run the register cell (with your real name and USC email) near the top of the notebook. If you restarted the kernel, run it again β€” your already-passed checkpoints are remembered.

I don't see the notebook files in VS Code

You probably opened the wrong folder, or you're still inside the zip file. Unzip first, then File β†’ Open Folder… and select the extracted mod-0-Lab2-python folder.


βœ… That's it!
If you get stuck and can't solve it yourself, email your TA here with (1) a screenshot of the exact error and (2) a screenshot of the setup-check cell's output β€” that's usually enough to diagnose it.