Shopping List App

list {apples, bread, yogurt, spinach, bananas, eggs, cucumber, tomatoes, olive oil, almonds}

Many computer apps are essentially lists with tools that search, sort, or manipulate the items on the list. Some examples include: contact lists, playlists, calendars of events, locations on a map, reminders, etc. In this lab, you’ll create a simple shopping list app.

As programmers, we could use list block, list block, to type everything we want to buy right into a list block as inputs. But it would be nice for the user of the app to be able to add things to their list without dealing with blocks and to have some other list controls like a way to clear the list and to search the list without looking through the whole thing (which is especially useful if the list is long).

  1. Create a variable called shopping list to store the information.
  2. Set shopping list to be an empty list.
  3. Find list block, use arrows to reduce it to empty, use set variable to empty list block
  4. Create your own "Add Item" sprite costume or download and import this image:'Add Item' button
  5. Is #5 overly prescriptive or is it ok? --MF
  6. Write a script for this first sprite that, when clicked, uses ask to request a shopping list item and uses in front of and set to add the item to the list.
  7. It's good programming practice to get each new feature working before moving onto the next.
  8. Create second sprite with a "Clear List" costume. You can design your own or use this: 'Clear List' button
  9. Write a script for the second sprite that asks for confirmation and clears list.
 
  1. Improve first button to check the list when the user type a new item and use contains to check if that item is already on the list.
  2. Create third sprite with a "Search" costume that lets the user check whether an item is already on the list without adding it. 'Search' button
  3. Create a forth button that deletes an item from the list. 'Delete Item' button