Open
Conversation
…_movie_from_watchlist_to_empty_watched
…ues, now passes wave 02 test 02
…l tests in all waves now pass
…uccint and efficient
chimerror
reviewed
Oct 27, 2022
chimerror
left a comment
There was a problem hiding this comment.
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.
|
|
||
| def create_movie(title, genre, rating): | ||
| if title == None or genre == None or rating == None: | ||
| return None |
| "genre": "Horror", | ||
| "rating": 3.5 | ||
| } | ||
|
|
| @@ -19,25 +16,13 @@ def add_to_watched(user_data, movie): | |||
| "watched": [movie] | |||
| } | |||
There was a problem hiding this comment.
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"]) |
| for genre, count in genre_count.items(): | ||
| if count > max_genre_count: | ||
| max_genre_count = count | ||
| most_watched_genre = genre |
| user_unique_movies.append(title) | ||
| for movie in user_data["watched"]: | ||
| if movie not in friends_watched_list: | ||
| user_unique_movies.append(movie) |
| friends_unique_movies.append(movie) | ||
|
|
||
| return friends_truly_truly_unique_movies | ||
| return friends_unique_movies |
| friends_recs.append(movie) | ||
|
|
||
| return friends_recommended_flicks | ||
| return friends_recs |
| recs_by_genre.append(dictionary) | ||
| for movie in friends_unique_watched: | ||
| if movie["genre"] == fav_genre: | ||
| recs_by_genre.append(movie) |
| if movie in favs: | ||
| favs.remove(movie) | ||
|
|
||
| return favs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a lot shorter, granted, thanks to your suggestions Jayce, thank you.