Created
September 18, 2020 16:14
-
-
Save timeowilliams/cd0777d3041eae51c5071ec208054455 to your computer and use it in GitHub Desktop.
Practice Python 8: Rock paper scissors
This file contains hidden or 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
play = input('Would you like to play rock paper scissors?') | |
while play == "yes": | |
user1 = input('Please enter your position(rock, paper,or scissors): ') | |
user2 = input('Please enter your position(rock, paper,or scissors): ') | |
#while user1 and user2 != "rock" or "paper" or "scissors": | |
#user1 = input('Please enter your position(rock, paper,or scissors): ') | |
#user2 = input('Please enter your position(rock, paper,or scissors): ') | |
if user1 == "rock" and user2 =="scissors": | |
print("rock wins") | |
play = "no" | |
elif user1 == "scissors" and user2 == "rock": | |
print("rock wins") | |
play = "no" | |
elif user1 == "rock" and user2 == "paper": | |
print("paper wins") | |
play = "no" | |
elif user1 == "paper" and user2 == "rock": | |
print("paper wins") | |
play = "no" | |
elif user1 == "paper" and user2 == "scissors": | |
print("scissors wins") | |
play = "no" | |
elif user1 == "scissors" and user2 == "paper": | |
print("scissors wins") | |
play = "no" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment