9/14 More with 'for'- please help


#1

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

Your code here!

for number in square_list:
square_list.append(number**2)
square_list.sort()

print square_list

the error I am getting is: square_list should be the same length as start_list

Please help


#2

Are you sure, that you want to iterate through numbers from this list?


#3

This is your code:
line 1: for number in square_list:
line 2: square_list.append(number**2)
line 3:square_list.sort()

First issue in line 1. Type "for number in start_list:" instead of "for number in square_list:"

Second issue in line 2. You should indent with enter button after "for number in start_list:", so press the enter button after this text.

WB
Levan


#4

change for number in square_list: TO for number in start_list:

and indent lines 2 and 3


#5

Thank you for the help guys. Its compiling now.