Q:

Coding Practice: Why do do the iterators need to be aliased?

I've completed a question from algo expert that asks you to loop through an array of numbers to find the two numbers that add to a target sum.  I'm trying to understand why this function does not work without the iterators being aliased. 
input: [3, 5, -4, 8, 11, 1, -1, 6], 10
output: [-1, 11]
This is the correct solution:
def twoNumberSum(array, targetSum):
    for i in range(len(array) - 1):
        firstNum = array[i]
        for j in range(i + 1, len(array)):
            secondNum = array[j]
            if firstNum + secondNum == targetSum:
                return [firstNum, secondNum]
    return []

and I don't understand why this does not work:
def twoNumberSum(array, targetSum):
    for i in range(len(array) - 1):

        for j in range(i + 1, len(array)):

            if i + j == targetSum:
                return [i, j]
    return []

A:

As mentioned in the comments, i and j are no values but your index.
It is always good to just test the output with a small example. 
when 
a=[6,7,8,9,10]

try to see what the range is over the length of a
for i in range(len(a)):
    print(i)

this will result in 
0
1
2
3
4

and not 
6
7
8
9
10

I hope that made it clearer.
Keep healthy. 

