SHARE
TWEET

Untitled

a guest Oct 9th, 2012 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def hours_difference(time_1, time_2):
  2.     '''(float, float) -> float
  3.  
  4.     Return the number of hours later that a time in seconds
  5.     time_2 is than a time in seconds time_1.
  6.        
  7.     >>> hours_difference(1800.0, 3600.0)
  8.     0.5
  9.     >>> hours_difference(3600.0, 1800.0)
  10.     -0.5
  11.     >>> hours_difference(1800.0, 2160.0)
  12.     0.1
  13.     >>> hours_difference(1800.0, 1800.0)
  14.     0.0
  15.     '''
  16.  
  17.     return(round((time_2/3600) - (time_1/3600) ,1))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top