Look at the following class definitions: class Art: def _ _init_ _(self, art_type): self._ _art_type = art_type

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 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()

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: