Skip to content

Instantly share code, notes, and snippets.

@SametSahin10
Last active December 2, 2018 22:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SametSahin10/66607e37557553512c63fdbdc73e3b78 to your computer and use it in GitHub Desktop.
Save SametSahin10/66607e37557553512c63fdbdc73e3b78 to your computer and use it in GitHub Desktop.
My Solution
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