
Python Quiz-5

Quiz
•
Computers
•
University
•
Hard
shilpa gupta
Used 29+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
1. Which of the following best describes inheritance?
Ability of a class to derive members of another class as a part of its own definition
Means of bundling instance variables and methods in order to restrict access to certain class members
Focuses on variables and passing of variables to functions
Allows for implementation of elegant software that is well designed and easily modified
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements is wrong about inheritance?
Protected members of a class can be inherited
The inheriting class is called a subclass
Private members of a class can be inherited and accessed
Inheritance is one of the features of OOP
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class A():
def disp(self):
print("A disp()")
class B(A):
pass
obj = B()
obj.disp()
Invalid syntax for inheritance
Error because when object is created, argument must be passed
Nothing is printed
A disp()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
All subclasses are a subtype in object-oriented programming.
True
False
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a type of inheritance?
Double
Single
Multiple
Multilevel
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type of inheritance is illustrated in the following Python code?
class A():
pass
class B():
pass
class C(A,B):
pass
Multilevel
Single
Multiple
Hybrid
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type of inheritance is illustrated in the following Python code?
class A():
pass
class B(A):
pass
class C(B):
pass
Multilevel
Multiple
Single
Hybrid
Create a free account and access millions of resources
Similar Resources on Wayground
5 questions
Pragramming Quiz

Quiz
•
University
5 questions
EIST 06

Quiz
•
University
10 questions
Android Basics - Pre Requisite

Quiz
•
10th Grade - Professi...
10 questions
ISPFL1 Midterm Quiz #3

Quiz
•
University
15 questions
Java Bootcamp Day 4

Quiz
•
University
10 questions
Java OOPs Concepts

Quiz
•
12th Grade - University
9 questions
Classes

Quiz
•
University
10 questions
FOP - CHAPTER 8

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University