My First Notebook

import time
startTime = time.time()
product = 1
for i in range(1, 100):
    product = product * i
endTime = time.time()
print('The result is %s digits long.'%(len(str(product))))
print('Took %s seconds to calculate.'%(endTime-startTime))
The result is 156 digits long.
Took 0.00023889541625976562 seconds to calculate.
import time
startTime = time.time()
product = 1
for i in range(1, 100):
    product = product * i
endTime = time.time()
print('The result is %s digits long.'%(len(str(product))))
print('Took %s seconds to calculate.'%(endTime-startTime))
Enter a value
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-13-c556b9c0bc7c> in <module>()
      1 print ('Enter a value')
----> 2 n = raw_input()
      3 product = 1
      4 i = 1
      5 for i in range (1, int(n)):

NameError: name 'raw_input' is not defined