Monthly Archives: November 2018

Exam #3: Topics & Exercises to Review

The following topics will be covered on Exam #3, which will be on Wednesday, Nov 28:

  • Algorithms:
    • work on HW#6
    • read Sec 3.1, pp194-198: review linear search, binary search, bubble sort, insertion sort
    • review Quiz #4 (questions #1 & #2)
  • Functions (domain/range, one-to-one & onto functions):
    • review Exam #2, questions #2(c) & #4
    • review Sec 2.3: Examples 3-4, 8-15
    • exercises from HW#5: Sec 2.3, #5(a)(b), 10, 11
  • Recurrence relations:
    • review Sec 2.4: Examples 5–8
    • exercises from HW#5: Sec 2.4, #10(a)(b) [also try #9(a)(b) & #11(a)(b)]
    • review Quiz #4 (question #3)

A Python Trinket: Basic Set Operations

Here are a few lines of Python code I wrote to demonstrate how the basics of sets work in Python. Note that these are the same sets A and B that appeared on Exam #2!

So far I’ve only put in code to compute and print $A \cup B$. Take a minute to look at this link for a primer on the other basic set operations, and then add a couple lines of code to compute $A \cap B$, $A-B$, $B-A$ and $A \oplus B$.