Professional Documents
Culture Documents
September 9, 2017
1 Problem 6 :
In [1]: import matplotlib.pyplot as plt
import numpy as np
import math
In [4]: p = np.zeros(11)
e = np.zeros(10)
p[0] = 0.5
In [6]: plt.plot(e[1:10],e[0:9],"-x")
plt.show()
plt.grid(True)
1
In [7]: ratio = np.zeros(10)
for i in range(0,9):
ratio[i] = e[i+1]/(e[i])
print("Ratio : ",ratio)
In [ ]: