Professional Documents
Culture Documents
Ex 1
Ex 1
maxv = -2
#intialize the x and y coordinates to the maximum value
px = None
py = None
#update the maximum value if the user's score is higher than the one we
have
if m > maxv:
maxv = m
#update alpha with the maximum value where alpha changes beta
if maxv > alpha:
alpha = maxv
return (maxv, px, py)
#update beta with the minimum value ifthe mimumum value is less than beta
if minv < beta:
beta = minv
return (minv, qx, qy)