University of Arizona, Department of Computer Science

CSc 120 (Spring 25): Assignment 2

Start Date: Mon Jan 27
Due Date: Short problems: 7:00 PM, Thu Jan 30
OCA-3 Video: 11:00pm Sat Feb 1
Long problem: 7:00 PM, Tue Feb 4

This assignment aims to work on more complex Python data structures, in particular focusing on dictionaries.

General Requirements

  1. You do not need to provide comments for the short problems.
  2. For the long problem, your code should follow the style guidelines for the class.
  3. You may not use Python material and concepts not yet covered in class. These concepts include recursion, classes, exceptions, type annotations, list comprehensions, the with statement, and importing libraries (unless a library is explicitly mentioned in the specification.) If you don't know what any of these are, don't worry, because you can't use them accidentally.

Short Problems (Due 7:00pm Thu Jan 30)

(20 points)

These problems have to be solved and submitted in CloudCoder at http://practice.cs.arizona.edu.

The process for turning in your solutions is as follows:

The short problems for this assignment are the following:

  1. Sum a CSV string

  2. Convert a list of lists to a dictionary

  3. Shuffle a dictionary

  4. Invert a dictionary

  5. Update a 2-level dictionary

Long Problem (Due 7:00pm Tue Feb 4)

(80 points)

  1. Pokemon data analysis