Start New Discussion within our Software Development Community

This one works pretty fast, even for large numbers. Like it says, aproxomite end number, and that is because it will generally go one fibonacci number above what you specify.

# Might need "raw_input("message")" to run 
d = input("Aproxomite End Number ")
a,b = 1,0
while b < d:
        sum = a + b
        a = b
        b = sum
        print b
The article starter has earned a lot of community kudos, and such articles offer a bounty for quality replies.