I am not sure what the concept is called but let me explain. I apologize if this is something trivial, but I am not sure what this method is called or which library to use. My goal is to solve for one variable of a formula if I have the other two. For example: I want to define an equation as:
A + B = C
Pseudo code
def solve_equation(a, b, or c): # I know this does not make sense form a syntax perspective
formula = ( c = a + b)
solve(formula, x) # x would be the the desirable variable e.g. inputs a,c, then x = b
return x
Solve for A
A = C - B
solve_equation(b = 2, c = 3)
Output = 1
Solve for B
B = C - A
solve_equation(a = 1, c = 3)
Output = 2
Solve for C
C = A + B
solve_equation(a = 1, b = 2)
Output = 3
Hopefully, this explains a little better of what my goal is. I have used solve() before, and I have symbolically rearranged formulas to my need. What I am confused is how to do both at the same time. I work with complex formulas with many more variables, so manually coding the formula to solve every variable becomes complicated. Thank you again for the help.