Question:
Find and write the output of the following python code:
class Book:
def __init__(self,N=100,S="Python"): #constructor
self.Bno=N
self.BName=S
def Assign(self, N,S):
self.Bno= self.Bno + N
self.BName= S + self.BName
def ShowVal(self):
print(self.Bno,"#",self.BName)
s=Book()
t=Book(200)
u=Book(300,"Made Easy")
s.ShowVal()
t.ShowVal()
u.ShowVal()
s.Assign(5, "Made ")
t.Assign(15,"Easy ")
u.Assign(25,"Made Easy")
s.ShowVal()
t.ShowVal()
u.ShowVal()
C. Sir| Created: 11-Jan-2019 | Updated: 11-Jan-2019|CBSE12A-2016
