Skip to content

Instantly share code, notes, and snippets.

@markormesher
Created October 9, 2014 19:01
Show Gist options
  • Save markormesher/5820d86564762ce20888 to your computer and use it in GitHub Desktop.
Save markormesher/5820d86564762ce20888 to your computer and use it in GitHub Desktop.
Rock/paper/scissors Python demo
done = False
while (done != True):
their_move = raw_input("What is your move? [r|p|s|q] ")
if (their_move == "r"):
print "You choose rock, I choose paper"
elif (their_move == "p"):
print "You choose paper, I choose scissors"
elif (their_move == "s"):
print "You choose scissors, I choose rock"
elif (their_move == "q"):
print "Bye-bye!"
done = True
else:
print("You didn't pick anything valid!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment