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/06f7ecf32c89339849af58bf8e1608e5 to your computer and use it in GitHub Desktop.
Save SametSahin10/06f7ecf32c89339849af58bf8e1608e5 to your computer and use it in GitHub Desktop.
Original Solution
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