PYTHON PLEASEit as a string Source for data: https://en.wikipedia.org/wiki/List_of_Billboard Hot 100 top- ten_singles_in_2019 Background Dictionaries are ordered by their keys, but what if we needed to find the key with the largest value instead? Look up how to do this in python. Question • Write a function called count hits that takes in a string of artists and songs (separated by t) and returns a dictionary where the artist is the key and the number of top 10 songs they had in 2019 is the value Write a function called get biggest val() that takes in a dictionary and returns the key with the biggest value. In main(). get the data from 2019 TopTen, txt as a string Print out the name of the artist who had the most top 10 hits in 2019. Examples nload Example 1 – count_hits (). Example call: tolo “Lewis Capaldilt Someone You Tou Pays in your teacher: Example 1 – count_hits() Example call: top10 = “Lewis CapalditSomeone You Loved “Post MalonetCirclesn” “Shawn MendestSenoritan” “Camila CabellotSenoritan” “Maroon 5tMemoriesn”. “LizzotGood As Helln” “LizzotTruth Hurtsn” “Billie Eilishteverything i want “Thris BrowntNo Guidancen” “Selena GomeztLose You To Love Me “Arizona ZervastRoxanne” de. count_hits(top10) Example return value: {“Lewis Capaldi”: 1, “Post Malone”: 1, “Shawn Mendes”: “Camila Cabello”: 1, “Maroon 5”: 1, “Lizzo”: 2, “Billie Eilish”: 1, “Chris Brown 1, “Selena Gomez” 1, “Arizona Zervas”: nload don mann 2019 TopTen txt; def open_file(): f = open(“2019TopTen.txt”) return f.read() # Put your functions here. GREEC VOUW def maino: string = open_file print(string) # Replace this with your a main “: name. main Show transcribed image text it as a string Source for data: https://en.wikipedia.org/wiki/List_of_Billboard Hot 100 top- ten_singles_in_2019 Background Dictionaries are ordered by their keys, but what if we needed to find the key with the largest value instead? Look up how to do this in python. Question • Write a function called count hits that takes in a string of artists and songs (separated by t) and returns a dictionary where the artist is the key and the number of top 10 songs they had in 2019 is the value Write a function called get biggest val() that takes in a dictionary and returns the key with the biggest value. In main(). get the data from 2019 TopTen, txt as a string Print out the name of the artist who had the most top 10 hits in 2019. Examples nload Example 1 – count_hits (). Example call: tolo “Lewis Capaldilt Someone You Tou Pays
in your teacher: Example 1 – count_hits() Example call: top10 = “Lewis CapalditSomeone You Loved “Post MalonetCirclesn” “Shawn MendestSenoritan” “Camila CabellotSenoritan” “Maroon 5tMemoriesn”. “LizzotGood As Helln” “LizzotTruth Hurtsn” “Billie Eilishteverything i want “Thris BrowntNo Guidancen” “Selena GomeztLose You To Love Me “Arizona ZervastRoxanne” de. count_hits(top10) Example return value: {“Lewis Capaldi”: 1, “Post Malone”: 1, “Shawn Mendes”: “Camila Cabello”: 1, “Maroon 5”: 1, “Lizzo”: 2, “Billie Eilish”: 1, “Chris Brown 1, “Selena Gomez” 1, “Arizona Zervas”: nload don
mann 2019 TopTen txt; def open_file(): f = open(“2019TopTen.txt”) return f.read() # Put your functions here. GREEC VOUW def maino: string = open_file print(string) # Replace this with your a main “: name. main
Expert Answer
Answer to it as a string Source for data: https://en.wikipedia.org/wiki/List_of_Billboard Hot 100 top- ten_singles_in_2019 Backgro…