Python For one and All 8/14


#1

I am completely stuck. I'm not very good at coding and it's been a while since I worked on Python, and the context through which the computer is telling me wht I'm doing wrong is only making it worse. I haven't gotten one thing right on this lesson yet. Here's what I've got:
my_list = [1,9,3,8,5,7]

for number in my_list:
# Your code here

If anyone could help that would be awesome. Thanks!


#3

Look closely at the hint and follow it almost word for word


#4

Its stating to print a function that will be carried out by the for loop. Such as below

for number in my_list:
print 2 * number

Where 2 * is the action that will performed by every "number" in the "my_list" selection

Hope this helps


#7

Thanks. This put me on the right track. A much better help than dataninja08325.


#8
my_list = [1,9,3,8,5,7]

for number in my_list:
    print(2*number)

i think whose still getting error caused after for number in my_list: you put function print below #your code here, thats make print function is'nt related with for loop

here wrong code

my_list = [1,9,3,8,5,7]
for number in my_list
# Your code here:
print(2*number)

#9

my_list = [1,9,3,8,5,7]

for number in my_list:
# Your code here
print(2*number)

I can' t solve it. What can do for it?


#11

please read my previous comment your problem caused
print(2*number)
not related with for number in my_list: and nothing gonna print

you must put your code like this

my_list = [1,9,3,8,5,7]

for number in my_list:
    print(2*number)

#12

Thank you very much.


#17