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

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

View Full Document Right Arrow Icon
## 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
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

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 Right Arrow Icon
Ask a homework question - tutors are online