Wats wrong?


#1



Replace this line with your code.


#2

your loop iterator is numbers, which gives you access to each item in the list. But then you use number to append, why not use the iterator which contains each item from the list?


#3

not getting ya?????????


#4

your iterator (numbers) give you access to each item in your list. Then you want to get the square of each item in your list, but then you use number instead, which is undefined


#5

i used numbers still showing error
start_list = [5, 3, 1, 2, 4]
square_list = []

for numbers in start_list:# Your code here!
start_list.append(number**2)

square_list.sort()


print square_list

#6

in your loop use numbers as iterator, so that is also what you should use when appending to start_list, but then you use number


#7

"Don't use both 'numbers' and 'number'. Use one or the other, else it won't work."

Do you understand that? :wink:


#8

and

start_list.append(number**2)

are you really want to append to start_list instead of square_list


#9

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.