replit

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.

Search A List

Need more help with lists? Click here

Modify

What’s a Modify task?

In the modify tasks, you are given some starter code.
Use the instructions below to make changes to the code.
Comment your changes to explain what you have done.

Task instructions

Adapt the starter code so that:

  • It outputs the list to the user.
  • The user has to input the item to be found.
  • It ignores case on the input
  • The program ends the loop when it has found the item

Task 2 instructions

  • Copy the code and adapt it so that it uses the python if…in instead of a while loop.

Help! My code doesn’t work

Make sure that you check for the following things:

  • Square brackets for items in the list
  • Commas between each item in the list.
  • String items are in quotation marks
  • Range – the end value is NOT included in the output.
  • Search – not initialising counter OUTSIDE the loop.
  • Search – not incrementing counter INSIDE the loop.

Hints