For example def agen(max=Infinity): n = 1 an = 1 while n <= max: yield an n += 1 an = (an + 1)/an^2
a = agen(10) for i in a: print i.n() The above print the sequence, but how do I graph it.
1 | initial version |
For example def agen(max=Infinity): n = 1 an = 1 while n <= max: yield an n += 1 an = (an + 1)/an^2
a = agen(10) for i in a: print i.n() The above print the sequence, but how do I graph it.