Create a Person
class which which takes name
and age
parameters at initialization. Then create a method compare_age
which takes a person as a parameter and returns a string with the following format:
{other_person} is {older than / younger than / the same age as} me.
p1 = Person("Samuel", 24)
p2 = Person("Joel", 36)
p3 = Person("Lily", 24)
p1.compare_age(p2) ➞ "Joel is older than me."
p2.compare_age(p1) ➞ "Samuel is younger than me."
p1.compare_age(p3) ➞ "Lily is the same age as me."