Output a Range Of Items From a List
Need more help with lists? Click here
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.
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.