# Project Euler Problem 2, solution internals using python debugger

```\$python -m pdb project-euler-2.py
> /home/jeffrin/beautifulwork/lib/project-euler-2.py(13)()
-> '''
(Pdb) next
> /home/jeffrin/beautifulwork/lib/project-euler-2.py(15)()
-> cache = {}
(Pdb) next
> /home/jeffrin/beautifulwork/lib/project-euler-2.py(16)()
-> def fib(n):
(Pdb) next
> /home/jeffrin/beautifulwork/lib/project-euler-2.py(20)()
-> n = 0
(Pdb) next
> /home/jeffrin/beautifulwork/lib/project-euler-2.py(21)()
-> i = 0
(Pdb) next
> /home/jeffrin/beautifulwork/lib/project-euler-2.py(22)()
-> while fib(i)  /home/jeffrin/beautifulwork/lib/project-euler-2.py(23)()
-> if not fib(i) % 2: n = n + fib(i)
(Pdb) next
> /home/jeffrin/beautifulwork/lib/project-euler-2.py(24)()
-> i = i + 1
(Pdb) next
> /home/jeffrin/beautifulwork/lib/project-euler-2.py(22)()
-> while fib(i)  /home/jeffrin/beautifulwork/lib/project-euler-2.py(23)()
-> if not fib(i) % 2: n = n + fib(i)
(Pdb) next
> /home/jeffrin/beautifulwork/lib/project-euler-2.py(24)()
-> i = i + 1
(Pdb) continue
4613732
The program finished and will be restarted
> /home/jeffrin/beautifulwork/lib/project-euler-2.py(13)()
-> '''
(Pdb)
```

http://www.bytemuse.com/post/fibonacci-spiral/