ansari.aafaq1...@gmail.com wrote: > Lets say i have a expression: > flowrate=(veloctiy*area) > i can find the flowrate with this expression > but if i dont wanna change the expression and want to find the velocity by > giving it value of area and flowrate ,how do i do this in python? is there > any library or package or module for this?
With sympy ttps://docs.sympy.org/latest/tutorial/intro.html you can write: >>> import sympy >>> f, v, a = sympy.symbols("flowrate velocity area") >>> sympy.solve(v*a - f, a) [flowrate/velocity] >>> sympy.solve(v*a - f, f) [area*velocity] -- https://mail.python.org/mailman/listinfo/python-list