def fib(n): a, b = 0.0, 1.0 while a < n: print((a+b)/b) a, b = b, a+bfib(100)
Standard input is empty
1.0 2.0 1.5 1.66666666667 1.6 1.625 1.61538461538 1.61904761905 1.61764705882 1.61818181818 1.61797752809 1.61805555556
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!