Classes Create a Vehicle Class

Learning objective: By the end of this lesson, students will have more practice creating classes in Python.

🎓 You Do

Define a class named Vehicle with the following members:

Test out the class by instantiating it, creating a vehicle of your choice. Call the start() and stop() methods, and print some of its attributes:

car = Vehicle("Toyota", "RAV4")

print(car)
# prints: The vehicle is a Toyota RAV4.

print(car.running) 
# prints: False

car.start()
# prints: Starting up!

print(car.running) 
# prints: True