class IFTTD_Cap: def __init__(self): self.material = "quality_material" self.design = "colors_of_IFTTD_podcast" self.size = "adjustable_strap" self.protects_from = ["UV_rays", "rain"] self.for_people = ["morning_hackers", "night_coders"] def wear(self, weather): if weather == "SUNNY": return "Protecting from sun's UV rays!" elif weather == "RAIN": return "Keeping your hair dry!" else: return "Looking stylish in any weather!" def is_it_for_you(self, person_type): return person_type in self.for_people def purchase(self): print("Adding CAP_IFTTD to your wardrobe...") print("Happy coding!") # Usage: cap = IFTTD_Cap() weather_today = "SUNNY" # Or "RAIN" or anything else person = "morning_hackers" # Or "night_coders" print(cap.wear(weather_today)) if cap.is_it_for_you(person): cap.purchase() else: print("This cap suits everyone, especially coders!")