1

This is a python code for which i am getting an error...

    from scipy import *
    from matplotlib.pyplot import *
    x=arange(0.1,100,0.1)
    f=zeros(len(x))
    s=-1
    for n in range (1,10000):
        t=s*x/(x*x+n*n)
        f +=t
        s =-s
        if max(abs(t))< 1e-4
            break
    for xx in c_[x,f]:
        print "%f    %f" % (xx[0],xx[1])
  • 3
    I think, Stack Overflow site is better for this kind of questions – Anwar Sep 29 '12 at 20:10
3

Your parens in the equation for z are unbalanced.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.