| Menu × × Correct! Exercise:Complete the code. 
def linearSearch(arr, targetVal):
    for i in range(len(arr)):
        if arr[i] == targetVal:
            @(8)
    return -1
 
def linearSearch(arr, targetVal):
    for i in range(len(arr)):
        if arr[i] == targetVal:
            return i
    return -1
 Not CorrectClick here to try again. Correct!Next ❯ | 
This will reset the score of ALL 43 exercises.
Are you sure you want to continue?