Question: using python Function name (6):sort films Return value N/A Description: Using top500.txt which contains the name and lifetime gross revenue of the top 500 films.

using python

using python Function name (6):sort films Return value N/A Description: Using "top500.txt"

which contains the name and lifetime gross revenue of the top 500

Function name (6):sort films Return value N/A Description: Using "top500.txt" which contains the name and lifetime gross revenue of the top 500 films. Each line of the given file is formatted like so: These movies are not in order. Write a function called 'sort films' that accepts two parameters: a string of a source filename and a string of a destination filename. Your function should open the source file and sort the contents from greatest gross revenue to least gross revenue, and write the sorted contents to the destination filename. You may assume the source file is correctly formatted. sort films("top5ee.txt", "top5eeresult.txt") The top 20 results (your file should have all 58e) should look like this Star Wars: The Force Awakens 936662225 Avatar 760507625 Titanic Jurassic World 652278625 Marvel's The Avengers 62335791e The Dark Knight 534858444 Rogue One: A Star Wars Story 530748532 Finding Dory 486295561 Star Wars: Episode I The Phantom Menace 474544677 Star Wars 460998807 658672382

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!