This is an archived version of the course. Please find the latest version of the course on the main webpage.

Chapter 1: Introduction

Introduction to Lesson 8

face Josiah Wang

I’m sure you aced that quiz!

In this lesson, we will first warm up by discussing how to represent set of objects.

We will then move on to the main emphasis of the lesson. This will be the idea of using objects as an abstract data structure. We will build on the ideas from the previous lesson, and start creating your own complex data type from existing data types! You will see how the concept of dict and object methods in the previous lesson all fit together into one!

Like back when you were introduced to functions in Lesson 5, in this lesson we will focus more on refactoring code to our new object-oriented programming style. Therefore, there will be fewer applied ‘problem solving’ questions in this lesson, but you will be doing more refactoring to try to appreciate this new style of coding.

You will continue to refactor your robot project to start moving it towards a more object-oriented programming style. You have already laid the foundations in the last lesson. You will now try to make it go further!

I will also talk about how to split your code across multiple files as Python modules.

We have been reading text files in our past exercises. We will discuss a bit more in-depth about what you were actually doing, and also give you the chance to start writing to text files!

We will also discuss a bit on remote Git repositories. More specifically, how do you update your remote git repository once you have made your local changes to your files?

Let’s get started! Hopefully it will not be as long as the previous lesson!