https://pollev.com/slade You may also download the app to your phone. Use the "slade" poll id.
There will be a UNIX question, as in the first midterm. Here is a sample UNIX transcript (solutions) UNIX will cover through principle 4.
There was a question about overflow in the hash function, djb2. On Monday, we discussed this and showed that Python was happy to calculate hash values that were enormous! E.g.,
>>>
h.hashfun('abcdefabcdefabcdefdkdkdkdkdkdkdkdkdslslslssl\
slslslslslslslslsllslslslsllslkdkslslslsldkdkdkdks',True)
'Hash of:
abcdefabcdefabcdefdkdkdkdkdkdkdkdkdslslslsslslslslsls\
lslslslsllslslslsllslkdkslslslsldkdkdkdks
=
296086086150504211996300652600047685835977743194174544\
282835418942403047443099183404852972673613849533884019\
555092649362921601644660642198201030846
While Python handles integers with arbitrary precision, other
operations — such as floating-point arithmetic or external libraries —
can still encounter overflow issues. See
How to Address Overflow in Python: A Comprehensive Guide
I recorded a lecture on Friday which covers iterators and decorators.