What is the process of creating a new class from an existing class?
Inheritance.
What is a blueprint for creating objects in Object-Oriented Programming?
Class.
1/21
p.1
Polymorphism and Inheritance

What is the process of creating a new class from an existing class?

Inheritance.

p.1
Object-Oriented Programming

What is a blueprint for creating objects in Object-Oriented Programming?

Class.

p.1
Control Flow and Conditions

What is a loop that continues indefinitely until externally stopped?

Infinite loop.

p.1
Data Types and Structures

What type of data structure in Python is mutable and can hold key-value pairs?

Dictionary.

p.1
Programming Paradigms and Language Features

What is the term for a programming language that executes instructions directly without compiling?

Interpreted.

p.1
Polymorphism and Inheritance

What allows different classes to be treated as instances of the same class through a common interface?

Polymorphism.

p.1
Functions and Arguments

What is a collection of related functions and variables in Python?

Module.

p.1
Abstraction and Encapsulation

What is a key feature of Object-Oriented Programming that allows hiding the internal state of an object?

Encapsulation.

p.1
Data Types and Structures

What is a data structure that is immutable and can hold multiple items?

Tuple.

p.1
Functions and Arguments

What allows functions to accept a variable number of arguments?

Keyword-Arguments.

p.1
Functions and Arguments

What is a special type of function in Python that can be called with a variable number of arguments?

Arbitrary.

p.1
Data Types and Structures

What is a data type that represents true or false values?

Bool.

p.1
Control Flow and Conditions

What is the term for a programming construct that allows for decision-making?

Conditions.

p.1
Data Types and Structures

What is a feature of Python that allows for dynamic type checking?

Dynamically Typed.

p.1
Programming Paradigms and Language Features

What is the term for a programming paradigm that focuses on the use of objects?

Object-Oriented.

p.1
Programming Paradigms and Language Features

What is a high-level programming language that is designed for readability and simplicity?

Python.

p.1
Object-Oriented Programming

What is the primary purpose of a class in Object-Oriented Programming?
A) To define a function
B) To create a blueprint for objects
C) To handle exceptions
D) To perform arithmetic operations
E) To manage file input/output

B) To create a blueprint for objects
Explanation: In Object-Oriented Programming, a class serves as a blueprint for creating objects, encapsulating data for the object and methods to manipulate that data.

p.1
Polymorphism and Inheritance

What does polymorphism allow in programming?
A) The ability to create multiple classes
B) The ability to use a single interface to represent different underlying forms (data types)
C) The ability to handle exceptions
D) The ability to define default values for function arguments
E) The ability to create infinite loops

B) The ability to use a single interface to represent different underlying forms (data types)
Explanation: Polymorphism allows methods to do different things based on the object it is acting upon, enabling a single interface to represent different data types.

p.1
Functions and Arguments

What is the purpose of keyword arguments in Python functions?
A) To define a function without parameters
B) To allow passing arguments in any order
C) To create infinite loops
D) To handle exceptions
E) To define default values for all parameters

B) To allow passing arguments in any order
Explanation: Keyword arguments allow you to specify arguments by name, enabling you to pass them in any order, which enhances code readability and flexibility.

p.1
Data Types and Structures

Which of the following data types is immutable?
A) List
B) Dictionary
C) Set
D) Tuple
E) NumPy array

D) Tuple
Explanation: Tuples are immutable data types in Python, meaning that once they are created, their elements cannot be changed, unlike lists and dictionaries which are mutable.

p.1
Abstraction and Encapsulation

Which of the following best describes encapsulation?
A) Hiding the internal state and requiring all interaction to be performed through an object's methods
B) The ability of different classes to be treated as instances of the same class through a common interface
C) The process of creating new classes from existing ones
D) The ability to define functions that can take a variable number of arguments
E) The process of converting one data type to another

A) Hiding the internal state and requiring all interaction to be performed through an object's methods
Explanation: Encapsulation is a fundamental concept in Object-Oriented Programming that restricts direct access to some of an object's components, which is a means of preventing unintended interference and misuse.

Study Smarter, Not Harder
Study Smarter, Not Harder