human
Can you provide a code to analysis of Algorithms and the other steps required given the following:
Analysis of Algorithms | Big | ''Function to find whether a key exists in an array or not using linear search.
'' Traverse the given array, a[].
'' Check if a[i] is equal to key.
''Given Input.
''Function Call"
Solution in Python:
assistant
#Here is code to analysis of Algorithms and the other steps required.
 def linearSearch ( a , n , key ) :
	for i in range ( 0 , n ) :
		if ( a [ i ] == key ) :
			return True
	return False
arr = 2 , 3 , 4 , 10 , 40
x = 10
n = len ( arr )
if ( linearSearch ( arr , n , x ) ) :
	print ( " Element ▁ is ▁ present ▁ in ▁ array " )
else :
	print ( " Element ▁ is ▁ not ▁ present ▁ in ▁ array " )