nicojensen.de/vendor/bundle/gems/rouge-3.3.0/lib/rouge/demos/python
Nico Jensen b59a203dbb Init
Init commit
2019-03-12 13:49:49 +01:00

6 lines
164 B
Text

def fib(n): # write Fibonacci series up to n
"""Print a Fibonacci series up to n."""
a, b = 0, 1
while a < n:
print a,
a, b = b, a+b