movie_scores = [ ("Demon Slayer: Kimetsu No Yaiba Infinity Castle", 8.7), ("Downtown Abbey: The Grande Finale", 7.8), ("The Conjuring: Last Rites", 6.5), ("The Long Walk", 7.4), ("Weapons", 7.6), ("Freakier Friday", 6.9), ("The Fantastic Four: First Steps", 7.3), ("The Bad Guys 2", 7.1)] 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 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