input: Write a function to calculate the magnitude of a 2D vector.
  assert calc_magnitude([3, 4]) == 5.0
  assert calc_magnitude([1, 1]) == math.sqrt(2)
  assert calc_magnitude([0, 0]) == 0.0
output: def calc_magnitude(vector):
      import math
      return math.sqrt(vector[0]**2 + vector[1]**2)