Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE HELP: write this function in Python with API key = d19e9925dfb05c1ecd1b065c3062aa80 Function name: get cast members Parameters: movie_id (int), job_title (string), section (string) Returns;
PLEASE HELP: write this function in Python with API key = d19e9925dfb05c1ecd1b065c3062aa80
Function name: get cast members Parameters: movie_id (int), job_title (string), section (string) Returns; names of people who worked the job specified by the job title for the givern movie (list of strings) Description: Write a function that takes in a movie_id, a job_title, and a section (either "cast" or "crew). Find the names of every person working on the movie who works irn the specified section and has the specified job title. Assume everything passed in is valid. Add these names to a list. Return the list at the end of the function. Note: Every job_title listed as "Actor" will be considered as working for the section "cast" and every person working for the section "cast" will be considered under the job_title Actor". The only job_title that works in the "cast" section is "Actor". All other job types will be found under the "crew" section Hint: The credits endpoint will be useful for solving this function. Test Cases: >>> test-1 = get-cast members (1493, "Actor", "cast") >>>print(test 1) ['sandra Bullock', 'Benjamin Bratt', 'Michael Caine', 'Candice Bergen, 'William Shatner 'Ernie Hudson, John DiResta, Heather Burns', 'Melissa De Sousa', 'Steve Monroe, 'Deirdre Quinn', 'Wendy Raquel Robinson', 'Asia De Marcos', 'Ken Thomas', Gabriel Folse, 'Leeanne Locken 'John Cann' ] >>> test 2 = get cast members (157336, "Director", "crew") >>>print (test 2) I'Christopher Nolan']Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started