Changes

Jump to: navigation, search

Rchan sandbox

48 bytes added, 14:35, 2 November 2019
Part 1 - Simple Object Class with external functions
== Part 1 - Simple Object Class with external functions ==
In this part, we consider a time object which has three data attributes, namely: hour, minute, and second. The following Python script '''lab7a.py''' provides the blue print for building such a time object and also defines three external functions that : format_time(), sum_times(), and valid_time(), which can manipulate the time object.
<source lang="python">
#!/usr/bin/env python3
1,760
edits

Navigation menu