Question: Write a program that asks for the user's top 5 favorite songs. Then, ask the user if they want to add a song to this

Write a program that asks for the user's top 5 favorite songs. Then, ask the user if they want to add a song to this list.
If they say "Yes", ask for the name of the song, as well as what ranking (1-5) it should be at in the top 5 songs. Note: This list should not contain more than 5 songs, so you must get rid of any songs that aren't in the top 5.
If they say "No", ask the user if they want to remove a song. If they say "Yes", ask for the song they want to remove and if it exists in the list, remove it. Otherwise, print "This song does not exist in the list".
At the end of your program, the user's top 5 songs will be printed. If the user only has a top 4 songs, print only these 4 songs.
Ex: (bold is user input)
Cupid As It Was Celestial yes, and? Saturn Do you want to add a new song? Yes Song name: Anti-Hero Ranking: 31. Cupid 2. As It Was 3. Anti-Hero 4. Celestial 5. yes, and?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!