From ba09796605b6f33298d4ee1f7e4f3173515cdcea Mon Sep 17 00:00:00 2001 From: Ryan Thum Date: Fri, 18 Jun 2021 13:49:12 +0800 Subject: [PATCH 1/2] Created Matrix Library --- build/lib/matrix.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 build/lib/matrix.py diff --git a/build/lib/matrix.py b/build/lib/matrix.py new file mode 100644 index 0000000..16b34d6 --- /dev/null +++ b/build/lib/matrix.py @@ -0,0 +1,25 @@ +def matrix_2_2_input(): + cmd = int(input(''' + Enter 1 for 2 X 2 Matrix + >>> ''')) + if cmd == 1: + n11 = float(input("Enter the element of the 1st column and 1st row of the 1st matrix: ")) + n12 = float(input("Enter the element of the 2nd column and the 1st row of the 1st matrix: ")) + n21 = float(input("Enter the element of the 1st column and 2nd row of the 1st matrix: ")) + n22 = float(input("Enter the element of the 2nd column and the 2nd row of the 1st matrix: ")) + m11 = float(input("Enter the element of the 1st column and 1st row of 2nd matrix: ")) + m12 = float(input("Enter the element of the 2nd column and 1st row of 2nd matrix: ")) + m21 = float(input("Enter the element of the 2nd column and 1st row of 2nd matrix: ")) + m22 = float(input("Enter the element of the 2nd column and 2nd row of 2nd matrix: ")) + else: + print("Invalid Request") + +def matrix_2_2_calculate(): + X = [[n11, n12], [n21, n22]] + Y = [[m11, m12], [m21, m22]] + result = [[0, 0], [0, 0]] + for i in range(len(x)): + for j in range(len(X[0])): + result[i][j] = X[i][j] + Y[i][j] + for r in result: + print(r) From adb19350ee4c75799527a03fc3735ab28cbc1d9d Mon Sep 17 00:00:00 2001 From: Ryan Thum Date: Fri, 18 Jun 2021 13:53:45 +0800 Subject: [PATCH 2/2] Create Sider Ignore File (#22) (#23) --- .flake8 | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .flake8 diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..d4d6e06 --- /dev/null +++ b/.flake8 @@ -0,0 +1,2 @@ +[flake8] +ignore = W191