Week 1: Getting started with Python - Introduction: Python and Jupyter
- Variables and objects
- Basic object types: int, float, str, bool
|
- "Python Programming"?...
- How to get the Week 1 tutorial sheet
- Python basics: print(), variables, and objects
|
Tutorial sheet |
Pair programming |
Week 2: Lists, loops, and functions - Type-casting and duck-typing
- Containers: lists, ranges
- for loops
- Writing your own functions
|
- Lists, loops, and functions
Code available here |
Tutorial sheet |
Fun with sequences |
Week 3: Conditional statements, more loops, and code review - Conditional statements: if-elif-else
- Nested loops and while loops
- Code review and debugging essentials
|
- Conditional statements, while loops, and error traces
Code available here |
Tutorial sheet |
Code review |
Week 4: Numpy, plotting, and reading/writing text files - Namespaces and scope
- Numpy arrays, linear algebra and complex numbers
- Plotting with matplotlib
- Reading and writing text files
|
- Namespaces, scope, NumPy, and reading/writing a text file
- Search and understand documentation
Code available here |
Tutorial sheet |
NumPy, plotting, and input/output to a file |
Week 5: Better plots, docstrings, and introduction to SciPy - Label and customise plot appearance
- Writing good docstrings
- SciPy for statistics and optimisation
|
- Plotting with matplotlib
- Docstrings and doctest
- Introduction to SciPy
Code available here |
Tutorial sheet |
Sorting and efficiency |
Week 6: More containers, comprehensions, and problem-solving methods - Tuples
- Dictionaries
- Comprehensions
- The algorithm design process
- Problem-solving example: the post office problem
|
- List comprehensions, tuples and dictionaries
Code available here |
Tutorial sheet |
Zipf's law |
Week 7: Iterators and generators, and introduction to Pandas - Iterators
- Generators
- pandas dataframes to manipulate data
|
- Introduction to pandas
Code available here |
Tutorial sheet |
API requests: Weather forecast |
Week 8: More pandas, Seaborn - Dealing with missing data and text data with pandas
- Fancy visualisations with seaborn
|
No videos this week |
Tutorial sheet |
Getting started with Project 2 |
Week 9: More pandas, Seaborn - More on groupby
- Pivot tables
- Melting dataframes to convert to long format
|
- pandas 1: Grouping dataframes
- pandas 2: Reshaping dataframes
- pandas 3 + seaborn: Visualising data in "long" form
- Edinburgh bike data: Average duration and distance
- Edinburgh bike data: Most common starting station
Code available here |
No tutorial sheet |
No workshop task |
Week 10: Object-oriented programming - Classes and objects
- Defining your own classes
- Attributes and methods
- Special methods and operator overloading
- Inheritance
|
- Object-oriented programming
Code available here |
Tutorial sheet |
No workshop task |