✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Mis prinditakse konsooli kui järgnev koodijupp tööle panna?
class Apple: def __init__(self, variety): self.variety = variety def __repr__(self): return f"Apple(variety='{self.variety}')" class Orange: def __init__(self, variety): self.variety = variety def __eq__(self, other): return isinstance(other, Apple) and self.variety == other.varietyif __name__ == '__main__': apple = Apple("Gala") orange = Orange("Navel") print(apple) print(orange == apple)