MCPcopy Index your code
hub / github.com/LinkedInLearning/learning-python-2896241 / Car

Class Car

Ch2 - Basics/classes_finished.py:15–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13
14
15class Car(Vehicle):
16 def __init__(self, enginetype):
17 super().__init__("Car")
18 self.wheels = 4
19 self.doors = 4
20 self.engine = enginetype
21
22 def drive(self, speed):
23 super().drive(speed)
24 print("Driving my", self.engine, "Car at ", self.speed)
25
26
27class Motorcycle(Vehicle):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected