-
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
Cohort 15 - Paper - Heidi Zhang #52
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.
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): |
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.
👍
|
||
return new_movie | ||
|
||
def add_to_watched(user_data, movie): |
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.
👍
user_data["watched"].append(movie) | ||
return user_data | ||
|
||
def add_to_watchlist(user_data, movie): |
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.
👍
user_data["watchlist"].append(movie) | ||
return user_data | ||
|
||
def watch_movie(user_data, title): |
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.
👍
for movie in user_data["watched"]: | ||
total_rating += movie["rating"] | ||
watched_movie_amount += 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.
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): |
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 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): |
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.
👍
return unique_friends_watched | ||
|
||
# wave_04 | ||
def get_available_recs(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.
👍
return movie_recs | ||
|
||
# wave_05 | ||
def get_new_rec_by_genre(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.
👍
|
||
return movie_recs_by_genre | ||
|
||
def get_rec_from_favorites(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.
👍
No description provided.