It says "square_list should be the same length as start_list"


#1

https://www.codecademy.com/en/courses/python-beginner-en-pwmb1/1/6?curriculum_id=4f89dab3d788890003000096#

It says "square_list should be the same length as start_list"

I want it to perform its command correctly

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

# Your code here!

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

#2

There is no number variable,

based on how you initialised your loop you should then square start_list as it is the for loop variable,

square_list.append(start_list ** 2)


#3

But it still says that: "square_list should be the same length as start_list"


#4

Can I please see your updated code?


#7

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