A4 Math for EE
Python for engineers
Writes correct, tested Python, and uses NumPy and matplotlib to compute, simulate, analyze data and plot; reads and builds binary data and registers; writes state machines, sorts and searches with known costs; builds and solves circuit equations from a netlist; interpolates tables and filters signals in code. Five labs work instrument data, control flow, data structures and tests, signal measurements and plots, and numerical methods for circuits. Every later code lab uses it.
130 h · 56 pages · After A1
Unit 1 Numbers and strings 6
Values, variables and functions 2.5 h
Integers, floats and rounding error 3 h
Strings, formatting and parsing 3 h
Bits, bytes and binary data 2.5 h
Lab: instrument data, text and bits Lab · 3 h
Problem set 1 Problem set · 4 h
Unit 2 The basics 5
Making decisions with if 3 h
Repeating with for and while 3 h
More about functions 3 h
Lab: decisions, loops and functions Lab · 3 h
Problem set 2 Problem set · 4 h
Unit 3 Lists, dictionaries and sets 3
Lists 3 h
Tuples, dictionaries and sets 3 h
Problem set 3 Problem set · 4 h
Unit 4 Collections 4
Iteration patterns 3 h
Errors, exceptions and testing 3 h
Lab: parts lists, netlists and tests Lab · 3 h
Problem set 4 Problem set · 4 h
Unit 5 Modules and classes 4
Modules and the standard library 3 h
Classes and objects 3 h
State machines 3 h
Problem set 5 Problem set · 4 h
Unit 6 Program structure 4
Recursion, bisection and binary search 3 h
How running time grows 3 h
Sorting 3 h
Problem set 6 Problem set · 4 h
Midterm exam Midterm · 4 h
Unit 7 Arrays 4
Arrays with NumPy 2.5 h
Vectorized arithmetic and masks 3 h
Two-dimensional arrays 3 h
Problem set 7 Problem set · 4 h
Unit 8 Arrays and plots 4
Plotting signals 2.5 h
Plots that communicate 3 h
Lab: measuring and plotting signals Lab · 3 h
Problem set 8 Problem set · 4 h
Unit 9 Complex numbers, equations and calculus in code 5
Complex numbers in code 2.5 h
Solving equations numerically 2.5 h
Building circuit equations in code 3 h
Numerical derivatives and integrals 3 h
Problem set 9 Problem set · 4 h
Unit 10 Numerical methods 4
Stepping through time 2.5 h
Runge-Kutta and step size 3 h
Lab: numerical methods for circuits Lab · 3 h
Problem set 10 Problem set · 4 h
Unit 11 Data 8
Reading data and fitting a curve 2.5 h
Interpolation and lookup tables 2.5 h
Text and CSV data 3 h
Statistics of measurements 3 h
Random numbers and Monte Carlo 3 h
Sampling and the FFT 3 h
Filtering signals in code 2.5 h
Problem set 11 Problem set · 4 h
Unit 12 Longer labs 3
Mini-project: a grid-frequency log Project · 1.5 h
Project: tolerance analysis Project · 2 h
Problem set 12 Problem set · 4 h
Final exam Final exam · 4 h