CSC108H1 Exam Solutions Fall 2018: Docstring

89 views12 pages
31 Oct 2018
School
Course
Professor
yifanyang and 39659 others unlocked
CSC108H1 Full Course Notes
21
CSC108H1 Full Course Notes
Verified Note
21 documents

Document Summary

Do not turn this page until you have received the signal to start. (in the meantime, please ll out the identi cation section above, and read the instructions below carefully. ) This examination consists of 4 questions on 8 pages (including this one). In one or two sentences, and without using any python code, brie y explain a procedure for adding an echo to a digital sound. Assume we have a dictionary whose keys are contexts (strings), and whose associated values are length-2 lists whose two elements represent the number of heads and number of tails, respectively, chosen under the context. Consider the following function, which attempts to satisfy its docstring. def store_guess (context, memory, guess): In one or two sentences, and without using any python code, brie y explain why this function can fail to update memory with the new guess. Complete the following function according to its docstring description. def min_vals (d1, d2):

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers