human
Write me a the Python code you requested given the following:
I am working on the file "PreFall2018/Objects/Building Software With Objects.ipynb".
The first task is:
EXERCISE: Implement the stop and turn methods. Run the methods.
Inheritance
Inheritance is a common way that classes reuse data and code from other classes. A child class or derived class gets attributes and methods from its parent class.
Programmatically:
- Specify inheritance in the class statement
- Constructor for derived class (class that inherits) have access to the constructor of its parent.
Inheritance is represented in diagrams as an arror from the child class to its parent class.
Can you write Python code for it?
assistant
#Here is the Python code you requested.

from IPython.display import Image
Image(filename='SimpleClassHierarchy.png', width=400, height=400) 

# Code for inheritance
class Sedan(Car):
    # Sedan inherits from car
    
    def __init__(self, color, speed):
        """
        :param str color:
        :param int speed:
        """
        super().__init__(color, "Sedan", speed)
        
    def play_cd(self):
        print ("Playing cd in %s sedan" % self.color)

sedan = Sedan("Yellow", 1e6)
sedan.play_cd()

sedan.car_type

joe_car = Sedan("Blue", 100)
print ("Type of joe_car has (color, type, speed)=%s." % str((joe_car.color, joe_car.car_type, joe_car.speed)))