Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> ================================ RESTART ================================ >>> age = 65 age = 65 name = Joel name = Joel >>> ================================ RESTART ================================ >>> age = 66 age = 66 name = Joel name = Joel >>> ================================ RESTART ================================ >>> Traceback (most recent call last): File "C:/Users/mil28/Desktop/Person2.py", line 27, in p.age = -66 File "C:/Users/mil28/Desktop/Person2.py", line 10, in set_age raise ValueError('age must be a positive int') ValueError: age must be a positive int >>> ================================ RESTART ================================ >>> Traceback (most recent call last): File "C:/Users/mil28/Desktop/Person2.py", line 28, in p.age = -66 File "C:/Users/mil28/Desktop/Person2.py", line 10, in set_age raise ValueError('age must be a positive int') ValueError: age must be a positive int >>> ================================ RESTART ================================ >>> Traceback (most recent call last): File "C:/Users/mil28/Desktop/Person2.py", line 29, in p.age_const = 10 AttributeError: can't set attribute >>> ================================ RESTART ================================ >>> Traceback (most recent call last): File "C:/Users/mil28/Desktop/Person2.py", line 50, in print('age =', p.age_const) AttributeError: 'Person' object has no attribute 'age_const' >>> ================================ RESTART ================================ >>> age = 67 name = Joel name = Joel birthdate = (1954, 11, 4) Traceback (most recent call last): File "C:/Users/mil28/Desktop/Person2.py", line 54, in p.birthdate = (1955, 11, 4) AttributeError: can't set attribute >>> ================================ RESTART ================================ >>> age = 67 name = Joel name = Joel birthdate = (1954, 11, 4) Not equal. >>> ================================ RESTART ================================ >>> age = 67 name = Joel name = Joel birthdate = (1954, 11, 4) Not equal. >>> ================================ RESTART ================================ >>> age = 67 name = Joel name = Joel birthdate = (1954, 11, 4) Not equal. >>> ================================ RESTART ================================ >>> age = 67 name = Joel name = Joel birthdate = (1954, 11, 4) People are equal. >>> ================================ RESTART ================================ >>> age = 67 name = Joel name = Joel birthdate = (1954, 11, 4) Joel Not equal. >>> ================================ RESTART ================================ >>> age = 67 name = Joel name = Joel birthdate = (1954, 11, 4) Joel People are not equal. >>> ================================ RESTART ================================ >>> age = 67 name = Joel name = Joel birthdate = (1954, 11, 4) Joel Traceback (most recent call last): File "C:/Users/mil28/Desktop/Person2.py", line 69, in if p == ("Joel", 65, (1954, 11, 4)): File "C:/Users/mil28/Desktop/Person2.py", line 53, in __eq__ if x.name.lower() == y.name.lower() and x.__BIRTHDATE == y.__BIRTHDATE: AttributeError: 'tuple' object has no attribute 'name' >>> ================================ RESTART ================================ >>> age = 67 name = Joel name = Joel birthdate = (1954, 11, 4) Traceback (most recent call last): File "C:/Users/mil28/Desktop/Person2.py", line 71, in if p == ("Joel", 65, (1954, 11, 4)): File "C:/Users/mil28/Desktop/Person2.py", line 58, in __eq__ raise TypeError("Person can only be compared to another person.") TypeError: Person can only be compared to another person. >>> ================================ RESTART ================================ >>> age = 67 name = Joel name = Joel birthdate = (1954, 11, 4) People are not equal. >>> ================================ RESTART ================================ >>> age = 67 name = Joel name = Joel birthdate = (1954, 11, 4) People are equal. >>> ================================ RESTART ================================ >>> Traceback (most recent call last): File "C:/Users/mil28/Desktop/Person2.py", line 71, in p1 = Person("Joel", 65, (1954, 11, 4)) TypeError: __init__() missing 1 required positional argument: 'children' >>> ================================ RESTART ================================ >>> age = 67 name = Joel name = Joel birthdate = (1954, 11, 4) Traceback (most recent call last): File "C:/Users/mil28/Desktop/Person2.py", line 80, in q = Person("Alice", 6, (2009, 11, 4)) TypeError: __init__() missing 1 required positional argument: 'children' >>> ================================ RESTART ================================ >>> age = 67 name = Joel name = Joel birthdate = (1954, 11, 4) [] [<__main__.Person object at 0x042DE7B0>] >>> ================================ RESTART ================================ >>> age = 67 name = Joel name = Joel birthdate = (1954, 11, 4) child = Alice >>> ================================ RESTART ================================ >>> age = 67 name = Joel name = Joel birthdate = (1954, 11, 4) children are: children are: child = Alice >>>