The list: the saying of the day
Section 8: ListsLesson 8.1 · ⏱ 8 min
A list is a variable that keeps many things in order, not just one thing.


- create list with makes the list.
- in list get random is a random item, and get # 1 is the first item.
- length of is the number of items.
- Add two new sayings.
- Make a “joke of the day” app.
📌 Another example: a random screen colour
A list of colours, and every tap picks a colour from it.



✍️ Practise
Make the example yourself: put the parts in “🎨 Design”, then the blocks, and tap ▶ Run.
✍️ Practise here in the lesson✖ Close the labor open the lab in a new page ↗
🎯 Challenge yourself
Easy
A random name from the list of friends.
👀 Show the solution🙈 Hide the solution



Result: one of the four names.
Medium
The next saying in order (a number that goes up with every tap).
👀 Show the solution🙈 Hide the solution



Result: the second after two taps.
Hard
Write the number of items in the list.
👀 Show the solution🙈 Hide the solution



Result: 5

