Lesson 8
Making Objects the Main Star!
Chapter 1: Introduction
Recap
Welcome back to our lessons!
As usual, let us recap what you have learnt to date.
You have learnt the basics of programming in the first five lessons. By that point, you should have been able to apply your programming skills to tackle programming challenges, by writing self-explanatory, modular codes.
From Lesson 6 onwards, we started exploring sequence data types (list
s, range
, tuple
s, str
), and then dict
in Lesson 7. You have explored many different ways you can use dict
s in different applications.
We also explored the idea of objects further. We discussed that each object has an identity, and that objects can have methods that associate actions to objects. You explored built-in methods provided with str
and list
objects.
I also introduced you to the concept of recursion, and how it can be an alternative to loops for implementing repetition.
We also looked at exception handling. You learnt how to foresee expected errors in your code and handle these errors gracefully with try... except
statements.
You have also refactored your robot project (again!), this time focusing on abstracting your robot as a dict
of robot attributes. This can help make your code easier to read, write and maintain. You will be refactoring further in this direction later on, so your hard work in the previous lesson will eventually pay off!
You have also cloned a remote git repository using git clone, and learnt to fetch any new updates with git pull.