Exam 10: Object-Oriented Programming
Exam 1: Introduction to Computers and Python 28 Questions
Exam 2: Introduction to Python Programming 32 Questions
Exam 3: Control Statements and Program Development 20 Questions
Exam 4: Functions 18 Questions
Exam 5: Sequences: Lists and Tuples 25 Questions
Exam 6: Dictionaries and Sets 27 Questions
Exam 7: Array-Oriented Programming With Num 18 Questions
Exam 8: Strings: a Deeper Look 20 Questions
Exam 9: Files and Exceptions 30 Questions
Exam 10: Object-Oriented Programming 42 Questions
Exam 11: Computer Science Thinking: Recursion, Searching, Sorting and Big O18 Questions
Exam 12: Natural Language Processing 22 Questions
Exam 13: Data Mining Twitter 15 Questions
Exam 14: Ibm Watson and Cognitive Computing 31 Questions
Exam 15: Machine Learning: Classification, Regression and Clustering 66 Questions
Exam 16: Deep Learning 76 Questions
Exam 17: Big Data: Hadoop, Spark, Nosql and Iot 79 Questions
Select questions type
The ________ special method is called implicitly when you convert an object to a string with the built-in function xe "built-in function:str"xe "str built-in function"str, such as when you print an object or call xe "built-in function:str"xe "str built-in function"str explicitly.
(Multiple Choice)
4.9/5
(32)
To create a Decimal object, we can write: value = Decimal('3.14159')
This is known as a(n) ________ expression because it builds and initializes an object of the class.
(Multiple Choice)
4.8/5
(36)
Consider the following loop, which processes a list of employees: for employee in employees:
Print(employee)
Print(f'{employee.earnings():,.2f}\n')
Which of the following statements a), b) or c) is false?
(Multiple Choice)
4.9/5
(42)
Each new class you create becomes a new data type that can be used to create objects. This is one reason why Python is said to be a(n) ________ language.
(Multiple Choice)
4.8/5
(31)
Class Time's properties and methods define the class's ________ interface, that is, the properties and methods programmers should use to interact with objects of the class.
(Multiple Choice)
4.9/5
(42)
Which of the following statements about a class's utility methods is false?
(Multiple Choice)
4.9/5
(35)
Consider the following code which would set the hour of a Time object to an invalid value. wake_up._hour = 100
Which of the following statements is false?
(Multiple Choice)
4.8/5
(31)
Consider the following class Time __init__ method: def __init__(self, hour=0, minute=0, second=0):
"""Initialize each attribute."""
Self.hour = hour # 0-23
Self.minute = minute # 0-59
Self.second = second # 0-59
Which of the following statements a), b) or c) is false?
(Multiple Choice)
4.8/5
(34)
Python class ________ defines the special methods that are available for all Python objects.
(Multiple Choice)
4.9/5
(44)
Showing 21 - 40 of 42
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)