9.5课上作业
import matplotlib.pyplot as plt
from decimal import Decimal
xx=[]
yy=[]
x=0;y=1
step=0.1
xx.append(x)
yy.append(y)
for i in range(10):
x=x+step
xx.append(x)
y=1.1*y-(0.2*x/y)
yy.append(y)
print(xx,yy)
plt.plot(xx,yy)
plt.show()
运行结果