Song Recommender

This is a project in the Codecademy CS102 course. It is a simple program to recommend music playlists based on user input. The user should run the Main.py file. The program will give a list of music genres that the user can select from. The user types the genre they would like to see, and a list of songs is generated. The songs are from Rolling Stone magazines’ Top 500 songs.

The link to the blog post is here:

The link to the GitHub is here:

Happy Tuesday,

I’m going to start with a common, minor miss of this project (and its a common one, so don’t feel upset about it). You are supposed to give the user the ability to search thru different music genres without explicitly listing them. For instance, if I wanted classic rock, I could enter “C” and your program should be able to identify all genres that start with the letter C (i.e. ‘Did you mean Classic Rock or Country?’). Once the choice is narrowed down to only one option, then the program should select that option.

The other bigger miss for me was that when you print out the songs, that’s literally all we get is a list of songs. But in your song file you have so much more information available that you could give the user (such as the artist, release date, and its position on the top 500 billboard. A song is nice, but getting the artist would have been even better since then I can go listen to it (and a link to the song on YouTube would have been over the top but amazing).

I’m also trying to understand where the tree structure was used in this. I see the tree structure added in the Data.py file, but none of the trees get returned to the recommendation software. In fact, the only actual data used is the genres list and songs dictionary. Maybe I’m missing something… but this feels like a simple dictionary look-up rather than storing data in a true data structure.

One thing I noticed is some of the files you imported all the functions and classes. In these cases, its easier to write one of the following lines of code rather than importing each function, class, etc separately:

  • import “filename”
  • from “filename” import *

Don’t let this get you down. I did all these same mistakes my first time attempting this project and had to revise my code many times. Hoping to see an update from you in the future that uses the actual tree structure you built :slight_smile: