Python parentheses mistake (?) -


when run code

    numpy import linspace,arange     pylab import plot, show     t=1.05     pp=[]     nn=[]     v in arange (1,50):        p=(8*t)/(3*v-1)-3/(v**2)        a=((v-1/3)*(8/3)*(v**2))/((8/3)*t*(v**3)-6(v-1/3)**2)        pp.append(p)        nn.append(a)     plot(p,a)     show() 

i get:

file "c:\users\asus\desktop\", line 8, in <module>     a=((v-1/3)*(8/3)*(v**2))/((8/3)*t*(v**3)-6(v-1/3)**2) typeerror: 'int' object not callable 

and don't know why.

issue in line -

a=((v-1/3)*(8/3)*(v**2))/((8/3)*t*(v**3)-6(v-1/3)**2) 

you using 6(v-1/3) , need use - 6*(v-1/3) , -

a=((v-1/3)*(8/3)*(v**2))/((8/3)*t*(v**3)-6*(v-1/3)**2) 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -