From 419234ec620f0cc81c6f36f74e6a61e762ebc29f Mon Sep 17 00:00:00 2001 From: Sirin Puenggun Date: Mon, 12 Dec 2022 07:08:17 +0700 Subject: [PATCH] update readme, main.py --- README.md | 9 +++++---- main.py | 7 +++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f89a03a..8de0448 100644 --- a/README.md +++ b/README.md @@ -237,8 +237,8 @@ If enter third, fourth,... degrees equation. Error will occur! ⚠️ - This Command use to find tranpose of matrix. ````css - [1]: det[[1,2],[3,4]] - Determinant: -2 + [1]: tranpose[[1,2],[3,4]] + Tranpose Matrix: Matrix([[1, 3], [2, 4]]) ```` - **inverse**[expression] @@ -248,8 +248,9 @@ If enter third, fourth,... degrees equation. Error will occur! ⚠️ ````css - [1]: det[[1,2],[3,4]] - Determinant: -2 + [1]: inverse[[1,2],[3,4]] + Inverse Matrix: Matrix([[-2.0, 1.0], [1.5, -0.5]]) + NOTE: inverse of matrix 3x3 4x4 ... is not the precise but 2x2 is precise. ```` ⚠️**NOTE**⚠️ Some inverse to nxn matrix when n >= 3 sometimes not that precise. I will try to fix it again. diff --git a/main.py b/main.py index fc84050..96244ec 100644 --- a/main.py +++ b/main.py @@ -215,7 +215,10 @@ while True: except: print(f"Can't evaluate inverse of this matrix") colleted_dict["inverse"] = "" - + try: + write_command(todo, str(m1), colleted_dict) + except: + continue elif "det" in todo.lower(): try: @@ -260,7 +263,7 @@ while True: try: tran = m1.tranpose() print(f"Tranpose Matrix: {tran}") - write_command(todo, str(m1), tran) + write_command(todo, str(m1), str(tran)) except: print(f"Error Occur! Please enter input again!") write_command(todo, str(m1), "")