Pocket Compiler can do THAT? · Python
numpy on my PHONE: 3 equations solved in one lineFREE
Real numpy, running on your phone. The first run offers to install it (one download, then it stays on the phone); np.linalg.solve does the rest.
# numpy: 3 equations, 1 line
# 2x + y - z = 8
# -3x - y + 2z = -11
# -2x + y + 2z = -3
import numpy as np
A = np.array([[2, 1, -1],
[-3, -1, 2],
[-2, 1, 2]])
b = np.array([8, -11, -3])
print(np.linalg.solve(A, b))
# x = 2, y = 3, z = -1
# a million numbers, averaged:
+ 4 more lines in the app
Open code NP1 in Pocket Compiler
Download the Pocket Compiler app — free
No app yet? Install it, then open the app and type the code NP1 in Code Library.