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

1 Expert Approved Answer
Step: 1 Unlock

There appears to be a typographical error in the class definitions The underscores in the ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Starting Out With Python Questions!