From 75a42ec54dbf721caa659ddf02c1f46fc2cb4bef Mon Sep 17 00:00:00 2001 From: mlot Date: Fri, 6 Jun 2025 13:40:57 -0400 Subject: initial commit for archiving --- misc/calcProd.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 misc/calcProd.py (limited to 'misc/calcProd.py') 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)) -- cgit