0

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
2
Contributors
1
Reply
3
Views
9 Years
Discussion Span
Last Post by ilovepython1978
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.