10/18 Searched for an answer. Still stuck


#1


https://www.codecademy.com/courses/python-beginner-nzzVa/2/3?curriculum_id=4f89dab3d788890003000096

I've searched through the forum, and none of the answers worked.

def list_function(x):
    n[0] = n[0] + 3
    return x

n = [3, 5, 7]
print list_function(n)


Output:
[6, 5, 7]
None

Error:
Oops, try again. list_function([6, 1]) returned [6, 1] instead of [6, 4]
or
Oops, try again. list_function([3, 5]) returned [3, 5] instead of [3, 8]
or
Oops, try again. list_function([0, 6]) returned [0, 6] instead of [0, 9]


#2

Mine worked with this:

def list_function(x):
x[1] = x[1] + 3
return x

n = [3, 5, 7]
print list_function(n)


#3

Ahhhhhhhhh silly me. Thanks for the answer!