Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Intro to Python
Quiz 10: Object-Oriented Programming
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 21
Multiple Choice
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?
Question 22
Multiple Choice
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.
Question 23
Multiple Choice
Which of the following statements a) , b) or c) is false?
Question 24
Multiple Choice
Which of the following statements about a class's utility methods is false?
Question 25
Multiple Choice
Which of the following statements a) , b) or c) is false?
Question 26
Multiple Choice
Which of the following statements a) , b) or c) is false?
Question 27
Multiple Choice
Which of the following statements a) , b) or c) is false?
Question 28
Multiple Choice
Which of the following statements is false?
Question 29
Multiple Choice
Which of the following statements is false?
Question 30
Multiple Choice
Consider the following code from our class Time: @property Def hour(self) : """Return the hour.""" Return self._hour @hour.setter Def hour(self, hour) : """Set the hour.""" If not (0 <= hour < 24) : Raise ValueError(f'Hour ({hour}) must be 0-23') Self._hour = hour
Question 31
Multiple Choice
Which of the following statements a) , b) or c) is false?
Question 32
Multiple Choice
A read-only property has ________.
Question 33
Multiple Choice
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?
Question 34
Multiple Choice
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.