Skip to content
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

Cohort 15 - Paper - Heidi Zhang #52

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

qingyuanhz1
Copy link

No description provided.

Copy link
Collaborator

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

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

Nice work Heidi, you hit the learning goals here. I made a few small comments, but this was very well written. Well done! This is a great 1st project at Ada.

@@ -0,0 +1,139 @@
# wave_01
def create_movie(movie_title, genre, rating):
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍


return new_movie

def add_to_watched(user_data, movie):
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

user_data["watched"].append(movie)
return user_data

def add_to_watchlist(user_data, movie):
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

user_data["watchlist"].append(movie)
return user_data

def watch_movie(user_data, title):
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

Comment on lines +36 to +38
for movie in user_data["watched"]:
total_rating += movie["rating"]
watched_movie_amount += 1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just a note that you can use len to get the number of movies and then you don't need the counter.


# a function call that gets user watched movies and gets friends watched movie, and return
# the movies that are watched by user but not their friends
def get_unique_watched(user_data):
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 , I like the use of the helper methods above!


# a function call that gets user watched movies and gets friends watched movie, and return
# the movies that are watched by friends but not the user
def get_friends_unique_watched(user_data):
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

return unique_friends_watched

# wave_04
def get_available_recs(user_data):
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

return movie_recs

# wave_05
def get_new_rec_by_genre(user_data):
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍


return movie_recs_by_genre

def get_rec_from_favorites(user_data):
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

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