Changes

Jump to: navigation, search

Rchan sandbox

67 bytes added, 16:17, 3 November 2019
Part 1 - Classes and Methods for our Time objects
>>>
</source>
:3. Note Please study the output of the interactive shell session above and note that in order to call the format_time() function, we have to prefix it with the class name '''Time''' as it is under the class definition in lab7d.py. Also note that format_time() is now a method of the time object '''t1''.
:4. Also note that when we called the print() function with our time object, the print function only able to show that it is an Time object, but unable to display its properties (i.e. data attributes) like the values of its hour, minute, and second attributes.
1,760
edits

Navigation menu