Question: Questions of Python 1. class Reptile(Animal): In the class declaration for Reptile , Animal is the superclass True False 2. class Reptile(Animal): In the class

Questions of Python 1. class Reptile(Animal): 

In the class declaration for Reptile, Animal is the superclass

True

False

2.

class Reptile(Animal): 

In the class declaration for Reptile, Reptile is the subclass of Animal

True
False

3.

Within a subclass's __init__, you must call the superclass's __init__ method and pass the required arguments and self as an argument.

True
False

4.

_____________ allows subclasses to have methods with the same names as methods in their superclasses and gives the program the ability to call the correct method depending on the type of object that is used to call it.

Compiler
Protocols
Polymorphism
Interpreter

5.

When a subclass method has the same name as a superclass method, the subclass method _________ the superclass method.

overwrites
replaces
writes
overrides

6.

The ________ function is used to determine whether an object is an instance of a specific class, or a subclass of that class.

isinstance
is_of_type
typeof
instance_of_type

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!