CSCI0050 Tables1 Assignment
CSCI0050 Homework: Programming with Tables

Due: Tuesday, July 9 at 6pm

Assignment Goals:
  • To practice writing programs over tables

  • To practice writing example tables for testing functions

Collaboration Policy: This is an individual assignment. Your work must be your own, though you can certainly utilize Kathi, Will, and Tasha’s office hours for help.

Reminder: put the following lines at the top of your file to get all the needed table operations:

  include tables

  include shared-gdrive("cs111-2018.arr", "1XxbD-eg5BAYuufv6mLmEllyg28IR7HeX")

  include gdrive-sheets

For part of this assignment, you will again work with the Data Druid tool. Druid has been configured so that different students are asked to use different Druid versions on different problems. Since this is a SOLO assignment, you shouldn’t be discussing the problems with anyone anyway, but just letting you know that you won’t all be asked to do exactly the same work per problem (the work will, however, be similar across the whole assignment).

Exercises: Testing Gradebook Functions

In class, we wrote several functions using gradebooks as an example. We talked a bit about how to test table functions, including functions that take rows as inputs and functions that produce entire tables as output.

For this section of the assignment, you are going to write test cases for two functions involving gradebook tables. To make sure that you create tables that have the right types in each cell, we will have you work again in the Data Druid tool. Please do these two problems in the order assigned below (it helps us with our analysis of how you are all doing learning to work with data tables).

For both of these exercises, you will get full points as long as you submit something reasonable and show a good attempt at the problem.

A couple of reminders on Druid exercises:

Exercises: The Ice Cream Menu

Put your work for this set of exercises in a file named icecream.arr. At the top of the file, confirm that you worked on your own by including this statement: "I understand this is an individual assignment, the work below is my own"

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")

  

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

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

  end

The Problems

Grading and Expectations
What/how to turn in

Submit five files, icecream.arr plus your four Druid files, through this Google form.