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

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -