Programming fundamentals›Lists
Tutorial 5 of 13 · Programming fundamentals · Collections and text · BeginnerLists
Keep many values in one place, in order, and go through them one by one.
5 lessons, the last is a challenge · about 1 h · Python and Java
Before you startYou finished "Repeating": you can write a loop that runs some lines once for each value, and a loop that counts.
What you’ll be able to do
- 1Make a list of values, read one value by its position, and say that the first position is 0, not 1.
- 2Change a list: add a value at the end or at a position, take one out, replace one, and say what the list holds afterwards.
- 3Write a loop that goes through a list to add up, count, find the largest, or search for a value.
- 4Use the built-in helpers for the length, the largest value and sorting in Python and in Java, and say which ones change the list itself.
Lessons
Next in this path
Next: 6 · Strings · 5 lessons · 55 min
Text as a row of characters: take it apart, put it together, and clean it up.
Playground
Try the same model with your own values. No checks, nothing recorded.
Open the playground