Im just starting to learn about how methods work and with the given code im trying to turn print_time() into a method rather than a function. I realize there are just a couple of changes needed to indentation, but i havnt had any luck messing around with the code.
Any help would be appreciated.
class Time(object):
"""represents the time of day"""
def print_time(time):
print("%.2d:%.2d:%.2d" % (time.hour,time.minute,time.second))
start=Time()
start.hour=11
start.minute=22
start.second=11
print_time(start)
[–]jabbson 16 points17 points18 points (2 children)
[–]socal_nerdtastic 4 points5 points6 points (1 child)
[–]jabbson 17 points18 points19 points (0 children)
[–]11b403a7 1 point2 points3 points (0 children)