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

rock_lin #64

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

rock_lin #64

wants to merge 2 commits into from

Conversation

lzhang39
Copy link

No description provided.

lzhang39 and others added 2 commits March 29, 2021 02:32
deleted extra accidental function in Wave 5
Copy link

@audreyandoy audreyandoy left a comment

Choose a reason for hiding this comment

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

Great job Lin! Your code was neat and easy to read. Overall, you hit the learning goals. I'm glad you were able to use newer data structures and functions on this project! I have added some comments and am looking forward to going over them with you in our next 1:1 (:

Keep up the good work!

Comment on lines +1 to +3
{
"python.pythonPath": "venv/bin/python"
}

Choose a reason for hiding this comment

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

For future reference, we'll be adding all files specific to your coding environment to a .gitignore file. This will prevent any conflicts your code may have with another teammates' coding environment.

Comment on lines +4 to +6
movies_dict["title"] = title
movies_dict["genre"] = genre
movies_dict["rating"] = rating

Choose a reason for hiding this comment

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

Nice! Another way to write this code is to create the dictionary in the if statement so

if title and genre and rating:
    movies_dict = {
           "title": title,
           "genre": genre,
           "rating": rating
    }
    
    return movies_dict

for movie in user_data["watchlist"]:
if title in movie["title"]:
user_data["watchlist"].remove(movie)
user_data["watched"].append(movie)

Choose a reason for hiding this comment

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

You could also call the add_to_watched function here

else:
for movies in user_data["watched"]:
genres_from_user.append(movies["genre"])
most_popular_genre = max(

Choose a reason for hiding this comment

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

Nice use of max and set here. Please add a comment next time you use code that's outside of the scope of the curriculum.

Comment on lines +75 to +77
def remove_dupes(user_data):
return [i for n, i in enumerate(
user_data) if i not in user_data[n + 1:]]

Choose a reason for hiding this comment

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

Ooo great use of list comprehension and the enumerate function!

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