#sample solution
class Car(object):
#member variable
condition = "new"
#functions / methods
def __init__(self, model, color, mpg):
self.model = model
self.color = color
self.mpg = mpg
#check
myCar = Car("DeLorean","silver",88)
print myCar.model
print myCar.color
print myCar.mpg
print myCar.condition
No comments:
Post a Comment