class Car: def __init__(self, make, model): self.running = False self.make = make self.model = model def make_and_model(self): return ' '.join((self.make, self.model)) def start(self): if not self.running: print "Started the car." self.running = True else: print "The car is already running." def stop(self): if self.running: print "Stopped the car." self.running = False else: print "The car isn't running." class Tank(Car): def __init__(self, make, model): Car.__init__(self, make, model) self.bullets = 3 def shoot(self): if self.bullets > 0: self.bullets -= 1 print "Shot a bullet." else: print "You're out of bullets."