import random class Person: def __init__(self, persons_name, shirt_color = "blue"): self.name = persons_name self.shirt_color = shirt_color def get_shirt_color(self): return self.shirt_color def get_name(self): return self.name def change_shirt(self): colors = ["blue", "red", "green", "funny"] self.shirt_color = random.choice(colors) def __str__(self): return self.name + ", wearing a " + self.shirt_color + " shirt" # using the person class p1 = Person("Teran") p2 = Person("Grace", "green") for i in range(1,8): print("-" * 10) print("Day " + str(i)) print(p1) print(p2) if p1.get_shirt_color() == p2.get_shirt_color(): print(p1.get_name() + " and " + p2.get_name() + \ " are wearing the same shirt color!") # print a blank line print() p1.change_shirt() p2.change_shirt()