human
An efficient way to check whether n | A simple Python 3 program to check if n - th Fibonacci number is multiple of 10..
Returns true if n - th Fibonacci number is multiple of 10..
Driver code"
How can the above be solved in Python?
 ... Can you provide a code to an efficient way to check whether n and the other steps required?
assistant
#Here is code to an efficient way to check whether n and the other steps required.
 def fibonacci ( n ) :
	a = 0
	b = 1
	if ( n <= 1 ) :
		return n
	for i in range ( 2 , n + 1 ) :
		c = a + b
		a = b
		b = c
	return c
def isMultipleOf10 ( n ) :
	f = fibonacci ( 30 )
	return ( f % 10 == 0 )
if __name__ == " _ _ main _ _ " :
	n = 30
	if ( isMultipleOf10 ( n ) ) :
		print ( " Yes " )
	else :
		print ( " No " )