Robotics & Artificial Intelligence
Write a Python program to demonstrate the use of the SciPy library.
Python Modules
1 Like
Answer
import numpy as np
from scipy.linalg import solve
coefficients = np.array([[1, 2], [2, 2]])
constants = np.array([1, -1])
solution = solve(coefficients, constants)
X = solution[0]
Y = solution[1]
print("X =", X)
print("Y =", Y)Output
X = -2.0
Y = 1.5
Answered By
1 Like
Related Questions
Fill in the blanks:
- ……………. and ……………. are used to organise Python project.
- Pandas is a Python library for ……………. .
- ……………. library supports mathematical operations.
Write a Python program to demonstrate the use of the NumPy library.
Write a Python program to demonstrate the use of the Pandas library.
Write a Python program to demonstrate the use of the Matplotlib library.