Skip to content

Commit 9fe4462

Browse files
committed
1 parent 6186447 commit 9fe4462

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

OOP Series/E8.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class Vehicle:
2+
def __init__(self, name, mileage, capacity):
3+
self.name = name
4+
self.mileage = mileage
5+
self.capacity = capacity
6+
7+
class Bus(Vehicle):
8+
pass
9+
10+
School_bus = Bus("School Volvo", 12, 50)
11+
12+
print(isinstance(School_bus,Vehicle))

0 commit comments

Comments
 (0)