Sunday, August 9, 2015

fibonacci number or lucas sequence using python

__author__ = 'Polo-Dev'
###fibonacci number or lucas sequence
a = 0
b = 1
print(a)
print(b)
for count in range (0, 10):
    s = a + b
    a = b
    b = s
    print (s)

No comments:

Post a Comment

css snippet for blogger code highlighting

code, .code {     display: block;     background: beige;     padding: 10px;     margin: 8px 15px; }