2. Intermediate Python
Contents
2. Intermediate Python#
List comprehensions
Functions in Python
Modules in Python
An introduction to classes
Working with files
Interacting with the internet
Classroom Exercises
Contents#
2.0 Comprehensions (10 minutes)
2.1 Functions (15 minutes)
2.2 Using Libraries (5 minutes)
2.3 Working with files (15 minutes)
2.4 Getting data from the Internet (10 minutes)
2.5 Data analysis example (20 minutes)
2.6 Defining your own classes (20 minutes)
2.7 Data analysis with classes (10 minutes)
Total time: 1 hr 45 minutes
Exercises#
Classroom exercises are grouped together at the end of the module: 2.7 Classroom Exercises. Each exercise is labelled with any sections whose contents are relevant. We recommend that instructors schedule the exercises to be done in groups during breaks in the taught content. However, it is important that participants also have some time away from their screens. Exercises can also be left as self-paced homework assignments if preferred.