- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoop3.py
More file actions
Latest commit
27 lines (19 loc) · 568 Bytes
/
Copy pathoop3.py
File metadata and controls
27 lines (19 loc) · 568 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
classPerson:
def__init__(self, name, age):
self.name=name
self.age=age
defprintName(self):
print(self.name)
classStudent(Person):
def__init__(self, name, age, qualification, grade):
Person.__init__(self, name, age)
self.quali=qualification
self.grade=grade
defprintAge(self):
returnself.age
defprintQualification(self):
returnself.quali
student1=Student("Jay", 30, "BCA")
student1.printName()
print(student1.printAge())
print(student1.printQualification())