Create a car class with three attributes: year, mpg, speed andlist of owners. The class also should have 2 methods calledaccelerate and brake. Whenever the car accelerates, its speed isincreased by 30 and whenever the car brakes, its speed is reducedby 60.
- add a constructor to the class, which takes year, mpg, andspeed as input
- implement a magic method that prints the car informationincluding year, speed and mpg. That is, for a car object,car1=car(2016, 20, 80), print(car) command should printcar_year_2016_mpg_20_speed_80.
- create two car objects: car1 and car2. record 'John Doe' and'Jack Jones' as the previous owners of car1 and 'John Flack' and'Jeff Heath' as the previous owners of car2. Verify that the listof car1 owners and list of car2 owners are different.
Use a python programming code