Data Structures lesson 1 help please


#1



Data structures lesson 1


Oops, try again. It looks like my_array is not an array


my_array = [1, 2, 3, 4, 5]


Can some one please tell me why it is not working please?


#2

That code creates an array and assigns it to the name my_array

Perhaps you undo it in some other part of your code, or perhaps you've defined that variable in the wrong scope. Perhaps there's some small difference from what the instructions ask.

If you link to the exercise you enable others to try your code in the same environment as you ran it in.


#3

Ha. I had forgotten to place the quotation marks inside the brackets.


#4

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