5-4 Lovely Lists with ScratchX
Use a list to store your favorite songs on a jukebox. Shuffle and Play!
Checklist
Spicy Challenges 🌶
DIRECTIONS: Play video to see example scratchX project.
Reference
Vocabulary
Variable (n): a placeholder for a piece of information that can change; a container for a value or expression that can
- deletes all items in list.
- adds an item to your list.
- returns the item at index 10 in list.
What happens if you have 10 things in your list, and you choose item 11? A good way to avoid this, is to know the “length of ‘ your list.
Use Operator command, random, to choose an index in your list from 1 to “length of list”.
Use that index to retrieve an item from your list.