Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save graphoarty/c887f892965dc6e8b33494a18820fe18 to your computer and use it in GitHub Desktop.
Save graphoarty/c887f892965dc6e8b33494a18820fe18 to your computer and use it in GitHub Desktop.
def main():
count = int(raw_input("How many numbers do you want to print?"))
if count == 0:
print "No Numbers Printed"
else:
a = 0
b = 1
print a,
if count > 1:
print b,
while count > 2:
c = a + b
print c,
a = b
b = c
count -= 1
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment