2
I have a simple problem, when I run 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 ?
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
First confirm that the indentation of the code here in the question matches the one in your editor.
– Isac