After a tiring week, Charlotte wants to have a movie marathon from the movies that she’s added to her list on Netflix. Below shows Charlotte's list of movies, help her choose the movies by randomly choosing movies from her list below that sums up to the duration she wants her movie marathon to be. Use 6 hours and 24 hours as inputs, remember to screenshot both test cases.
Starter Code:
My_list = [{"Movie": "The Incantation", "Duration":2},
{"Movie":"The Invitation", "Duration": 2},
{"Movie":"The School for good and evil", "Duration": 2},
{"Movie":"Spirited Away", "Duration": 2},
{"Movie":"Your Name", "Duration": 2},
{"Movie":"Enola Holmes", "Duration": 2},
{"Movie":"A Silent Voice", "Duration": 2},
{"Movie":"The Tale of Princess Kaguya", "Duration": 2},
{"Movie":"Corpse Bride", "Duration": 1},
{"Movie":"Pitch Perfect 2", "Duration": 2}]