Python
You will be expected write some simple programs in Python in this course. I have written some resources to help with this:
- Instructions for installing Python
- Basic Mathematics in Python: Explains how to work with numbers in Python. It also briefly explains some other features of Python including:
if
statements, while
loops, and function definitions.
- How to do a programming assignment: Gives an example of how you might work through an assignment in Python.
- Logic: Explains how to work with Boolean values (i.e., values of True or False) in Python.
- Tuples and Sets: Explains how to work with tuples (ordered lists) and sets in Python.
- Lists: Explains how to work with lists in Python.
- Recursion: Gives some examples of recursion (functions calling themselves) in Python. Recursion is the analog of induction in programming.
Links
- The Python tutorial: The official python tutorial
- Introduction to the Python Development Environment: Introduces IDLE, which is the progamming environment that we will use in this course. (See How to do a programming assignment for an even more brief introduction aimed at explaining how to complete assignments.)
- How to Think Like a Computer Scientist. This is an open introductory programming book using Python, which has been developed into several new editions. Relevant editions (in order of most to least useful).
- CheckiO: A "game" where you learn to program in Python. Essentially, the website presents you with a sequence of programming puzzles of increasing difficulty, and enables you to iteract with other programmers. Here is an article about it.
- SageMath: A free open-source mathematics software system used by students and mathematicians which is based on Python.
Return to the course website