1,760
edits
Changes
→Part 3 - Operator overloading
== Part 3 - Operator overloading ==
: Attached code to operator '+' and '-' to support the operation of adding two time object.
<source lang="python">
def __add__(self, t2):
seconds = self.time_to_sec() + t2.time_to_sec()
return sec_to_time(seconds)
</source>
= Investigation III - Objects and Scope =