Advertisement
Sparkster

Untitled

Jul 19th, 2013
2,398
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PyCon 0.27 KB | None | 0 0
  1. # Calculating time average
  2.  
  3. import math
  4.  
  5. def average_time(time, kilometers):
  6.     minutes = math.floor(time)
  7.     seconds = (time - math.floor(time)) * 100
  8.     total_seconds = (math.floor(time) + seconds)
  9.     average = total_seconds / float(kilometers)
  10.  
  11. print average_time(5.23, 5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement