Question: # Resolve the error in the program given below. # Identify the parent class and child class. Place your answer in a comment. class Tree

# Resolve the error in the program given below.
# Identify the parent class and child class. Place your answer in a comment.
class Tree(Plant):
def __init__(self):
Plant.__init__(self, 'tree')
def message(self):
print("I'm a tree.")
class Plant:
def __init__(self, plant_type):
self.__plant_type = plant_type
def message(self):
print("I'm a plant.")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Programming Questions!