human
I am working on the file "Basic control structures.ipynb".
The first task is:
Aside: A hashable type can be used as an index in a dict - tuples are, lists aren't (because they can change, aka are mutable)
PS: an introduction to objects...
Objects
Totally class
If you haven't done object oriented coding before, I am afraid I am not going to give you the magic bullet now. It is an important concept to get to grips with, but for the moment, we will keep it fairly functional. Do take time to look through it later - Python is an excellent language for playing around with it and getting an intuition for what an object is. A number of you will be very familiar with this so please bear with me and the very rough introductory description I will give - for those who are not so familiar, this is worth getting the basics down early.
In real life, everything has properties, and many things have things they can do. In Python these properties are called attributes and the things an object can do are called methods. Together these are called members and, in Python, are accessed by putting a dot after the object and the attribute or method name. Everything else is just like any other variable or function, respectively.
For instance, my dog Freddie has properties - he has a colour, which is black (technically, he is imaginary, but in my head he is definitely black). In Python terms, this would be:
Attribute: freddie.colour = black
I can tell Freddie to roll-over. When I do so, I am, in some sense, calling Freddie's method:
Method: freddie.roll_over()
I have another dog, Nitwit. Nitwit can also roll over...
Method: nitwit.roll_over()
Both dogs can shake hands, but I need to tell them which paw...
Method: freddie.shake_paw('left')
At this point, you're probably wondering what exactly is the set of attributes and methods that my dogs have? This template, showing what attributes and methods a dog of mine can be expected to have, is called a class.
A simple class
Can you write Python code for it?
assistant
#Here an object is.

class PhilsDog:
    name = ""
    colour = ""
    def shake_paw(self, side):
        print("My name is", self.name, "and I am shaking my", side, "paw like a good dog")