input: Write a python function to perform polynomial prediction using given parameters.
  assert predict(5, [0.5, 1.2, 3.1]) == 35.4
  assert predict(3, [1.0, 2.0, 3.0]) == 34.0
  assert predict(2, [2.5, 0.0, 1.5]) == 8.5
output: def predict(x, coeffs):
      result = 0
      for i, coeff in enumerate(coeffs):
          result += coeff * (x ** (len(coeffs) - i - 1))
      return result