Skeleton code used to help students learn Python to a basic level.
To use these notebooks, you will need to have Python 3 installed, and some way of viewing python notebooks (such as Jupyter, or a VS Code extension).
If using VS Code, you may want to install an extension to let you view pdf files (but this is not necessary).
- Variables, assignment and operator precedence
- Control statements
- Types, type conversions and floating point arithmetic
- Functions
- Library functions
- Data structures
- Numerical computation
- Plotting
- Error handling and testing
- Algorithms
- Complexity
- Object-oriented design
- Compiled and interpreted languages
The exercises are designed to be completed in order. To complete an activity:
- Read through the
guide.ipynb
notebook, and change parts of the programs if you want to experiment with what happens - this will help your understanding. - Complete the
exercises.ipynb
file for the exercise before moving onto the next activity.
As you move through the activities you might need to revise some of the earlier notebooks.
In the exercises, there is one cell for you to enter your code, followed by another cell containing the function assert(...)
. Don't edit anything in this cell. This just checks that your code gets the right final answer. For this reason, make sure you follow the instructions carefully and create variables with the right name.