code: def magnitude(a):
      "calculates the magnitude of a vecor"
      from math import sqrt
      sum = 0
      for coord in a:
          sum += coord ** 2
      return sqrt(sumf magnitude(a):
      "calculates the magnitude of a vecor"
      from math import sqrt
      sum = 0
      for coord in a:
          sum += coord ** 2
      return sqrt(sum)
docs: calculates the magnitude of a vecor