equation solver for python code example
Example: how to write x in terms of y sympy
def express(a, b, name):
sym = symbols(name)
sol = solve(a-sym, b)
assert len(sol) == 1
return (sym, sol[0])
def express(a, b, name):
sym = symbols(name)
sol = solve(a-sym, b)
assert len(sol) == 1
return (sym, sol[0])