-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scissors - Melissa #51
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
If you have the space, it may be worth trying to take 30-60 minutes to try to rewrite get_new_rec_by_genre
to use one or two methods you've previously written to DRY up the code a bit, just to get practice with that.
# function takes 2 parameters: user_data, title | ||
# user_data ==> dictionary: key: watchlist, watched; value: [] | ||
# title ==> string (title of movie user has watched) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a really useful docstring if you want to practice using those in the future!
# IF title of movie is IN user's watchlist: | ||
# remove movie from WATCHLIST | ||
# ADD movie to WATCHED | ||
# return user_data | ||
# IF title of movie IS NOT IN user's watchlist: | ||
# return user_data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love that you wrote pseudocode first! That said, its usually preferred that you remove pseudocode comments like this before committing and/or submitting your code.
# create dictionary to determine user's msot frequent genre type | ||
user_genre_frequency = {} | ||
for type in user_genre: | ||
if type not in user_genre_frequency: | ||
user_genre_frequency[type] = 1 | ||
else: | ||
user_genre_frequency[type] += 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is repeated from a previous method. Situations like this are a great chance to practice writing DRY code by calling methods that are already written
No description provided.