human
Write me a code to find the maximum element in an array which is first increasing and then decreasing and the other steps required given the following:
Find the maximum element in an array which is first increasing and then decreasing | Python3 program to find maximum element.
Driver program to check above functions"
How can the above be solved in Python?
assistant
#Here is code to find the maximum element in an array which is first increasing and then decreasing and the other steps required.
 def findMaximum ( arr , low , high ) :
	max = arr [ low ]
	i = low
	for i in range ( high + 1 ) :
		if arr [ i ] > max :
			max = arr [ i ]
	return max
arr = [ 1 , 30 , 40 , 50 , 60 , 70 , 23 , 20 ]
n = len ( arr )
print ( " The ▁ maximum ▁ element ▁ is ▁ % d " % findMaximum ( arr , 0 , n - 1 ) )