def fib(n): a, b, c = 0, 1, 1 while c < n: a, b = b, a+b c+= 1 if c == n: print b n = int(raw_input("What term do you wish to calculate? ")) fib(n)