Last active
December 2, 2018 22:17
-
-
Save SametSahin10/66607e37557553512c63fdbdc73e3b78 to your computer and use it in GitHub Desktop.
My 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 = 400 # use this as input for your submission | |
# establish the default prize value to None | |
prize = None | |
# use the points value to assign prizes to the correct prize names | |
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 prize | |
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