input: Write a function to design a neural network in Python that predicts a customer’s annual income based on their age and education level. The network should be built using Keras with a sequential model consisting of a dense layer with 64 units and an output layer with 1 unit. The model should be compiled using mean squared error loss and the Adam optimizer. The function should then train the model using provided training data and predict the annual income for a given age and education level, printing the result.
  
  
  import numpy as np
  import keras
  from keras.layers import Dense
  from keras.models import Sequential
  
  def predict_income(x_train, y_train, age, education, epochs=150, batch_size=2):
      # Build model
      model = Sequential()
      model.add(Dense(64, input_dim=2, activation='relu'))
      model.add(Dense(1))
  
      # Compile the model
      model.compile(loss='mean_squared_error', optimizer='adam')
  
      # Fit the model
      model.fit(x_train, y_train, epochs=epochs, batch_size=batch_size)
  
      # Predict the annual income
      annual_income = model.predict(np.array([[age, education]]))
      print(annual_income)
      return annual_income
  
  # Test cases
  x_train = np.array([[25, 0], [30, 0], [35, 0], [40, 0], [45, 1], [45, 2], [50, 1], [50, 2], [55, 1], [55, 2], [50, 3], [60, 3]])
  y_train = [15000, 20000, 25000, 30000, 40000, 45000, 50000, 60000, 65000, 70000, 80000, 90000]
  
  assert predict_income(x_train, y_train, 50, 3) == np.array([[80000]])
  assert predict_income(x_train, y_train, 45, 1) == np.array([[40000]])
  assert predict_income(x_train, y_train, 60, 3) == np.array([[90000]])
  
output: def predict_income(x_train, y_train, age, education, epochs=150, batch_size=2):
      model = Sequential()
      model.add(Dense(64, input_dim=2, activation='relu'))
      model.add(Dense(1))
      model.compile(loss='mean_squared_error', optimizer='adam')
      model.fit(x_train, y_train, epochs=epochs, batch_size=batch_size)
      annual_income = model.predict(np.array([[age, education]]))
      print(annual_income)
      return annual_income