2. Access by Index : data Structures


Use square bracket notation to print the third value of demo_array to the console.

Remember that the third value is at index two, not at index three. We start counting indices from zero.

{my code}

demo_array = [100, 200, 300, 400, 500]

print = [demo_array 2]


Oops, try again. It looks like your syntax isn't quite right. Check the Hint if you need help!


So, here is the issue:

You need to print the 3rd value in the demo_array.

This you do by targeting demo_array[2]. Also, you don't equate a print method.

Hope this helps! :wink:


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