Created
October 9, 2014 19:01
-
-
Save markormesher/5820d86564762ce20888 to your computer and use it in GitHub Desktop.
Rock/paper/scissors Python demo
This file contains 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
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