Classes in Python. Lecture 11
A class is a template or a blueprint for constructing an object. Let’s say for example we have a list of students; If we went on to write the details of each one of these students, we would have to…
Functions. Lecture 10
Suppose you want to carry out different number additions and print out the result. From what we have learned so far, you can do so by: While this program is correct, it is repetitive and it lacks good design. This…
For loops. Lecture 9
If we had a list of students like : Let’s say we wanted to print each student’s name one by one like: While these six lines of code will get the job done, there are a few limitations. One, it…
If…Else. Lecture 8
In the previous lectures, we looked at comparison operators. For a refreshers, here are some of them: These comparison operators are commonly used with loops or with if statements in python. Let me take you a little into an English…
Dictionaries. Lecture 7
Python dictionaries are the last type of data structure that we will look at in this course. Earlier on, we looked at a list which stores a simple list of elements say for example: In real life though, we might…