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.

RAGBRAI Map

Visit the page for this interactive RAGBRAI Map.

  1. Run this program entering at least two different years from 1973 to 2022.
    • What happens?
  2.  

  3. Run this program entering at least one year BEFORE 1973.  After 2022?
    • What happens?
  4. 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.

  5. 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?

     

  6. 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?

       

  7. Look at the following block of code.  How does it work?

 

 

 

Random Stories

A few weeks ago we used "Hey Diddle Diddle" as a Mad Lib.  Today I want you to work with it again, but instead as part of a Random Story generator. 

Remix a copy of:

Look carefully at the code that is in this starter project. 

Let's finish this program:

  1. Finish the "places everyone" on Scratchy Cat so that he sets up the remaining six variables from their lists.
  2. Modify the Moon Jumper sprite so that it changes costumes to correspond with what got selected by the program.
  3. Add one additional object to each of the 7 lists and then fix the code so that all five objects are possible in the story.
  4. Add a third sprite that represents the various options for the noun that "runs" away with the spoon. Modify the program so that when you run the code this visual element is included.

Share this program and then email me the URL.