aboutsummaryrefslogtreecommitdiff
path: root/test/oryx/sample-python/src/solve.py
blob: 141a996463e0055abd51f57d562575943a1a249f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
from sympy import Symbol, Eq, solve

x = Symbol("x")
y = Symbol("y")

equation_1 = Eq((x + y), 2)
equation_2 = Eq((x - y), 4)
print("Equation 1:", equation_1)
print("Equation 2:", equation_2)

solution = solve((equation_1, equation_2), (x, y))
print("Solution:", solution)