Compsci 101, Song Dictionary
This exercise is for collaborative work during class. Do not fill out early!
Sign in to Google to save your progress. Learn more
You are given the three favorite songs of each student, you want to figure out the most popular song. The data is given as a list of strings, each string is the three favorite songs of a student (1st, then 2cd then 3rd favorite) separated by colons.Create a dictionary of popular song titles and how many times each song is 1st place, 2cd place, 3rd place... see songtitles.py
songs = ["Hey Jude:Let it be:Day Tripper",
"Let it be:Drive my car:Hey Jude",
"I want to hold your hand:Help!:Day Tripper",
"Born to run:Thunder road:She's the one",
"Hungry heart:The river:Born to run",
"The river:Thunder road:Drive my car",
"Angie:Start me up:Ruby Tuesday",
"Born to run:Angie:Drive my car"]
 
What type of dictionary(ies) would you create to solve this problem? What are the keys and values? How would you update the dictionary(ies)? *
Names and Netids below
Names (comma separated) *
netid *
netid (partner)
netid (partner)
netid (partner)
Submit
Clear form
Never submit passwords through Google Forms.
This content is neither created nor endorsed by Google. Report Abuse - Terms of Service - Privacy Policy