I have a simple problem, when I execute this function it returns an error:
Traceback (most recent call last): file.py3 on line?, in getUserOutputs userOutput = _runwwmdh (testInputs [i]) file.py3 on line 15, in _runwwmdh return aux1 + aux2 NameError: name 'aux1' is not defined
What problem do I face? and how do I solve it?
def perfectCity(departure, destination ):
aux1 = 0
aux2 = 0
if departure[0] > destination[0]:
aux1 = departure[0] - destination[0]
else:
aux1 = destination[0] - departure[0]
if departure[1] > destination[1]:
aux2 = departure[1] - destination[1]
else:
aux2 = destination[1] - departure[1]
return aux1 + aux2