1
svar
121
visningar
python with replit compiler
Hi,
I have installed sympy@1.12 in replit compiler och nothing happens when i run the following code.
from sympy import Symbol, Derivative
x = Symbol("x")
f = (x**2)
d = Derivative(f, x)
d.doit()
what i am missing?
thanks
Something happens for sure, you just don’t see what happens. Like in the example below, from
https://www.geeksforgeeks.org/python-sympy-doit-method/amp/, assign the result of the call to doit() to a variable and then print the value of that variable:
# calling doit() method on expression
geek = (2 * Integral(x, x)).doit()
print(geek)