CSCI0050 Tables1 Assignment
CSCI0050 Homework: Programming with Tables

Due: Wednesday, July 5 at 6pm (submit through Canvas)

Assignment Goals:
  • To practice writing programs over tables

  • To have you apply basic tables to a problem of your own interest

Collaboration Policy: You may work with others on the Ice Cream problems. Your work on "Design Your Own Table" must be entirely your own. You’ll submit each set of exercises in a separate file. Include a collaboration statement in each one.

Exercises: The Ice Cream Menu

Use the filename icecream.arr for this part.

A local ice cream store stores information about its current flavors in a Google Sheet. It wants to use data from the sheet to generate the menu for its new digital menu board. Your job is to write the programs they need to generate content for the menu board.

Here’s the link to the Google sheet. Create a Pyret file for this assignment, and load this sheet as your initial table. We’ll refer to this as the flavors table in describing subsequent problems.

Loading a Table from Google Sheets: the following lines show you how to load the above table into Pyret:

  include gdrive-sheets

  

  # the long string below is the last part of the URL to the sheet

  flavors-sheet = load-spreadsheet("1drj1kiC3VVCe17wrrTpNUn0DSx9R0mhdNkan7znOdcE")

  

  flavors = load-table: name, core, add-in, base, style

    source: flavors-sheet.sheet-by-name("flavors", true)

  end

The "flavors" in the sheet-by-name line names the sheet within the Google spreadsheet. It is coincidence that this is also the name given to the table in the Pyret dictionary.

The Problems

Exercises: Design Your Own Table

Use any filename you wish for this part, but put it in a separate file from the ice cream problems.

It’s your turn to design a table and some programs using either a dataset or problem context that interests you. You can choose any example you like, as long as you meet the following requirements:

These aside, feel free to experiment and have fun! You can create the table manually, or load from a Google sheet (up to you). You can use a real dataset or make one up. If you have no idea how to proceed, feel free to ask for help.

Grading and Expectations
What/how to turn in

Two files, icecream.arr and whatever you called your other file.