Find the next fibonacci number | Python3 implementation of the approach ; Function to return the next fibonacci number ; Driver code
from math import * NEW_LINE def nextFibonacci ( n ) : NEW_LINE INDENT a = n * ( 1 + sqrt ( 5 ) ) / 2.0 NEW_LINE return round ( a ) NEW_LINE DEDENT n = 5 NEW_LINE print ( nextFibonacci ( n ) ) NEW_LINE