Question: USE PYTHON! Have you ever gone into Netflix and wanted to search for a specific item on the Home Screen, but only if the title

USE PYTHON!

USE PYTHON! Have you ever gone into Netflix and wanted to search

Have you ever gone into Netflix and wanted to search for a specific item on the Home Screen, but only if the title is highly rated? What if we could have some code to do that for you? Write a function find_content(listings, title, min_rating) that takes in a list of lists (listings) containing rows of shows/movies, a string (title) to search for, and an int (min_rating) that the show must have. It then returns which row the title appears in and its position within the row. Each item in listings is another list that represents a row on Netflix's home screen. Each element in the row is yet another list containing the title of a show or movie and a "star rating" from 0 to 5 (inclusive). You can assume there are no duplicate titles in listings and that title must match exactly. If an entry is found containing title and at minimum min_rating the function returns a list containing the location in the format (row_index, item_index]. Otherwise, if there was no match, return (-1, -1]. Here are few test cases that your function will be expected to produce: my_listings [ [[ "Ozark", 4.2], ["The Witcher", 3.4], ["The Great Baking Show", 5.0]), [["Chef to Table", 4.9), ["Single's Inferno", 2.0], ["Cocomelon", 4]], [["Bee Movie", 5.0], ["Daredevil", 3.6), ["Arcane", 2.0]] ] . find_content (my_listings, "Daredevil", 3) should return [2, 1] find_content (my_listings, "Daredevil", 4.5) should return (-1, -1] find_content (my_listings, "Cocomelon", 1.0) should return [1, 2] find_content([], "Finding Nemo", 0) should return [-1, -1] These are not the only cases that will be used to test your function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!