Estou com um problema simples, quando executo essa função ela retorna um erro :
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
Qual problema enfrento ? e como soluciono ?
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