Skip to content

Commit b495733

Browse files
Update Oops.py
1 parent bf88004 commit b495733

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

Oops.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,19 @@ def fule_type(self): # polymorphism
115115
# print(new_car.Model)
116116
# print(car.car_info())
117117
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())
118131
# print(my_tesla.brand)
119132
# print(my_tesla.car_info())
120133
# print(my_tesla.get_brand())

0 commit comments

Comments
 (0)