CMSI 1010
Final Exam Preparation

Logistics

The final will be closed book, but you can bring in three pages of notes.

The exam will in person on Monday, December 8, 2025 at 2:00 p.m. America/Los_Angeles.

How to Study

You should:

  1. Review the course learning objectives from the syllabus
  2. Review the course notes and labs
  3. Do plenty of practice problems!
  4. Browse the suggested self-study resources in the labs

Topics Review

Review the course notes if you can, but to help you a little, here’s an outline of the topics we covered:

Python Getting Started
    print
    String literals
    String multiplication (repetition)
    for loops
    list literals
    ranges
    functions for grouping statements
    function calls vs. function definitions
    parameters vs. arguments
    arguments with (kwargs) and without (positional) names
Command Line
    Terminal vs. Shell vs. Command Line vs. CLI
    pwd, cd, ls, mkdir, touch, rm, cp, mv, cat, echo, find
    curl and unzip (not going to be on the exam)
    Running python with and without a file names
    Python REPL
Git and GitHub
    One time configuration (git config)
    git init
    git add
    git commit
    git status
    git log
    git diff
    README.md files
    Connecting a local repository to a remote repository
    git push
    git pull
Python interactive command line applications
    input()
    if statements
    indexing and slicing strings and lists
    while loops
    Booleans
    string.strip(), string.lower()
    random.choice()
Python data types
    int, float, str, bool
    list, tuple, set, dict
    type() and isinstance()
    multiline strings
    operators like "in", "not in", "is", "is not"
    comments
More Python features and programming techniques
    functions that return values, not just print
    match statements
    import, for multi-file programs
    modules and packages
    exceptions
    string formatting (f-strings)
    thinking about algorithm design
    figuring out when you need to introduce functions
    locales
    conditional expressions (y if x else z)
    understanding / vs // vs % vs **
Recursion
    base case
    recursive case
    often you don’t need or want it, if a simple loop will do
    if recursion is multi-way, it tends to shine more
        - however, there is a huge caveat here you will learn later
    recursion in nature and art
Classes
    often better than dictionaries when representing ”things”
    class definitions
    __init_() method
    self parameter
    attributes
    methods
    Variables are necessary for sharing!
    Dataclass are usually better! (__init__() is auto-generated)
    Have to use the @dataclass decorator
    Have to import dataclass from the dataclasses module
    You can validate with __post_init__()
Writing your own Tests
    import unittest
    various forms of assert statements
    to test if an exception is raised, use assertRaises in a with statement
Virtual Environments
    python -m venv env
    source env/bin/activate (or source env/Scripts/activate on Windows)
    pip install --upgrade pip
    deactivate
    virtual environments are not necessary, but they are a good idea!
    pip install Tree
    pip install pygame
Pygame
    pygame.init()
    pygame.display.set_mode()
    pygame.display.set_caption()
    Event loop
    raise SystemExit after QUIT event and pygame.quit()
    pygame.event.get()
    Event types like QUIT, KEYDOWN, KEYUP, MOUSEBUTTONDOWN, MOUSEBUTTONUP
    pygame.draw.rect()
    pygame.draw.circle()
    pygame.draw.line()
    pygame.draw.polygon()
    pygame.draw.arc()
    pygame.draw.ellipse()
    pygame.display.flip()
    Colors as RGB tuples
    clock = pygame.time.Clock() and clock.tick(60) for smooth animation
    Keyboard events
    Collision detection
    Custom events
Pandas
    (will not be on the exam)
APIs
    (will not be on the exam)

Practice

Make sure to do the recall questions at the bottom of each of the labs.

Study Checklist

Keep in mind that our (world’s) knowledge culture is far more literary than oral, so read, or reread, or watch the Further Study resources in the labs. Here’s checklist to help you ensure you’ve covered all the good stuff:

You have to put in the time for effortful self-study.

Problem Focus

Here’s a breakdown of the focus for each problem (not in order):