More with for


#1

start_list = [5, 3, 1, 2, 4]
square_list = []

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

print square_list

Oops, try again. Your code looks a bit off. Check the Hint if you need help! Your code threw the following error: 'list' object is not callable


#2
number ** 2    # number squared

#3

square_list.sort()

Hope this helps!


#4

Every little bit helps, so long as we focus the learner on one problem at a time. Yours was next on the queue and aptly you nailed it.


#5

start_list = [5, 3, 1, 2, 4]
square_list = []

for number in start_list:
start_list.append(number ** 2)

square_list.sort()
print square_list

Why is this wrong?


#6

You are appending the wrong list.


#7

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