Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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])
share|improve this question
3  
I think, Stack Overflow site is better for this kind of questions – Anwar Sep 29 '12 at 20:10

closed as off topic by Anwar, Eliah Kagan, Jacob Johan Edwards, jokerdino, Mitch Sep 30 '12 at 8:50

Questions on Ask Ubuntu are expected to relate to Ubuntu within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

1 Answer

Your parens in the equation for z are unbalanced.

share|improve this answer

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