Begin Python with TCLab
The Begin Python with TCLab is an introduction and review of basic Python programming with 12 lessons that can be completed in 2-3 hours (15-20 minutes each).
The course is designed to start from no programming experience and guide a self-paced learner through the basics of Python. The 12 modules are IPython notebooks that are run from a Jupyter Notebook. The tutorials start with how to install Anaconda and use the hands-on lab kit. The exercises are interactive and there are solution videos for each module for those who need additional help.
- Overview
- Debugging
- Variables
- Printing
- Classes and Objects
- Functions
- Loops
- Input
- If Statements
- Lists and Tuples
- Dictionaries
- Plotting

After completing this course, there are next courses that build upon the basic Python programming experience.
Temperature Control Lab
The final project is a review of all course material with real data from temperature sensors in the Temperature Control Lab (TCLab). The temperatures are adjusted with heaters that are adjusted with the TCLab. This lab hardware is also used in the Process Dynamics and Control Course and the Dynamic Optimization Course.

TCLab Digital Twin
If no hardware is available, use TCLabModel() in the place of TCLab(). The emulator (digital twin) can be run faster than real-time as shown below:
import numpy as np
tclab_hardware = False
if tclab_hardware:
mlab = tclab.TCLab # Physical hardware
else:
speedup = 100 # Emulator (digital twin) speed-up
mlab = tclab.setup(connected=False, speedup=speedup)
n = 500
tm = np.linspace(0,2*n,n+1)
# Connect to TCLab
with mlab() as lab:
# set heater values
lab.Q1(70)
lab.Q2(20)
for t in tclab.clock(tm[-1]+1, 2):
print('Time: ' + str(t) + \
' T1: ' + str(round(lab.T1,2)) + \
' T2: ' + str(round(lab.T2,2)))
Change tclab_hardware from False to True to use the physical hardware.
Generative AI and the Course Projects
The TCLab projects (A, B, C) are where the whole course pattern comes together: AI-assisted, student-owned. You may use Generative AI for code scaffolding, debugging, plotting, and report drafting - and you remain the engineer of record for every number, plot, and conclusion. Two hard rules:
- Real data only. Every temperature trace in your report comes from your own TCLab run (or from tclab.TCLabModel(), clearly labeled as simulated if you do not have hardware). Never let an AI invent, smooth, or "reconstruct" data - a fabricated data set in a lab report is a professional integrity violation, not a shortcut.
- Specify, generate, verify, defend. If AI writes code for you, you write the spec, you test the code against a case you can check by hand, and your report must be able to defend every choice (model form, step size, initial guesses) without "the AI chose it."
Tip: Projects B and C reuse everything: interpolation vs regression (class 18), fsolve for the steady-state energy balance (class 17), and odeint against measured temperatures (class 19). When the transient model misses the data, resist retuning blindly - ask which assumption (lumped mass, constant ambient, radiation ignored) fails first, and say so in the report. Disclose in the report where AI assisted and what you did to verify each assisted step.
What to Turn In (add to each project report)
Beyond the notebook deliverables, add a half page answering:
- Where did AI assist (code, debugging, drafting), and what specific verification did you run on each assisted piece?
- Show one hand calculation that anchors your results (steady-state energy balance, a single Euler step, or a fit residual) and confirm your code agrees.
- From the skeptical-review prompt: what was your weakest claim, and how did you strengthen or qualify it?
- If your model and data disagree: which physical assumption do you blame, and what experiment would test it?
