-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinheritance_of_class.py
More file actions
32 lines (30 loc) · 855 Bytes
/
Copy pathinheritance_of_class.py
File metadata and controls
32 lines (30 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
class Human:
def __init__(self,no_laptop):
self.num_of_eye=34
self.num_of_nose=45
self.laptop=no_laptop
def ability(self):
print("i can eat,sleep,walk,run,think,jump,work,farming,etc....")
def power(self):
print("one lion power, two hourse power, three elephates power")
def work(self):
print("hard worker")
class Male(Human):
def __init__(self,name,top):
super().__init__(top)
self.name=name
def flirt(self):
print(" male also human but they have sex organ or differnt")
def work(self):
super().work()
print("i can work relax")
#human=Human("avinash",32)
#human.work()
human_1=Male("avinash",32)
#human_1.ability()
#human_1.power()
#human_1.flirt()
human_1.work()
print(human_1.num_of_eye)
print(human_1.name)
print(human_1.laptop)