Discrete Structures & Algorithms

Month: April 2022 (Page 3 of 3)

Class #17 (Mon April 4)

Topics

  • Finish Sec 2.3: Functions (“onto” functions)
  • Start Ch 3 – Algorithms
  • Python code
    • We discussed the function in Sec 2.3, #7(b): “the function that assigns to each positive integer the number of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 that do not appear as decimal digits of the integer.”
    • See here for an implementation of that function in python, using python’s “set” data type.

Announcements/To-do:

  • Hand in HW#3
Newer posts »