Question: Question 3 5 [ 0 5 ] class Auto: def _ _ init _ ( self ) : pass def displayMessage ( x ) :

Question 35
[05]
class Auto:
def__init_(self):
pass
def displayMessage (x) :
pr(x)
class Vehicle(Auto):
def__init__(self):
self.__color =
rav4= Vehicle()
rav4.displayMessage("My Car is RAV4")
The above code proves Inheritance
rav4 should not be an instance of Vehicle class
The above code will not run because displayMessage does not belong to Vehicle class
The above code throws an error
 Question 35 [05] class Auto: def__init_(self): pass def displayMessage (x) :

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 Databases Questions!