Exam 9: Design With Classes
Exam 1: Introduction50 Questions
Exam 2: Software Development Data Types and Expressions50 Questions
Exam 3: Loops and Selection Statements50 Questions
Exam 4: Strings and Text Files50 Questions
Exam 5: Lists and Dictionaries50 Questions
Exam 6: Design With Functions50 Questions
Exam 7: Simple Graphics and Image Processing50 Questions
Exam 8: Graphical User Interrfaces50 Questions
Exam 9: Design With Classes50 Questions
Exam 10: Multithreading Networks and Client Server Programming50 Questions
Exam 11: Searching Sorting and Complexity Analysis51 Questions
Select questions type
Python has a built-in type for rational numbers called rational.
(True/False)
4.8/5
(34)
The str method is a good example of a polymorphic method that appears throughout Python's system of classes.
(True/False)
4.9/5
(36)
In the context of Python objects, what does the pickling process do?
(Multiple Choice)
4.8/5
(40)
The attributes of an object are represented as what type of variables?
(Multiple Choice)
4.9/5
(37)
As a rule of thumb, when should you include an __eq__ method in a class?
(Multiple Choice)
4.8/5
(35)
Inheritance allows a class to automatically reuse and extend the code of similar but more general classes.
(True/False)
4.8/5
(38)
The Python interpreter picks out equality from the other comparisons by looking for an __equals__ method when it encounters the == and != operators.
(True/False)
5.0/5
(36)
A method automatically returns the value None when it includes no return statement.
(True/False)
5.0/5
(39)
What type of programming is defined by the term "imperative programming"?
(Multiple Choice)
4.9/5
(35)
When the pickle.load function reaches the end of a file, what type of exception is raised?
(Multiple Choice)
4.8/5
(29)
Any object can be pickled before it is saved to a file, and then unpickled as it is loaded from a file into a program.
(True/False)
4.7/5
(39)
Python programmers typically capitalize their own class names to distinguish them from variable names.
(True/False)
4.9/5
(45)
What method is known as a class's constructor, because it is run automatically when a user instantiates the class?
(Multiple Choice)
4.8/5
(33)
What are the two access modes that are used when opening a file for input and output when pickling? (Choose two.)
(Multiple Choice)
4.8/5
(42)
Unlike other object-oriented languages, Python does not support polymorphic methods.
(True/False)
5.0/5
(35)
What type of programming is defined by the term "procedural programming"?
(Multiple Choice)
4.8/5
(41)
What type of programming is defined by the term "functional programming"?
(Multiple Choice)
4.9/5
(40)
If the parenthesized parent class name is omitted from the class definition, the new class is automatically made a subclass of self.
(True/False)
4.8/5
(33)
Showing 21 - 40 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)