Skip to main content
Version: 26fa

Review for Quiz 1

Functions and documentation​

It is recommended to review these topics:

  • Documentation elements (description, arguments, returns, errors)
  • Defining functions with types
  • Conditionals and iteration
  • None and Optional

Unit testing​

It is recommended to review these topics:

  • Using assert and reading its test output
  • Using pytest.raises() and reading its test output
  • Identifying test cases

We will not ask you to test functions that print things or take user input on the exam.

Git​

It is recommended to review these topics:

  • What is a repo? What is remote / local?
  • git clone <url> copies the remote repo to your computer
  • git add <filename> stages the changes in the file, and git add . stages all changes in the directory
  • git commit -m "message" commits the staged changes
  • git push pushes all local commits to the remote repo
  • git pull copies all commits from the remote repo to your local repo which are not already there

Practice Quiz 1​

Practice Quiz 1

Solution to Practice Quiz 1

If you use 2026 Spring's Practice Quiz 1, please keep in mind that we used unittest instead of pytest for testing, so the format may look different for the third question.