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 70 times
-2

martineau
- 119,623
- 25
- 170
- 301

Aman Kashyap
- 25
- 1
- 7
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
- 119,623
- 25
- 170
- 301

Reblochon Masque
- 35,405
- 10
- 55
- 80