Skip to content

Instantly share code, notes, and snippets.

@DecisionNerd
Created May 25, 2012 02:06
Show Gist options
  • Save DecisionNerd/2785377 to your computer and use it in GitHub Desktop.
Save DecisionNerd/2785377 to your computer and use it in GitHub Desktop.
A module of functions about non-zero Fibonacci numbers
"""A module of functions about non-zero Fibonacci numbers."""
import sys
def fib(n):
"""Print the non-zero Fibonacci numbers less than n."""
a, b =1,1
while b<n:
print b,
a, b = b, a+b
if __name__ == '__main__':
fib(int(sys.argv[1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment