We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf88004 commit b495733Copy full SHA for b495733
1 file changed
Oops.py
@@ -115,6 +115,19 @@ def fule_type(self): # polymorphism
115
# print(new_car.Model)
116
# print(car.car_info())
117
my_tesla = Electric_Car('Tesla', 'Model S' , '39KWh')
118
+# Multiple Inheritance
119
+class Engin:
120
+ def car_Engin(self):
121
+ return 'Car Engine is Electric'
122
+class Bettery:
123
+ def car_bettery(self):
124
+ return 'Car bettery is leathum'
125
+class Electric_car_Model(Engin , Bettery , Car):
126
+ pass
127
+new_tesla_car = Electric_car_Model('Tesla','T Shap')
128
+print(new_tesla_car.car_bettery())
129
+print(new_tesla_car.fule_type())
130
+print(new_tesla_car.car_info())
131
# print(my_tesla.brand)
132
# print(my_tesla.car_info())
133
# print(my_tesla.get_brand())
0 commit comments