Question: Look at the following class definitions: class Art: def _ _init_ _(self, art_type): self._ _art_type = art_type def message(self): print(I'm a piece of art.) class
Look at the following class definitions:
class Art:
def _ _init_ _(self, art_type):
self._ _art_type = art_type
def message(self):
print("I'm a piece of art.")
class Painting(Art):
def _ _init_ _(self):
Art._ _init_ _(self, 'painting')
def message(self):
print("I'm a painting.")
Given these class definitions, what will the following statements display?
a = Art('sculpture')
p = Painting()
a.message()
p.message()
Step by Step Solution
3.34 Rating (157 Votes )
There are 3 Steps involved in it
There appears to be a typographical error in the class definitions The underscores in the ... View full answer
Get step-by-step solutions from verified subject matter experts
