You are on page 1of 1

import numpy as np

import matplotlib.pyplot as plt


import math
a=0
x=1
n=10
m=np.zeros([n,2])
for i in range(1,n+1):
a=math.sqrt(2+a)
x=(x*a)/2
pi=2/x
m[i-1,0]=i
m[i-1,1]=pi
print(m)
x=m[0:n-1,0]
y=m[0:n-1,1]
plt.plot(x,y)
plt.show()

You might also like