Jeff Mead – Task 1

An everyday object that you could create a class for would be a car.

There could be lots of different cars, but the class, fields of data would be the same, even thought variables content would differ.


class Car:
def __init__(self, make, model, colour):

self.make = make

self.model = model

self.colour = colour

c1 = Car(“Holden”, “Commodore”, “Red”)

+ There are no comments

Add yours