Good Evening
17:41 pm

Sponsor Area

Sponsor Area

Question is

Find and write the output of the following python code:
class Notes:

	def __init__(self,N=100,Nt='CBSE'): #constructor
		self.Nno=N
		self.NName=Nt

	def Allocate(self, N,Nt):
		self.Nno= self.Nno + N
		self.NName= Nt + self.NName

	def Show(self):
		print(self.Nno,'#',self.NName)

s=Notes()
t=Notes(200)
u=Notes(300,'Made Easy')
s.Show()
t.Show()
u.Show()
s.Allocate(4, 'Made ')
t.Allocate(10,'Easy ')
u.Allocate(25,'Made Easy')
s.Show()
t.Show()
u.Show()

Mock Test Series

Sponsor Area

Sponsor Area

NCERT Book Store

NCERT Sample Papers

Entrance Exams Preparation