-
Notifications
You must be signed in to change notification settings - Fork 167
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
Tigers - Sunny Muniz #172
base: master
Are you sure you want to change the base?
Tigers - Sunny Muniz #172
Conversation
…_movie_from_watchlist_to_empty_watched
…ues, now passes wave 02 test 02
…l tests in all waves now pass
…uccint and efficient
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.
Good Work!
Though not all of the issues that I pointed out got fixed, the ones you did fix are much improved, and I am marking this a Green. I didn't have much to add in most cases since your solution matched my suggested ones, so a lot of my comments are just a single thumbs up emoji noticing you had fixed something.
@@ -1,16 +1,13 @@ | |||
# ------------- WAVE 1 -------------------- | |||
|
|||
def create_movie(title, genre, rating): | |||
if title == None or genre == None or rating == None: | |||
return None |
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.
👍🏽
"genre": "Horror", | ||
"rating": 3.5 | ||
} | ||
|
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.
👍🏽
@@ -19,25 +16,13 @@ def add_to_watched(user_data, movie): | |||
"watched": [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.
This issue with replacing the key instead of using append
was pointed out the first time, but since I felt other work showed your knowledge, it's not a big deal. It still would have been preferred to fix it.
The issue exists in add_to_watchlist
as well.
for movie in user_data["watched"]: | ||
total += movie["rating"] | ||
|
||
average = total / len(user_data["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.
👍🏽
for genre, count in genre_count.items(): | ||
if count > max_genre_count: | ||
max_genre_count = count | ||
most_watched_genre = genre |
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_unique_movies.append(title) | ||
for movie in user_data["watched"]: | ||
if movie not in friends_watched_list: | ||
user_unique_movies.append(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.
👍🏽
|
||
return friends_truly_truly_unique_movies | ||
return friends_unique_movies |
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 friends_recommended_flicks | ||
return friends_recs |
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.
👍🏽
recs_by_genre.append(dictionary) | ||
for movie in friends_unique_watched: | ||
if movie["genre"] == fav_genre: | ||
recs_by_genre.append(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.
👍🏽
if movie in favs: | ||
favs.remove(movie) | ||
|
||
return favs |
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.
Good implementation!
This is a lot shorter, granted, thanks to your suggestions Jayce, thank you.