Calculation error on my part, but I'm not sure


#1

How about this one?

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

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

Oops, try again. list_function([5, 6]) returned 8 instead of [5, 9]

I have a feeling its a calculation error on my part, but I'm not sure


Modifying each element in a list in a function - HELP - :((
#2

Should you be returning a value, or a list? At present your code is returning a value, 8. Review the instructions and see if you can correct this.