class student:
def name(self):
print('Aman')
print('kant')
class hostel_fee(student):
def hfee(self):
print('hostel fee',int(78000))
return 78000
class academic_fee(student):
def afee(self,):
print('academic fee',int(69500))
return 69500*2
class total_fee(hostel_fee,academic_fee):
def Total(self):
self.h=super().hfee()
self.a=super().afee()
self.t=self.a+self.h
print('total fee',self.t)
print(super().name())
obj=total_fee()
obj.Total()
Asked
Active
Viewed 69 times
-2
martineau
- 112,593
- 23
- 157
- 280
Aman Kashyap
- 15
- 1
- 5
1 Answers
0
You are calling print(super().name()) in class total_fee, that in turn calls on student via the tree of inheritance, but this method returns nothing (None)
martineau
- 112,593
- 23
- 157
- 280
Reblochon Masque
- 33,202
- 9
- 48
- 71