def cost(w):
 return (0.5 * sum((((y - h(w, np.array(x))) ** 2) for (x, y) in zip(INPUTS, OUTPUTS))))

def cost ( w ) : return ( 0.5 * sum ( ( ( ( y - h ( w , np . array ( x ) ) ) ** 2 ) for ( x , y ) in zip ( INPUTS , OUTPUTS ) ) ) )
return the cost when the neural network has weights w .