Last active
December 2, 2018 22:17
-
-
Save SametSahin10/06f7ecf32c89339849af58bf8e1608e5 to your computer and use it in GitHub Desktop.
Original Solution
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
points = 174 | |
points = 174 # use this input when submitting your answer | |
# set prize to default value of None | |
prize = None | |
# use the value of points to assign prize to the correct prize name | |
if points <= 50: | |
prize = "wooden rabbit" | |
elif 151 <= points <= 180: | |
prize = "wafer-thin mint" | |
elif points >= 181: | |
prize = "penguin" | |
# use the truth value of prize to assign result to the correct message | |
if prize: | |
result = "Congratulations! You won a {}!".format(prize) | |
else: | |
result = "Oh dear, no prize this time." | |
print(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment