Welcome | Notebooks |
Student versions of the notebooks can be found here. For solutions, email jennyf@uow.edu.au.
Note: some of the formatting does not render properly in “View” mode (which also does not allow you to interactively run the code cells). A better option is to download the notebook files and open using Jupyter Notebook, which you can get by installing Anaconda (Python 3 version).
These notebooks are a work in progress and may be updated at any time.
PART 1: PYTHON PROGRAMMING CONCEPTS
Introduction to Python: View | Download
Exercises: View | Download
- Using Python as a fancy calculator
- Communicating with Python in grammar it can understand
- Saving time by saving values for later
- Getting the order right
- Communicating with other humans
- Adding words to the output
- Understanding errors
Arrays and Plots: View | Download
Exercises: View | Download
- Keeping track of many values at once
- Making simple arrays from a list of numbers
- Using arrays to do stuff
- The lazy person’s guide to making arrays
- Help! Get me out of here!
- Plotting variables
Loops: View | Download
Exercises: View | Download
- Doing things over and over… and over… and over…
- for loops
- for loops with arrays: taking values out
- for loops with arrays: putting values in
Logic: View | Download
Exercises: View | Download
- Making comparisons
- Using logic (if)
- On the other hand… (else)
- If not that, how about this? (elif)
- Getting the order right
- Doing more than printing
- Combining logic and loops
Functions: View | Download
Exercises: View | Download
- Functions intro
- Just like functions in maths
- Local variables: hidden from the world
- Saving and using function output
- Functions with arrays
- Returning multiple ouptut values
- Providing multiple input arguments
- Defining default values
- Side Note: Making plots pretty
PART 2: MODELLING CONCEPTS AND APPLICATION
The Bathtub: View | Download
Exercises: View | Download
- Variables
- Solving the equations
- Saving values along the way
- Sensitivity analysis
- Adding labels and legends
- Adding multiple curves to one plot
Daisyworld: View | Download
Exercises: View | Download
- The effect of daisies on surface temperature
- The effect of surface temperature on daisies
- Building a model for Daisyworld
- Testing the sensitivity of the model to different parameters
Population: View | Download
Exercises: View | Download
- Simple exponential growth
- S-shaped growth and carrying capacity
- Overshoot and collapse
- Replenishing resources
Global atmosphere-ocean carbon cycle: View | Download
Exercises: View | Download
- Fluxes and reservoirs
- Comparing to Observations
- The “missing” sink
- Varying Fossil Fuels