Please be sure you have read the Final Exam Policy
posted on the Ed Board. The final exam closes at 5pm on Thurs December 17. No lates accepted. Note that the Final Exam consists of TWO parts that require two separate submissions on Gradescope! [Gradescope Submission for Part 1
] [Gradescope Submission for Part 2
A sample solution for part 1 can be found here: final_20au-soln.py. A sample solution for part 2 can be found here.
- Part 1: Writing Functions
Here are the Problems for Part 1
Write your implementation of the functions in the provided template file: final_20au.py.
Submit this file via Gradescope, similar to how you would submit a homework assignment.
- 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).
- In particular, you MAY use these items discussed during
the last weeks of the quarter: list comprehensions, get and
setdefault, enumerate, ternary assignment. You do not NEED
to use any of these to solve these problems, and we will
not be awarding any extra points for using them, but you
are welcome to use them.
- You also MAY use the functions min, max, sum, and abs.
- You MAY write and call helper functions(but this is not
- You do NOT need classes for any problems in Part 1.
- You MAY import itemgetter and use it.
- You may NOT use anything from the Math module.
- You may NOT use things we have not covered, such as
recursion or lambda functions.
- 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 3 problems for Part 1. (You will answer a question about collaboration on Part 1 & Part 2, later in Part 2.)
- Part 2: Short Answer/Code Writing
Here is Part 2 which you will submit similar to how you submitted in-class activities.
Good luck and Have fun!