my code
class Art:
def init(self, artist, title,medium, year, owner):
self.artist = artist
self.title = title
self.medium = medium
self.year = year
self.owner = owner
def repr(self):
return “{}. {}. {}, {}, {}, {}.” .format(artist, title, medium , year ,owner.name , owner.location )
class Marketplace:
def init(self):
self.listings =
def add_listing(self, new_listing):
self.listings.append(new_listing)
def remove_listing(self, expire_listing):
self.listings.remove(expire_listing)
def show_listings(self):
for listing in self.listings:
print(listing)
class Client:
def init(self, name, location, is_museum):
self.name = name
self.is_museum = is_museum
if self.is_museum == True:
self.location = location
else:
self.location = “Private Colections”
def sell_artwork(self, artwork, price):
if artwork.owner == self:
new_listing = Listing(artwork, price, self)
venner.add_listing(new_listing)
class Listing:
def init(self, art, price, seller):
self.art = art
self.price = price
self.seller = seller
def repr(self):
return “%s, %s.” %(self.art, self.price)
veneer = Marketplace()
veneer.show_listings()
edytta = Client(“Edytta Halpirt”, None, False)
moma = Client(“MOMA”, “New York”, True)
girl_with_mandolin = (“Picasso, Pablo”,“Girl with a Mandolin (Fanny Tellier)”,1910 ,“oil on canvas”, edytta)
print(girl_with_mandolin)
edytta.sell_artwork(girl_with_mandolin, “6M(USD)”)
code return:
(‘Picasso, Pablo’, ‘Girl with a Mandolin (Fanny Tellier)’, 1910, ‘oil on canvas’, <main.Client object at 0x7f55610d5cc0>)
Traceback (most recent call last):
File “script.py”, line 62, in
edytta.sell_artwork(girl_with_mandolin, “6M(USD)”)
File “script.py”, line 36, in sell_artwork
if artwork.owner == self:
AttributeError: ‘tuple’ object has no attribute 'owner’¨
what problem…main and traceback …help pls