Python Inheritance and Polymorphism Quiz

Python Inheritance and Polymorphism Quiz

1st Grade

51 Qs

quiz-placeholder

Similar activities

RCV-Khối Tiểu học

RCV-Khối Tiểu học

1st - 3rd Grade

50 Qs

Enduring Skills Test Review

Enduring Skills Test Review

KG - University

46 Qs

Help!

Help!

KG - Professional Development

50 Qs

Patient Zero - Vocbulary - Alex Ridgway

Patient Zero - Vocbulary - Alex Ridgway

KG - Professional Development

47 Qs

discover 2b unit 15-18

discover 2b unit 15-18

1st - 2nd Grade

50 Qs

Year 1 English Unit 1 (Revision)

Year 1 English Unit 1 (Revision)

1st Grade

50 Qs

MIDTERM A2 UNITS 1 TO 6

MIDTERM A2 UNITS 1 TO 6

1st Grade

48 Qs

Year 1 Revision Unit 0 - 4

Year 1 Revision Unit 0 - 4

1st Grade

50 Qs

Python Inheritance and Polymorphism Quiz

Python Inheritance and Polymorphism Quiz

Assessment

Quiz

English

1st Grade

Medium

Created by

Айша Асылбек

Used 1+ times

FREE Resource

51 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you define a variable visible to all instances?

self.variable

_variable

ClassName.variable

var = 0 in init

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function returns a readable string of an object?

describe

string

str

text

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can child classes access superclass protected members?

Through imports

Using super()

Via private access

With decorators

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function allows invocation of a superclass's method?

parent.method()

base()

super()

root.method()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If a class inherits from more than one class, it's called:

Interface merging

Multilevel hierarchy

Multiple inheritance

Deep linking

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does MRO help determine?

Object creation speed

Method call sequence

Memory reference optimization

Recursive class calls

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What issue arises from complex multiple inheritance?

Shadowing

Method overuse

Diamond problem

Recursive constructors

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?