Before you start this course, you must login to Replit

If you have forgotten your Replit account user name or password, ask your Coder Coach.


Task – Investigate

What’s an Investigate task?

In investigate tasks you are given some example code. Underneath it are questions to make sure that you understand how the code works. Use comments to answer the investigate questions on the example code.

List Operations – Reference Table

Output item Outputs a single item from the array. print(arrayName[itemIndex])

Edit item Changes or replaces an item in an array. arrayName[itemIndex] = New data

sweets[1] = “Haribo”
Add an item Puts a new item onto the end of the array arrayName.append(new data)

Remove an item Removes an item from the array arrayName.pop(itemIndex)

Output all items Outputs every item in the array one by one using a loop. for i in range(0, len(arrayName)):

for i in range(0, len(sweets)):


#This is a nice built in Python shortcut, but you need to know how to do the for loop version for the exam.


Help! My code doesn’t work

Make sure that you check for the following things:

  • The list name is identical everywhere it is used (capitals matter)
  • List index is surrounded by square brackets
  • List indexing starts at zero – are you counting properly?