This lesson is being piloted (Beta version)

Introduction to Programming with Python

This lesson is an introduction to programming in Python for people with little or no previous programming experience.

This lesson assumes that you will be working from Jupyter.

Why Python 3?

Please note that this lesson uses Python 3 rather than Python 2. Support for Python 2 is due to end in 2020, and users are strongly urged to move to Python 3 as soon as possible. Given this, it makes sense that new users should start with Python 3. As an added bonus, this allows us to make use of some new features of Python 3.

Schedule

Setup Download files required for the lesson
Day 1 09:30 1. Running Jupyter How can I run Python programs?
10:30 2. Morning Tea Break
10:45 3. Variables and Assignment How can I store data in programs?
11:45 4. Data 'types' and expressions How does Python categorise data?
What operations can Python do with data?
How does Python compare data?
What order does Python evalute expressions in?
12:30 5. Lunch Break
13:00 6. Lists and indexing How can I store multiple values?
14:00 7. Making Choices with Conditionals How can my programs do different things (i.e. make choices) based on data values?
14:45 8. Afternoon Tea Break
15:00 9. Dictionaries What is a dictionary?
15:30 10. Repeating Actions with For Loops How can I do the same operations on many different values?
16:30 Finish
Day 2 09:30 11. Working with Files How do I open a file in Python?
How do I access the data or text inside an open file?
10:30 12. Morning Tea Break
10:45 13. Modules How do I use code defined in other files or libraries?
What does the import statement do?
What are the effects of the common import variations?
11:35 14. Error Messages What kind of errors can occur in programs?
How can I identify errors when they occur?
12:00 15. Lunch Break
12:30 16. Functions What are functions?
How do I create my own functions in Python?
How do I use my own functions?
How do I document my functions?
13:15 17. Afternoon Tea Break
13:30 18. Designing Functions How do I get from a description of a problem to a code solution?
14:30 19. Python Syntax What constitutes a legal Python program (script)?
What are keywords, identifiers, expressions, statements?
How can code be commented?
What is indentation used for in Python?
What kinds of brackets are used in Python code?
Where can I find out more about Python style guidelines?
15:30 Finish

The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.