Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 70
LACOUT Anthony
def subdiv (n): for i in range(n): return (x2-x1)/6*n*(f(x1)+4*f(x1(i-1)+x1i)/2+2*f(x1i)+f(x2)) L=[] print L.append(subdiv(n)) def subdiv(n): return plot(subdiv(n) Iinit=(0,iinit) Ifin=(0,iifin) Lcoord=[Iinit,Ifin] def masomme (Lcoord): for k in range(iinit,ifin): k=len(k) return k print(masomme(Lcoord)) A=(0,1) B=(0,10) Lcoord=[A,B] def masomme(Lcoord): for k in range(1,10): k=len(k) return k print(masomme(A,B)) xb=n xa=0 def f(n): for i in range(n): return (xb-xa)/6*n*(f(xa)+4*f(xa(i-1)+xai)/2+2*f(xa)+f(xb)) def mamethodesimpson(f): return primitive(f) print(mamethodesimpson(f))
Error in lines 5-5 Traceback (most recent call last): File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1013, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> File "", line 2, in subdiv TypeError: range() integer end argument expected, got function.