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