Question:
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.
C. Sir| Created: 10-Jan-2019 | Updated: 10-Jan-2019|CBSE12A-2017
