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!")
La pire des choses, c'est de ne rien faire. On sait que ça ne marche pas, alors testons.Voir l'épisode
Aujourd'hui, c'est vraiment l'année de la souveraineté&hellip grâ ou à cause de Trump.Voir l'épisode