human
Give me a code to count the factors of K present in the given Array and the other steps required given the following:
Count the factors of K present in the given Array | Function to find the count of factors of K present in array.
Loop to consider every element of array.
Driver Code.
Function Call"
Solution in Python:
assistant
#Here is code to count the factors of K present in the given Array and the other steps required.
 def calcCount ( arr , n , k ) :
	count = 0
	for i in range ( 0 , n ) :
		if ( k % arr [ i ] == 0 ) :
			count = count + 1
	return count
arr = [ 1 , 2 , 4 , 5 , 6 ]
n = len ( arr )
k = 6
print ( calcCount ( arr , n , k ) )