input: Write a function to implement the Gradient Descent Algorithm in Python. The function should take an array of input features `x`, an array of target values `y`, a learning rate, and the number of iterations as inputs. It should return the updated slope `m_curr` and intercept `b_curr` after performing gradient descent.
  
  
  assert gradient_descent([1, 2, 3, 4, 5], [1, 3, 2, 3, 5], 0.01, 100) == (0.8, 0.4)
  assert gradient_descent([1, 2, 3, 4, 5], [1, 4, 9, 16, 25], 0.01, 100) == (16.4, -59.6)
  assert gradient_descent([1, 2], [2, 3], 0.1, 10) == (1.0, 0.5)
  assert gradient_descent([1], [1], 0.01, 1) == (0.0, 0.5)
  
output: 
  def gradient_descent(x, y, learning_rate, num_iterations):
      m_curr = 0
      b_curr = 0
      n = len(x)
      
      for i in range(num_iterations):
          y_pred = m_curr * x + b_curr
          md = -(2/n) * sum(x * (y - y_pred))
          bd = -(2/n) * sum(y - y_pred)
          m_curr = m_curr - learning_rate * md
          b_curr = b_curr - learning_rate * bd
      
      return m_curr, b_curr
  