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
Here is the python code from class yesterday, which computes the image of a set S for given function (for one of the HW exercises from Sec 2.3):
https://trinket.io/python/6509451351