- 2

coding error

Can someone please help with gelping me fix this piece of code Class Car(object): numwheels = 4 def display(self): print("Make :", self.make) print("Colour :", self.colour) print("Wheels :", Car.numwheels) obj1 = Car("Ford" , "Black") obj.display() Thanks for help

3rd Sep 2017, 3:02 PM
paul
2 Respuestas
0
Whats the error anyway?
4th Sep 2017, 4:01 AM
Abdulaziz Almawash
Abdulaziz Almawash - avatar
0
indent the prints of display method add a __init__ method where you initialize self.make and self.colour
4th Sep 2017, 7:26 AM
Baptiste E. Prunier
Baptiste E. Prunier - avatar