University of Arizona, Department of Computer Science

CSc 120 (Fall 2017): Assignment 9

Start Date: Wed Oct 25
Due Date: Short problems: 7:00 PM, Sat Oct 28
Long problems: 7:00 PM, Thu Nov 2

This assignment continues working with linked lists (long problems) and begins working with list comprehensions (short problems).

General Requirements

  1. Your code should follow the style guidelines for the class.
  2. You should only use external libraries that have either been mentioned either in class or else in the assignment spec.

Short Problems (Due 7pm Sat Oct 28)

(20 points)

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

The process for turning in your solutions is as in previous assignments. There are three problems, described below, which are grouped under the assignment name "Assg 9".

The short problems for this assignment are the following:

  1. List comprehensions 1: times_k()

  2. List comprehensions 2: kth_elements()

  3. List comprehensions 3: times_i()

  4. List comprehensions 4: first_matches_last()

For each of these problems, you should use only list comprehensions—i.e., no for, while, if, try, etc., except possibly for a for and if construct within the list comprehension.

Long Problems (Due 7pm Thu Nov 2)

(80 points)

  1. Friends
    Files: friends.py and linked_list.py.

Submission information: Submit the files specified above at http://gradeit.cs.arizona.edu/gradeit-v1/public/120/17au/homework/turnin/hw9.html