import numpy as np
import matplotlib.pyplot as plt
# 定义一元二次方程函数
def quadratic_equation(x):
return x**2 + 3*x - 5
# 生成x轴上的点
x = np.linspace(-10, 10, 100)
y = [quadratic_equation(i) for i in x]
# 绘制曲线图
plt.plot(x, y)
plt.title('Quadratic Equation')
plt.xlabel('X')
plt.ylabel('Y')
plt.grid()
plt.show()