# a8q2 - CS 116 Assignment 8 Question 2 Ru Wang r46wang...

This preview shows pages 1–2. Sign up to view the full content.

## CS 116 Assignment 8 Question 2 ## Ru Wang r46wang 20319247 list0 = [] list1 = [["To Kill A Mockingbird", "drama", 8.5]] list2 = [["To Kill A Mockingbird", "drama", 8.5], ["Singin' in the Rain", "musical", 8.4]] list3 = [["Princess Bride", "adventure", 8.2], ["To Kill A Mockingbird", "drama", 8.5], ["Singin' in the Rain", "musical", 8.4]] list4 = [["Really Funny Movie", "comedy", 9.2], ["Princess Bride", "adventure", 8.2], ["To Kill A Mockingbird", "drama", 8.5], ["Singin' in the Rain", "musical", 8.4]] ## Helper function used for testing functions involving ## closeness: movie movie -> Boolean ## consumes two movies and produces True the title and genre are identical and that the rating ## differs by less than 0.000001, False otherwise. ## examples: closeness(["a", "drama", 1.2345674], ["a", "drama", 1.2345681]) => True ## closeness(["a", "drama", 1.234], ["a", "drama", 1.2345]) => False ## closeness(["a", "comedy", 3.14], ["b", "comedy", 3.14]) => False ## closeness(["a", "comedy", 3.14], ["a", "musical", 3.14]) => False

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 10/21/2010 for the course CS 116 taught by Professor T.vasiga during the Fall '09 term at Waterloo.

### Page1 / 2

a8q2 - CS 116 Assignment 8 Question 2 Ru Wang r46wang...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online