Schedule

Unless specified otherwise, weekly readings and media are due before class on:

The due date will be specified by T-date1/W-date2, where date-1 is for TTh classes and date-2 is for MWF classes. For example, by T-Sep 1/W-Sep 2 means that the reading is due before class on Sep 1 for TTh classes and before class on Sep 2 for MWF classes.

Weeks are listed newest first, so the current one is always at the top.

Week 6: Lists continued

Due: by T-Oct 6/W-Oct 7

Estimated time to complete: 1.5–2.5 hours

  • Revisit the Python vs Pyret activity:

    • Work through todo items in sign-text.py.
    • For the Pyret version of the same program, try to make the same mistakes as in Python.
      Click here for a hint To mimic the no-return mistake, turn n > 0 into a name definition.
      Submit your observations into the class journal.
  • Read Section 5.2 from DCIC until section 5.2.6 (not including it) and complete the built-in exercises and activities.
    Note: this week’s topic is a lot more complex than everything we have done so far, so be prepared to think carefully and re-read the material if something does not click.

    • Practice reflecting on your understanding of the material. If something in the prep materials feels shaky, pause, make a note, and try to turn that into a question. Does a particular word seem unfamiliar? Are you not sure what the phrase refers to? Do you not see why the book says a certain expression is equivalent to another? Write the question down. Think about it briefly. If you figured it out, great! If not, even better—post the question on Discord. Do this exercise at least once.

    • When you get to the implementation of my-len in 5.2.3.3 From Examples to Code, stare at it for a moment. Is there anything unusual about it?

      Click here for a hint

      In the past, we wrote functions that would call other functions, but what is happening here?

      Submit your observations into the class journal.

    • When you get to the end of 5.2.4.1 my-doubles: Examples and Code, pause. Think back to the previous week’s materials and assignments. How would you have implemented my-doubles using only the material from last week?

      Click here for a hint

      Consider the assignment task of defining list-sqrts.

      Now that you’ve seen the new material, how do you think the function you used last week might be implemented? Submit your thoughts into the class journal.

Week 5: Introduction to lists and review

Due: by T-Sep 29/W-Sep 30

Estimated time to complete: 1 hour for the new material, plus additional time for review as needed.

This week is light on new material due to the upcoming progress exam. The exam will not have any questions on lists.

  • Review previous assignments and quizzes; sample solution and quiz answers are available on Discord.
  • Think about the following concepts (and if you are not sure about them, review previous chapters of DCIC as needed):
    • values
    • expressions
    • evaluation of expressions
    • statements (so far we have seen only one example of a statement, which is a name definition)
    • names
    • functions
    • examples (test cases)
    • type annotations
    • evaluation of functions
    • conditional (if-expression)
    • evaluation of conditionals
    • tables

For now, we will skip Section 4.2 on processing tables. When doing the book exercises, when you need to work with a table, use the code snippet from here:

include gdrive-sheets
include data-source

ssid = "1Ks4ll5_8wyYK1zyXMm_21KORhagSMZ59dcr7i3qY6T4"
cleaned-data =
  load-table: name, email, tickcount, discount, delivery, zip
    source: load-spreadsheet(ssid).sheet-by-name("Cleaned", true)
    sanitize name using string-sanitizer
    sanitize email using string-sanitizer
    sanitize tickcount using num-sanitizer
    sanitize discount using string-sanitizer
    sanitize delivery using string-sanitizer
    sanitize zip using string-sanitizer
  end

Look at the value of cleaned-data to understand its structure before proceeding with the prep materials.

Read Section 5.1 from DCIC and complete the built-in exercises and activities.

Week 4: Review previous materials

There are no new prep materials this week. Use this time to review previous materials and catch up.

Week 3: Introduction to tabular data

Due: by T-Sep 15/W-Sep 16

Estimated time to complete: 1.5–2 hours

Read DCIC Section 4.1, paying careful attention to and completing built-in exercises and activities.

Week 2: Functions and conditionals

Due: by T-Sep 8/W-Sep 9

Estimated time to complete: 1–1.5 hours

Week 1: Setup and first programs

Due: by T-Sep 1/W-Sep 2

Estimated time to complete: 2.5 hours

Note: if you are running behind and need to prioritize, start with the video and DCIC Section 3—with at least some exercises.

Week 0: Intro to the Course

Due: by T-Aug 27/W-Aug 26

Read the syllabus.