Skip to content

Instantly share code, notes, and snippets.

@sagnew
Created June 24, 2015 18:40
Show Gist options
  • Save sagnew/2bc38c6bbf27ca514526 to your computer and use it in GitHub Desktop.
Save sagnew/2bc38c6bbf27ca514526 to your computer and use it in GitHub Desktop.
Quick python help
candy = 'snickers'
right = True
while right:
answer = (raw_input('whats your favorite candy? '))
if answer == candy:
print 'yes'
right = False
elif answer == 'chocolate' or answer == 'food':
print 'close. try again'
else:
print 'wrong'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment