Thank you for sharing your answer. Now that
we've used classes for the very first time,
I want to highlight something that took me
a really long time to understand when I
was in college. When we wanted to use
functions previously, we wrote code like webbrowser.open. But
when we wanted to create instances of this
class, class turtle, we wrote code that said,
turtle.Turtle. Now, look at both of these
statements. They look rather similar. It seems
like we're calling a function in both of these cases. But something different is
happening behind the scene. When we call
webbrowser.open, all we are doing is calling
a function. No big deal. But when
we call turtle.Turtle, the init function defined
inside class Turtle, that's the function that gets
called. And it creates or initializes space inside
memory for a new instance which we called
brad. Even though it seems like we called
functions in both cases, we called open in
the first case and the function init, in
the second case. Not all functions are created
equal. When we called webbrowser.open, all we did was
call a function, but when we called turtle.Turtle, it in turned
called the init function which created or initialized space in memory
that did not exist before. So, that concludes our first example
of how to use classes. Let's look at a few more examples.