Solved

Consider the Following Class Time __Init__ Method: Def __Init__(self, Hour=0

Question 38

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?


A) Class Time's __init__ method specifies hour, minute and second parameters, each with a default argument of 0.
B) The self parameter is a reference to the Time object being initialized.
C) The statements containing self.hour, self.minute and self.second appear to create hour, minute and second attributes for the new Time object (self) . However, these statements may actually call methods that implement the class's hour, minute and second properties.
D) All of the above statements are true.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions