aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xchallenge-170/eric-cheung/python/ch-1.py13
-rwxr-xr-xchallenge-170/eric-cheung/python/ch-2.py10
2 files changed, 23 insertions, 0 deletions
diff --git a/challenge-170/eric-cheung/python/ch-1.py b/challenge-170/eric-cheung/python/ch-1.py
new file mode 100755
index 0000000000..54c61102df
--- /dev/null
+++ b/challenge-170/eric-cheung/python/ch-1.py
@@ -0,0 +1,13 @@
+
+arrPrime = [1, 2, 3, 5, 7, 11, 13, 17, 19, 23]
+
+arrPrimorialNum = []
+
+nProduct = 1
+
+for primeLoop in range(0, len(arrPrime)):
+ nProduct = nProduct * arrPrime[primeLoop]
+ arrPrimorialNum.append(nProduct)
+
+print (arrPrimorialNum)
+
diff --git a/challenge-170/eric-cheung/python/ch-2.py b/challenge-170/eric-cheung/python/ch-2.py
new file mode 100755
index 0000000000..eefde0cc1a
--- /dev/null
+++ b/challenge-170/eric-cheung/python/ch-2.py
@@ -0,0 +1,10 @@
+
+import numpy as np
+
+matA = [[1, 2], [3, 4]]
+matB = [[5, 6], [7, 8]]
+
+arrKP = np.kron(matA, matB)
+
+print (arrKP)
+