Q3. A customer getting offers from different banks for deposit amount. From SBI customer is getting offer for 7.5 rate of interest , from PNB Bank getting offer for 8.5 rate of interest and from OBC Bank getting offer 9.5 rate of interest. Create an application where you have to create one base class named "ReserveBank" which has given instructions to all bank to give some rate of interest in deposit amount. Find out the amount after applying rate of interest from all these banks.
class ReserveBank:
def __init__(self, name, rate, amnt):
self.name = name
self.rate = rate
self.amnt=amnt
def discount(self):
new=self.amnt*(100-self.rate)/100
print("New amount in ",self.name,"after discount is, ",new)
b1=ReserveBank("SBI",7.5,1000)
b1.discount()
b2=ReserveBank("PNB",8.5,1000)
b2.discount()
b3=ReserveBank("OBC",9.5,1000)
b3.discount()
Comments
Leave a comment