Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Car(object):
- condition = "new"
- def __init__(self, model, color, mpg):
- self.model = model
- self.color = color
- self.mpg = mpg
- def displayCar(self, model, color, mpg):
- self.mpg = str(self.mpg)
- print "This is a " + self.color + " " + self.model + " with " + self.mpg + " MPG."
- myCar = Car("DeLorean", "silver", 88)
- print myCar.displayCar()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement