Lecture 4: Data types#

In lecture 4 we will explore some more of the objects that are available in python to solve problems. These objects are meant to make your life easier, you could do what these things do using stuff from previous weeks, but it’s easier (and faster) to use these. In particular we will teach you

  • The File object and how it can be used to read data from file.

  • The “tuple” object: Similar to, but not the same as, a list

  • The “set” object: For dealing with a set of unique data entries, and combining, overlapping etc. between other sets.

  • The “dictionary” object: Making it easier to store and access structured data.

The weekly tasks are split up into a series of sequential notebooks. Any of these can be opened below by clicking on them. The first 4 notebooks are all interactive notebooks, where you will run and/or write code in the cells. To open any of the notebooks interactively, first click on the section, then click on the rocket and select “Colab”.

Weekly tasks#