def fib(n): a=0.0 b=0.0 c=1.0 for i in range(0,n+1): print b b=a+c a=c c=b+a returnfib(7)
Standard input is empty
0.0 1.0 3.0 7.0 17.0 41.0 99.0 239.0
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!