Topic 2.12 - He's Making a List. Checking it twice.
Assignment Specifics
Last session we looked at a couple of ways to use lists to help us with different programs. In this activity you will interact with three different programs of different difficulty and functionality to look at some additional ways that you can use lists in Scratch programs.
Hurricane Tracker
Visit this animated map of Hurricane Irma from 2017.- https://scratch.mit.edu/projects/222347707/editor/
- Turn on the Lat, Long, and Wind lists and examine the data.
- Notice that each list has the same number of items.
- How do you think these lists fit together?
- How does data in slot N of each list (for example, slot 5) fit together?
- How is it used in the program?
RAGBRAI Map
Visit the page for this interactive RAGBRAI Map.
- Run this program entering at least two different years from 1973 to 2022.
- What happens?
- Run this program entering at least one year BEFORE 1973. After 2022?
- What happens?
- Click on the checkboxes next to the lists named Night0, Night1, and Night2.
- Notice that each of these lists has a length of 42 items (so do the other 5 lists with Night in them).
- Look at the code under the stage and locate the line that says:
-
- Switch over to the Bicycle sprite if you aren't there yet.
- Look under the various "when I recieve" blocks. Notice how slotnumber is used to read data from the lists such as Night0, Night1, and Night2.
- What does slotnumber represent?
- Unselect the checkboxes for the Night lists you just turned on. Instead click on the checkboxes next to the lists named LLCity, LLLat, and LLLon. Notice that these three lists are coordinated. Each list has 129 items.
- How do you think these lists go together?
- Look at the following block of code. How does it work?
The code for this program is much more complex than the code for the previous activities you have looked at. But click on the "See inside" button and check it out.