Skip to content

Pine - Kayla Huddleston#86

Open
khuddleup wants to merge 1 commit intoAda-C16:masterfrom
khuddleup:master
Open

Pine - Kayla Huddleston#86
khuddleup wants to merge 1 commit intoAda-C16:masterfrom
khuddleup:master

Conversation

@khuddleup
Copy link

No description provided.

Copy link

@jbieniosek jbieniosek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on this project Kayla! Nice work with your helper function! This is a very solid project, and is green. You hit all of the learning goals. Fantastic work!

if title == movie["title"]:
movie_to_watch.remove(movie)
movies_watched.append(movie)
return user_data #no else statement needed

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

for rating in user_data["watched"]:
ratings_total += (rating["rating"])
list_count = (len(user_data["watched"]))
average = ratings_total/list_count

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice solution!

else:
for genre in user_data["watched"]:
genre_list.append((genre["genre"]))
popular_genre = max(genre_list, key = genre_list.count)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would you solve this without the max function?

Comment on lines +54 to +67
def get_unique_list_of_users_movies(user_data):
users_movies = []
for movie in user_data["watched"]:
if movie not in users_movies:
users_movies.append(movie)
return users_movies

def get_unique_list_of_friends_movies(user_data):
friends_movies = []
for friends_watched in user_data["friends"]:
for movies_watched in friends_watched["watched"]:
if movies_watched not in friends_movies:
friends_movies.append(movies_watched)
return friends_movies

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YAY! 🎉

Comment on lines +70 to +71
users_movies = get_unique_list_of_users_movies(user_data)
friends_movies = get_unique_list_of_friends_movies(user_data)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great use of helper functions!

Comment on lines +84 to +87
for movies in friends_movies:
if movies not in users_movies:
friends_unique_list.append(movies)
return friends_unique_list

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section is doing the same work as lines 74-77. Could you create a helper function to do this work?

for friends_watched in friend["watched"]:
if {"title":friends_watched["title"]} not in user_data["watched"]\
and friends_watched["host"] in user_data["subscriptions"]:
if friends_watched not in reccomendations:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This conditional can be combined with and to the conditionals in the if statement above it.

Comment on lines +102 to +103
frequent_genre = get_most_watched_genre(user_data)
user_not_watched = get_friends_unique_watched(user_data)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@khuddleup
Copy link
Author

Thank you for this feedback @jbieniosek! Just the affirmation I needed. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments