Skip to content

Instantly share code, notes, and snippets.

@qoelet
Created August 10, 2010 06:04
Show Gist options
  • Save qoelet/516781 to your computer and use it in GitHub Desktop.
Save qoelet/516781 to your computer and use it in GitHub Desktop.
class Student():
def __init__(self):
self.grade = ''
self.name = ''
self.sclass = ''
self.form_teacher = ''
def register(self, name):
self.name = name
def assign_class(self, sclass, teacher):
self.sclass = sclass
self.form_teacher = teacher
def chat(self):
print "hello, i'm %s from %s and my teacher is %s." % (self.name, self.sclass, self.teacher)
kenny = Student()
kenny.register('kenny')
kenny.assign_class('4B','Mr Sim')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment