Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class student:
- def __init__(self, name, id):
- self.name = name
- self.id = id
- def changeID(self, id):
- self.id = id
- def print(self):
- print("{} - {}".format(self.name, self.id))
- print("creating a new student named Jane. Here is her info!")
- jane = student("Jane", 10)
- jane.print()
- jane.changeID(11)
- jane.print()
Advertisement
Add Comment
Please, Sign In to add comment