Python Quiz-5

Python Quiz-5

University

10 Qs

quiz-placeholder

Similar activities

Generalidades OBC

Generalidades OBC

University

15 Qs

Reducción en los costos de las comunicaciones e internet.

Reducción en los costos de las comunicaciones e internet.

University

10 Qs

Chapter 2: Input Device

Chapter 2: Input Device

12th Grade - University

12 Qs

Hệ Điều Hành Của Máy Tính

Hệ Điều Hành Của Máy Tính

10th Grade - University

10 Qs

FSA,DFA dan NFA

FSA,DFA dan NFA

University

15 Qs

Node.js

Node.js

University

10 Qs

Parcial - Módulo IV

Parcial - Módulo IV

1st Grade - University

15 Qs

Habilidades digitales

Habilidades digitales

University

15 Qs

Python Quiz-5

Python Quiz-5

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

shilpa gupta

Used 29+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers