summaryrefslogtreecommitdiff
path: root/misc/calcProd.py
blob: 50a4a81ab948202144a5d10710c38549c3cfdd83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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))