Course 5 | Foundation
Programming and Computation
Use Python as an engineering tool: variables and functions, arrays, plots, and validated, reproducible scripts, the computational base for everything that follows.
Course snapshot
- Purpose
- Uses code to automate calculations, inspect data, and support simulation, measurement, and repeatable engineering work.
- Prerequisites
- Next in the guided sequence
- Used in Career Directions
How to study this course
- Define the problem
- Choose variables
- Write a small function or script
- Test with simple values
- Plot or inspect results
- Validate against a hand calculation or known case
How this course is designed
Code as an engineering tool
The early modules treat Python as a calculator that automates the arithmetic you already do by hand. Programming earns its place through the engineering it makes faster, not through computer-science abstraction for its own sake.
Verified numbers throughout
Every module includes two fully worked examples whose output is checked in Python. You always see the exact result the code prints, so you can run it and confirm the same answer.
Built toward numerical methods
The arc runs from a single calculation to arrays, plots, and validated scripts, the exact toolkit the later Numerical Methods, CFD, and FEM courses assume you already have in hand.
The 10 modules
01 | Module
Python as a Powerful Calculator
Variables, arithmetic, and the math module for real formulas.
02 | Module
Numbers, Types, and Operators
Integers and floats, division, and operator precedence.
03 | Module
Input, Output, and Formatting
Printing, f-strings with units, and reading input as text.
04 | Module
Making Decisions with Conditionals
Booleans, comparisons, and if for safety-factor checks.
05 | Module
Repeating Work with Loops
for and while loops, ranges, and accumulating a total.
06 | Module
Functions and Modules
Reusable functions, arguments, return values, and imports.
07 | Module
Lists, Tuples, and Dictionaries
Ordered collections, named lookups, and the built-in summaries.
08 | Module
Numerical Python with Arrays
NumPy arrays, vectorized math, the dot product, and linspace.
09 | Module
Plotting and Visualizing Data
matplotlib line and scatter plots with labeled axes.
10 | Module
Files, Validation, and Reproducibility
Reading data, validating results, and repeatable scripts.