main.py145 chars9 lines
This is a simple implementation of the fibonacci sequence in Python. We use the formula phi^n / sqrt(5)
to compute the nth fibonacci number, where phi
is the golden ratio. The round
function is used to round the result to the nearest integer. Note that this formula becomes inaccurate for large values of n
due to floating point precision.
gistlibby LogSnag