#!/usr/bin/env python3 """ Fibonacci Module """ def fib(n): """ Calculates the n-th Fibonacci number """ a, b = 0, 1 for i in range(n): a, b = b, a+b return a if __name__ == "__main__": # if fib(0) == 0 and fib(10) == 55 and fib(50) == 12586269025: if fib(0) == 0 and fib(10) == 55 and fib(15) == 610: print("fib() test OK") else: print("fib() test failed")