Car

Report a typo

You've created a base class Car and a subclass Tesla.

Create an instance of the class Tesla. You can create any instance, just name the variable tesla_car.

Write a program in Python 3
class Car:
def __init__(self, model, color):
self.model = model
self.color = color


class Tesla(Car):
pass


# create an instance of Tesla
___

Create a free account to access the full topic