input: Write a python function to calculate the total distance between a series of coordinates.
  assert totalDistance([(0, 0), (3, 4)]) == 5
  assert totalDistance([(1, 1), (4, 5), (9, 9)]) == 10.824622388
  assert totalDistance([(2, 3), (5, 7), (8, 10), (10, 12)]) == 11.66190379
output: import math
  
  def totalDistance(coords):
      total_dist = 0
      for i in range(1, len(coords)):
          x1, y1 = coords[i-1]
          x2, y2 = coords[i]
          dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
          total_dist += dist
      return round(total_dist, 9)