CYB 135 Wk 4 – Apply: Summative Assessment: Labs

0 items
CYB 135 Wk 4 - Apply: Summative Assessment: Labs
CYB 135 Wk 4 – Apply: Summative Assessment: Labs
$10.00
  • Description

CYB 135 Wk 4 – Apply: Summative Assessment: Labs

Complete zyLabs 4.9–4.11 in zyBooks. You have unlimited attempts in Develop mode. Toggle to Submit mode for a grade

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 by 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 (greatest to least) and output the results to a file named output_keys.txt. Separate multiple TV shows associated with the same key with a semicolon (;), ordering by appearance in the input file. Next, sort the dictionary by values (in reverse alphabetical order), and output the results to a file named output_titles.txt