Created
December 12, 2019 12:21
-
-
Save jasongorman/afc64e3625b3597b6cb0ebca09329e5b to your computer and use it in GitHub Desktop.
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
class Pricer(object): | |
def __init__(self, movieInfo): | |
self.movieInfo = movieInfo | |
def price(self, imdbID): | |
rating, title = self.movieInfo.fetch_movie_info(imdbID) | |
price = 3.95 | |
if rating > 7: | |
price += 2.0 | |
if rating < 4: | |
price -= 1.0 | |
return Movie(imdbID, title, rating, price) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment