Sep-03-2017, 04:07 PM
Hello All!
So I am busy teaching myself Python and I am going through bits of code with supposed errors.
There is one particular one I am stuck with, that needs me to correct the class definitionin the code.... though I still have trouble making heads or tails of certain elements.
Could anyone please help?
So I am busy teaching myself Python and I am going through bits of code with supposed errors.
There is one particular one I am stuck with, that needs me to correct the class definitionin the code.... though I still have trouble making heads or tails of certain elements.
Could anyone please help?
class Car(object): numwheels = 4 def display(self): print("Make:", self.make) print("Colour:", self.colour) print("Wheels:", self.numwheels) #MainProgram c0bj1 = Car("Ford","Black") c0bj1.display()