Whats wrong with this code in Step 2 of List and Function


#1

can any body help please

whats wrong with this code in Step 2 of List and Function:

n = [1, 3, 5]

Do your multiplication here

a = x[1]*5
print a

Error: name 'x' is not defined


I give up
#2

I think because you suddenly wrote about x when you didn't stated what is x.


#3

Hi if you want to select a number inside the "n" you should put it like that

a = n[1] * 5
print a

#4

when i do this. Here is the result. How u clear this step?


#5

Try it like that

n = [1, 3, 5]

n[1] = n[1] * 5

print n

#6

thanks its working. i have tried it that as well but with print n[1]