Python Engineering Notebooks with JupyterLite

Python
JupyterLite
notebooks
data analysis
circuits
Open, run, edit, save, download, and submit engineering notebooks in a browser.

Learning goals

  • I can run and revise Python and Markdown cells in a notebook.
  • I can run simple Python, change a value, and check the output.
  • I can download an .ipynb file and protect my work from browser-data loss.

Why this is useful

Python can repeat calculations, test a range of values, and show patterns that are hard to see in one handwritten example. A notebook keeps code, evidence, and explanation together.

What you will make

New Jupyter users will open Notebook 0, run one line at a time, use Python as a calculator, store values in variables, recognize basic types, work with a list, and finish with one small NumPy array. Complete Python First Steps before beginning the larger Python and NumPy Foundations assignment.

Before you start

ImportantOpen JupyterLite in your browser

JupyterLite is the browser program that opens and runs the downloaded .ipynb notebook. It is separate from this instruction page.

  1. Download Notebook 0: Python First Steps.
  2. Click OPEN JUPYTERLITE NOW. A new tab containing JupyterLab will open; this is the JupyterLite workspace.
  3. In that new tab, use Upload Files to upload 00-python-first-steps.ipynb.
  4. Double-click the uploaded notebook. Choose Python (Pyodide) if JupyterLite asks for a kernel.

Use a current school-approved Chrome or Firefox browser. Private browsing can block features JupyterLite needs. The public JupyterLite demonstration’s available kernels and packages can change.

WarningBrowser storage is not cloud storage

JupyterLite normally stores edited files in this browser’s local storage. Another device, another browser profile, cleared site data, or a school reset may not have your work. Download the .ipynb file after every work period and keep the downloaded copy in the teacher-approved location.

1. Open the notebook

  1. Click OPEN JUPYTERLITE NOW and wait until the JupyterLab file browser and launcher finish loading.
  2. Choose the Upload Files button in the file browser, or drag the downloaded notebook into the file area.
  3. Double-click 00-python-first-steps.ipynb.
  4. If asked for a kernel, choose the available Python (Pyodide) kernel. Wait until the kernel status is ready.

A notebook is a sequence of cells. A Code cell runs Python. A Markdown cell displays headings, lists, links, equations, and explanations.

2. Run, change, and rerun code

Click the first code cell and press Shift+Enter. The cell runs and the selection moves to the next cell. The first scientific-package import can take longer because a browser kernel may need to load packages.

print("Hello, TEJ!")

You should see Hello, TEJ! under the cell. Change only the words inside the quotation marks, press Shift+Enter again, and check that the new words appear.

3. If you see a red message

Stop and read the last line.

  • NameError often means a variable name is misspelled. Compare it with the earlier cell.
  • SyntaxError often means a quotation mark or bracket is missing.
  • An old answer can mean the cells were run out of order. Save the notebook, then choose Kernel > Restart Kernel and Run All Cells.

The larger documentation and debugging lesson comes later, after the Python basics are comfortable.

4. Complete Python First Steps

Continue with Assignment: Python First Steps in Jupyter. Work through Notebook 0 in this order:

  1. Run print("Hello, TEJ!").
  2. Change only the printed words and run the cell again.
  3. Use Python as a calculator.
  4. Store values in variables.
  5. Use type() to recognize a whole number, decimal number, text, and True or False.
  6. Select values from a three-item list.
  7. Change that list into one NumPy array.
  8. Change one number in a small array until the checks pass.

Do not begin with loops, functions, graphs, matrices, or documentation challenges. Those skills appear in the next notebook after these first steps are comfortable.

5. Save, download, reopen, and submit

  1. Choose File > Save Notebook during the work period.
  2. Choose File > Download. If that menu item is absent in an older deployment, right-click the notebook in the file browser and choose Download.
  3. Keep the .ipynb ending. Rename the downloaded file studentnumber-lastname-python-first-steps.ipynb, for example 123456789-Smith-python-first-steps.ipynb.
  4. To reopen it later, click OPEN JUPYTERLITE NOW, upload the downloaded file, and double-click it. Restart the kernel and run all cells.
  5. Inspect the notebook for personal information. Upload the .ipynb file manually to the assigned Google Classroom post when that service is available. JupyterLite does not submit it for you.

Notebook progression

Notebook Core task Download
0. Python First Steps Cells, printing, calculator operations, variables, types, lists, and one small NumPy array lesson · .ipynb
Circuit Quest Rotate wires, complete paths, light two lamps, and see a branch work game · .ipynb
1. Python and NumPy Foundations Jupyter cells, variables, lists, functions, arrays, documentation, plotting, and a resistor investigation lesson · .ipynb
2. Series and Parallel Calculations Equivalent resistance, currents, voltage drops, and checks .ipynb
3A. Two Loops to a Matrix Signed loop derivations, matrix rows, NumPy, SymPy, and verification .ipynb
3. Kirchhoff Systems Documentation-driven debugging, residuals, and parameter investigation .ipynb
4. Graph Electrical Relationships Voltage-current and resistance-current plots .ipynb
5. Experimental Data Analysis CSV import, prediction differences, graphs, and limitations .ipynb · CSV
6. Engineering Investigation Choose a question, test it, troubleshoot, and verify the result .ipynb
7. RC, Op-Amps, and a Bridge to Calculus Model transients, numerical slope and area, integration, differentiation, and optional XL741 evidence .ipynb
8. Optional Component Model Review Compare resistor, capacitor, LED, transistor-switch, and op-amp models with explicit limitations; use only where review is needed .ipynb

Download all twelve notebooks, the dataset, and local requirements as one ZIP.

The notebooks use Python’s standard library plus NumPy, pandas, and Matplotlib where the task requires them. They are designed for the Pyodide kernel in the official JupyterLite demonstration and for ordinary local JupyterLab with the supplied requirements file. A school deployment may provide a different kernel or package set.

Use the Jupyter Electronics Lab later for the complete simulation-first sequence. Notebook 0 does not require physical components.

Troubleshooting

Problem What to try
The page never finishes loading Reload once in a current school-approved Chrome or Firefox window.
Kernel is not ready Wait until Python (Pyodide) is ready before running the cell.
Uploaded notebook cannot be found Upload it again and look for the exact filename in the left file browser.
NumPy does not load Confirm that Python (Pyodide) is the selected kernel.
Work disappeared Check the browser profile and downloads. Browser storage is device- and site-specific and is not a backup.
Download is blocked Right-click the notebook in the file browser and choose Download, or ask the teacher for the approved route.

The storage and file guidance above follows the official JupyterLite usage guide and troubleshooting guide.

Check your work

  • TASK 1 through TASK 6 are complete.
  • Every cell has been run from top to bottom.
  • The final cell prints three numbers and Checks passed.
  • The downloaded notebook reopens and still contains your work.

Next step

Continue with Python First Steps. Use the local Jupyter pathway only when you have an unrestricted computer or need packages and files beyond the browser environment.

Help improve this lesson (optional)

If something got in the way, tell the teacher which step or word was unclear, what you still do not know how to do, and one change that would help the next student. If you can fix the wording or screenshot, show the teacher. A useful fix may be added to the course website and credited to you.