value display use of print after the return


41
views
0
9 weeks ago by
mamado  
Hello everyone
here i have a code for the integral calculus but i have blocked in the S value display please help me how i can display the value of S and thanks i did not succeed with the print
def integrale (a, b, n, value):
S = 0
for i in range(0, n):
x1 = a+(b-a)*i/float(n)
x2 = a+(b-a)*(i+1)/float(n)
S+= f((x1 + x2)/2.0)*(x2-x1)
return S
Community: FEniCS Project
Please login to add an answer/comment or follow this question.

Similar posts:
Search »