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
Which of the following statements is false?
Free
(Multiple Choice)
4.7/5
(36)
Correct Answer:
D
Which of the following statements a), b) or c) is false?
Free
(Multiple Choice)
4.7/5
(42)
Correct Answer:
A
Which of the following statements a), b) or c) is false?
Free
(Multiple Choice)
4.8/5
(38)
Correct Answer:
B
Properties look like ________ to client-code programmers, but control the manner in which they get and modify an object's data.
(Multiple Choice)
4.9/5
(37)
The following code and traceback shows that our class Time's hour property xe "validate data"validates the values you assign to it: In [10]: wake_up.hour = 100
---------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-10-1fce0716ef14> in <module>()
----> 1 wake_up.hour = 100
~/Documents/examples/ch10/timewithproperties.py in hour(self, hour)
20 """Set the hour."""
21 if not (0 <= hour < 24):
---> 22 raise ValueError(f'Hour ({hour}) must be 0-23')
23
24 self._hour = hour
ValueError: Hour (100) must be 0-23
Which of the following statements a), b) or c) is false?
(Multiple Choice)
4.7/5
(34)
Most object-oriented programming languages enable you to encapsulate (or hide) an object's data from the client code. Such data in these languages is said to be ________ data.
(Multiple Choice)
4.8/5
(39)
Assume that class Time's __init__ method receives hour, minute and second parameters. Based on the following code: wake_up = Time(hour=6, minute=30)
Which of the following statements is true?
(Multiple Choice)
4.8/5
(42)
Properties are implemented as ________, so they may contain additional logic, such as specifying the format in which to return a data attribute's value or validating a new value before using it to modify a data attribute.
(Multiple Choice)
4.8/5
(45)
Which of the following statements about code snippets that use class Account is false?
(Multiple Choice)
4.8/5
(40)
When you evaluate a variable in IPython it calls the corresponding object's ________ special method to produce a string representation of the object.
(Multiple Choice)
4.8/5
(29)
Showing 1 - 20 of 42
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)