movie_scores = [ ("Shawn the Sheep: The Beast of Mossy Bottom", 7.2), ("The Odyssey", 8.4), ("Coyote vs. Acme", 7.5), ("Insidious: Out of the Further", 6.2), ("Bad Apples", 7.2), ("Resident Evil", 7.7), ("Buddy", 7.0), ("The Uprising", 6.3)] def print_movies(movie_db): for movie_pair in movie_db: (movie, score) = movie_pair print(movie + "\t" + str(score)) def print_movies2(movie_db): for movie_pair in movie_db: print(movie_pair[0] + "\t" + str(movie_pair[1])) def print_movies3(movie_db): for (movie, score) in movie_db: print(movie + "\t" + str(score)) def get_movie_score(movie_db, movie_title): for (movie, score) in movie_db: if movie == movie_title: return score return -1 def get_highest_rated_movie(movie_db): max_score = -1 max_movie = "" for (movie, score) in movie_db: if score > max_score: max_score = score max_movie = movie return (max_movie, max_score) def get_movies_above_threshold(movie_db, threshold): movies_above = [] for (movie, score) in movie_db: if score >= threshold: movies_above.append(movie) return movies_above