# Author: James Tam # Version: June 13, 2017 # Learning goal: illustrating why is the self needed # in class methods class Person: def __init__(self): self.name = "I have no name :(" def sayName(self): print("My name is...", self.name) def start(): lisa = Person() lisa.name = "Lisa Simpson, pleased to meet you." bart = Person() bart.name = "I'm Bart Simpson, who the hek are you???!!!" lisa.sayName() bart.sayName() start()