Classes in Python
A class is a wrapping of data member and member function inside a single unit. Lets take an example of a Interest class in which we have members, principal, rate and time. We have member function as SimpleIntrest. class Interest(): rate=3.5 def __init__(self,p,t): #Data Members self.principal=p self.rate=self.rate self.time=t self.si=self.principal*self.rate*self.time/100 pass #Memeber Function def SimpleIntrest(self): print(self.si) …