File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 36, in factorial

print(factorial(n))


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py", line 33, in factorial

if n == 0:


RecursionError: maximum recursion depth exceeded in comparison



In [37]: runfile('//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py', wdir='//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7')



In [38]: runfile('//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7/lecture7B.py', wdir='//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture7')



In [39]: fibonacci(n)

Traceback (most recent call last):


File "<ipython-input-39-3248bbe44d8a>", line 1, in <module>

fibonacci(n)


NameError: name 'n' is not defined



In [40]: fibonacci(1)

Out[40]: 0


In [41]: fibonacci(2)

Out[41]: 1


In [42]: fibonacci(20)

Out[42]: 4181


In [43]: d = {}


In [44]: d[10] = 1


In [45]: d[50] =1.3


In [46]: d[100] = 2.4


In [47]: d

Out[47]: {10: 1, 50: 1.3, 100: 2.4}


In [48]: d[0]

Traceback (most recent call last):


File "<ipython-input-48-17371c6688f6>", line 1, in <module>

d[0]


KeyError: 0



In [49]: d[50]

Out[49]: 1.3


In [50]: d.keys)

File "<ipython-input-50-17a9fa0d8627>", line 1

d.keys)

^

SyntaxError: invalid syntax



In [51]: d.keys()

Out[51]: dict_keys([10, 100, 50])


In [52]: d.values()

Out[52]: dict_values([1, 2.4, 1.3])


In [53]: for i in d.keys():

    ...: print("value at a key {} is {}".format(i, d[i]))

    ...:

value at a key 10 is 1

value at a key 100 is 2.4

value at a key 50 is 1.3


In [54]: d

Out[54]: {10: 1, 50: 1.3, 100: 2.4}


In [55]: