time - Best timing method in Python? -
i need assignment ,its first time computer science .please one. question.****type return statement: "return " followed expression performs calculation described in table above. (remember return statement used give value caller of function.) def seconds_difference(time_1, time_2):**** """ (number, number) -> number
return number of seconds later time in seconds time_2 time in seconds time_1. >>> seconds_difference(1800.0, 3600.0) 1800.0 >>> seconds_difference(1800.0, 3600.0) -1800.0 >>> seconds_difference(1800.0, 2160.0) 360.0 >>> seconds_difference(1800.0, 1800.0) 0.0 """
i wish best of luck in class. here's help:
def seconds_difference(first, second): return second - first print(seconds_difference(1800.0, 2160.0))
you should read functions:
http://anh.cs.luc.edu/python/hands-on/3.1/handsonhtml/functions.html
Comments
Post a Comment