How to create a class in Python

In this video explaining classes will be the main topic on how they are constructed,  we explain how to create an instance of a class. Also, we look at what class attributes are and how they can be used to assign key data that can be called anywhere within a program.

The steps involve the following:

(a) Create a class

(B) Assign attributes to the class

(C) Create a method within the class ( similar to a function)

(D) Create an instance of a class to call its attributes and methods.

 

 

This video is a follow on from object oriented programming РPython Classes explained

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *