Assignment 7: Lists

Objective: Learn about the List data structure and some functions for operating on lists.

For this lab you start by downloading this file (after clicking that link, you may need to right click on the new page that comes up and select "save as" to actually download it. Alternatively, just right click on the link itself and choose "save link as" and you'll get the same thing), and import it into Snap as the starting project.  For some reason the UCB site doesn't have that one as a hot link. It includes some lists for you to work with and a toUpper block that I'm providing to change a lower case letter into an upper case letter, for use in your sentences.

You have two choices for completing this lab following the Lists lab from BJC. Either you can complete the single, following, challenging task:

  1. When you get to the part about a sentence block, you can just expand on that. As it says in the tutorial, this is an open ended problem. At the least your sentences should start with capital letters and end with proper punctuation and sometimes use plural nouns and sometimes singular. It would also be good to make sure that you used the correct article, "a" vs "an". For this your xml file should include all of your blocks for making sentences. Include a comment block in the main sprite script that says what we need to do to see your script in action (e.g. "Just click the sentence block several times."). This is essentially the problem described in the "Try This" part of the What Good Are Lists page.

OR you can complete the following slightly-less-challenging 6 blocks.

1. find the first names from a list of first and last names (the Beatles example)

        2. select the items from a list that are at least 5 letters long

        3. select the items from a list that are numbers

       4. select the items from a list that start with a vowel

       5. the acronym building block (they actually do this for you so no need to build it and turn it in if you don't want to)

      6. the longest work block (be sure and take their hint to first create a block that reports the longer of two words and then use the "combine with" higher order function block)

Due:  Feb 29th, 8am.

File lists.xml22.88 KB