Midterm Exam (20au)
NEW!A sample solution can be found here: midterm_20au-soln.py.
-
Please be sure you have read the Midterm Policy posted on the Ed Board.
-
Here are the Midterm Problems
-
Write your implementation of the functions in the provided template file: midterm_20au.py.
-
Submit this file via Gradescope, similar to how you would submit a homework assignment. The midterm closes at 11:59pm on Wed October 28, 2020. No lates accepted.
- See the function docstrings and the provided assert statements in the template file for more information about each function. Note: the assert statements provided in the template file are NOT exhaustive. We will be running many more tests than what we have provided. You are encouraged to add more assert statements to test more cases.
- We will NOT be grading your code on style. Of course we recommend good variable names, comments and good style, but we will NOT be grading your code on style.
- You may only use parts of Python that have been covered in the class so far (defined as found on lecture slides or section handouts or discussed in lecture).
- Your implementations only need to handle valid inputs. E.g. if the problem says it accepts a list and an integer as arguments, you do NOT need to handle the case when a user passes in a string and a float instead.
- While you are allowed to discuss these problems in groups of up to 6 persons, each student must submit their own answer in Gradescope.
- There are 5 problems and one final question to answer about collaboration.
Good luck and Have fun!