Good Morning
10:52 am

Sponsor Area

Sponsor Area

Question is

class Exam:
	Regno=1
	Marks=75
	def __init__(self,r,m): #function 1
		self.Regno=r
		self.Marks=m
	def Assign(self,r,m): #function 2
		Regno = r
		Marks = m
	def Check(self): #function 3
		print self.Regno, self.Marks
		print Regno, Marks

(i) In the above class definition, both the functions - function 1 as well as function 2 have similar definition. How are they different in execution?

(ii) Write statements to execute function 1 and function 2.

Mock Test Series

Sponsor Area

Sponsor Area

NCERT Book Store

NCERT Sample Papers

Entrance Exams Preparation