Created
May 28, 2020 22:48
-
-
Save JohnsonLuu/38a91e15c705e1ea01833a1c1af04c7d to your computer and use it in GitHub Desktop.
This file contains 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
""" | |
Create a function named movie_review() that has one parameter named rating. | |
If rating is less than or equal to 5, return "Avoid at all costs!". If rating is between 5 and 9, return "This one was fun.". If rating is 9 or above, return "Outstanding!" | |
""" | |
# Write your movie_review function here: | |
def movie_review(rating): | |
if (rating <= 5): | |
return "Avoid at all costs!" | |
if (rating < 9 and rating > 5): | |
return "This one was fun." | |
if (rating >= 9): | |
return "Outstanding!" | |
# Uncomment these function calls to test your movie_review function: | |
print(movie_review(9)) | |
# should print "Outstanding!" | |
print(movie_review(4)) | |
# should print "Avoid at all costs!" | |
print(movie_review(6)) | |
# should print "This one was fun." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment