Oct-30-2018, 05:15 PM
Obviously indentation of line 63 is off. Fix it so that it is aligned with the line above. However you are not listening to what @ichabod801 tells you. Your class should look like this
class Person(object): """ The Person class defines a person in terms of a name, phone number, and email address. """ # Constructor def __init__(self, name, phone, email, address): self.name = name self.phone = phone self.email = email self.adress = address def __str__(self): return "Person[name={}, phone={}, email={}, address={}]".format(self.name, self.phone, self.email, self.adress) # create instance person = Person(name='John Doe', phone='123454321', email='[email protected]', address='1600 Pennsylvania ave., Washington DC') #access property print(person.name) #print object print(person) # assign new value of property person.name = 'Jack Ryan' # print again print(person)
Output:John Doe
Person[name=John Doe, phone=123454321, [email protected], address=1600 Pennsylvania ave., Washington DC]
Person[name=Jack Ryan, phone=123454321, [email protected], address=1600 Pennsylvania ave., Washington DC]
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs