create a student class and initialize it with name and roll number in python code example
Example: create a student class and initialize it with name and roll number in python
class Student():
def __init__(self,name,roll):
self.name = name
self.roll= roll
def display(self):
print self.name
print self.roll
def setAge(self,age):
self.age=age
def setMarks(self,marks):
self.marks = marks