subject

#We've given you a file called "top500.txt" which contains #the name and lifetime gross revenue of the top 500 #films at the time this question was written. # #Each line of the given file is formatted like so: # \t # #In other words, you should call .split("\t") to split #the line into the movie name (the first item) and the #gross (the second item). # #Unfortunately, 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. # #Hint: one common issue on this problem is that every line #in the input file ends with a line break except the last #one. If the autograder gives you an index error, open #top500result. txt and make sure there are 500 lines in your #output file! #Write your function here!

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 15:30, alexdub9649
What is a costume plot? why is it important to a film or theater production?
Answers: 2
image
Computers and Technology, 22.06.2019 18:30, yeeet26
If an improvement creates no significant change in a product’s performance, then it is a(n) ? a0 design improvement. (there are no answer choices)
Answers: 1
image
Computers and Technology, 23.06.2019 02:00, kayladgranger
Which demographic challenge is europe currently experiencing? a. an aging and decreasing population b. a baby boomc. an unequal distribution between males and females d. a large group of teenagers moving through the school system(i chose a but i'm unsure)
Answers: 1
image
Computers and Technology, 23.06.2019 12:40, melaniem50
Curriculum exam to process a resident's payment, you must click on onesite payments home page. from the a. reports b. my settings o c. transactions o d. rent tab
Answers: 1
You know the right answer?
#We've given you a file called "top500.txt" which contains #the name and lifetime gross revenue of t...

Questions in other subjects:

Konu
English, 05.06.2021 01:00