Info

Solutions for Part 1 and Part 2 of the final are now available! You can view the solution to Part 1 here and Part 2 here.

Tip

Practice programming and short answer questions from past quarters of CSE 160 can be found here.

Info

We will NOT be answering questions about the final during lecture, office hours, or via email. Instead, we will be answering all questions on the Ed board. The course staff will only answer clarifying or logistical questions, and not conceptual questions.

Download, extract, and open

Download the starter code for the final. Then, extract (unzip) the contents anywhere on your computer. In VSCode, navigate to File | Open and select the unzipped final_22su.py file, which will be used for the first part of the final.

Part 1

Here are the problem prompts for Part 1 of the final. Write your implementation of the functions in the final_22su.py file.

See the function docstrings and the provided assert statements in the template file for more information about each function. 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.

Make sure to write your name and who you collaborated with in the file header of final_22su.py.

Part 2

Navigate to Part 2 of the final on Gradescope, which asks more conceptual questions. You must complete both parts in order to receive full credit.

Details

  • We will not be grading on style, but we do recommend good variable names, comments, etc.
  • You may only use parts of Python that have been covered in the class so far.
    • You MAY use the built-in functions min, max, sum, and abs.
    • You MAY use functions we have covered from the math module.
    • You MAY import the operator module.
    • You MAY write and call helper functions (but this is not expected or required).
    • You may NOT use things we have not covered, such as recursion or lambda functions.
  • Your implementations only need to handle valid type inputs. For example, if the problem says it accepts a list as an argument, you do NOT need to handle the case when a user passes in a string instead.
  • While you are allowed to collaborate on the final within the academic honesty policy, you must submit your own answers and write your own code.

Submit

Submit final_22su.py under Final Part 1 and answer the questions for Part 2 on Gradescope. No late submissions are accepted.