summaryrefslogtreecommitdiff
path: root/misc/calcProd.py
diff options
context:
space:
mode:
authormlot <petri-rush-curvy@duck.com>2025-06-06 13:40:57 -0400
committermlot <petri-rush-curvy@duck.com>2025-06-06 13:40:57 -0400
commit75a42ec54dbf721caa659ddf02c1f46fc2cb4bef (patch)
tree84be794a2481e356a7784557a6f9fb6fbf29cfdd /misc/calcProd.py
initial commit for archivingHEADmain
Diffstat (limited to 'misc/calcProd.py')
-rw-r--r--misc/calcProd.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/misc/calcProd.py b/misc/calcProd.py
new file mode 100644
index 0000000..50a4a81
--- /dev/null
+++ b/misc/calcProd.py
@@ -0,0 +1,13 @@
+import time
+
+def calcProd():
+ product = 1
+ for i in range(1, 100000):
+ product = product + 1
+ return product
+
+startTime = time.time()
+prod = calcProd()
+endTime = time.time()
+print('The result is %s digits long.' % (len(str(prod))))
+print('Took %s seconds to calculate.' % (endTime - startTime))