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 YuliyaP final version viewing party #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yukka-pukka
Copy link

No description provided.

@yukka-pukka yukka-pukka changed the title docs: final version viewing party Rock YuliyaP final version viewing party Mar 28, 2021
Copy link

@spitsfire spitsfire 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!

@@ -0,0 +1,131 @@
# WAVE One
def create_movie(movie_title, genre, rating):

Choose a reason for hiding this comment

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

👍

Comment on lines +3 to +12
movie = {}
movie['title'] = movie_title
movie['genre'] = genre
movie['rating'] = rating

for values in movie.values():
if values == None:
return None

return movie

Choose a reason for hiding this comment

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

this works just fine! but we are creating space in memory with a variable movie that might no even be valid yet! so let's think about checking validation before making variables and running code that MIGHT not be needed

Suggested change
movie = {}
movie['title'] = movie_title
movie['genre'] = genre
movie['rating'] = rating
for values in movie.values():
if values == None:
return None
return movie
if movie_title and genre and rating: # does these values "exist"/are they truthy?
movie = {"title": movie_title, "genre": genre, "rating": rating}
return movie
else:
return None

return movie


def add_to_watched(user_data, movie):

Choose a reason for hiding this comment

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

👍

return user_data


def add_to_watchlist(user_data, movie):

Choose a reason for hiding this comment

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

👍

return user_data


def watch_movie(user_data, title):

Choose a reason for hiding this comment

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

👍

return (unique_watched)


def get_friends_unique_watched(user_data):

Choose a reason for hiding this comment

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

👍

# Wave Four


def get_available_recs(user_data):

Choose a reason for hiding this comment

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

👍



def get_available_recs(user_data):
friends_unique_movies = get_friends_unique_watched(user_data)

Choose a reason for hiding this comment

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

great job reusing a function you've already defined


# Wave Five (version3)

def get_new_rec_by_genre(user_data):

Choose a reason for hiding this comment

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

👍


return recommended_movies

def get_rec_from_favorites(user_data):

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.

3 participants