FGWHN Python OOP - Polymorphism

FGWHN Python OOP - Polymorphism

University

10 Qs

quiz-placeholder

Similar activities

Quiz1

Quiz1

University

8 Qs

Python_OOP_Intro_Quiz

Python_OOP_Intro_Quiz

University

13 Qs

Unit 2 Inheritance in Java

Unit 2 Inheritance in Java

12th Grade - University

15 Qs

ADPROG1

ADPROG1

University

10 Qs

Final Exam Review

Final Exam Review

University

13 Qs

COMPUTER PROGRAMMING 2- SEATWORK 2- INTRO TO OBJECT OOP

COMPUTER PROGRAMMING 2- SEATWORK 2- INTRO TO OBJECT OOP

University

10 Qs

Java quiz-2024-Sec-B

Java quiz-2024-Sec-B

University

12 Qs

Java Juggling

Java Juggling

University

10 Qs

FGWHN Python OOP - Polymorphism

FGWHN Python OOP - Polymorphism

Assessment

Quiz

Computers

University

Medium

Created by

Doãn Tùng

Used 6+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is polymorphism in OOP?

A way to create classes and objects.

The ability of an object to take on many forms.

A type of variable in Python.

A way to sort elements in Python.

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

How is polymorphism implemented in Python?

Through using multiple inheritance.

By using the polymorphic keyword.

Through defining different classes with the same method names.

Python doesn't support polymorphism.

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is a key feature of polymorphism?

Objects of different types can be passed to the same function.

All objects must be of the same type.

Only integers and strings can be used with polymorphism.

Polymorphism is only applicable to data structures.

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

In Python, why is polymorphism useful with inheritance?

It allows objects from a child class to be treated as objects from a parent class.

It is required for inheritance to work.

It makes the code less readable.

Polymorphism is not useful with inheritance.

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What is the output?

"Drawing a shape"

"Drawing a circle"

Error, invalid method call.

None of the above.

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

Given the following code, how would you call the speak function to print "Hello"?

speak(English)

speak(Spanish)

speak(English())

speak(Spanish())

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

  1. What will be the output of the following Python code?

100 km/h

150 km/h

Error, invalid method call.

None of the above.

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?