Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Also, This, I need an answer everything you guys put out here is wrong I don't understand this whole thing. = zyBooks @ learn.zybooks.com Q

Also, This, I need an answer everything you guys put out here is wrong I don't understand this whole thing.

image text in transcribed
= zyBooks @ learn.zybooks.com Q m 7-2 zyBooks Lab Activities - IT-140-X3255 Introduction to Scripting 24E... a Section 7.9 - IT 140: Introduction to Script My library > IT 140: Introduction to Scripting home > 7.9:LAB: Sorting TV Shows (dictionaries and lists) [& zyBooks catalog @ Help/FAQ @ 1 7.8 LAB: Word frequencies (lists) 7.9 LAB: Sorting TV Shows (dictionaries and lists) Write a program that first reads in the name of an input file and then reads the input file using the file.readlines() method. The input file contains an unsorted list of number of seasons followed b y the corresponding TV show. Your program should put the contents of the input file into a dictionary where the number of seasons are the keys, and a list of TV shows are the values (since multiple shows could have the same number of seasons) ! Sort the dictionary by key (least to greatest) and output the results to a fi associated with the same key with a semicolon G named output_titles.txt Ex: If the input is le named output_keys.txt, separating multiple TV shows Next, sort the dictionary by values (alphabetical order), and output the results to a file filel.txt and the contents of file1 txt are 20 Gunsmoke 30 The Simpsons 10 Will & Grace

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Programming questions