rf-web/vendor/bundle/gems/rouge-3.12.0/lib/rouge/demos/python
2019-10-21 10:18:17 +02:00

7 lines
164 B
Plaintext

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