-
-
Save vikychoi/4356b39555977eaaee368856c02b364f to your computer and use it in GitHub Desktop.
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
# i will do player vs comp | |
import random | |
will = 1 | |
while will == 1: | |
player = input("rock, paper, scissors") | |
comp = random.randint(1,3) | |
if comp ==1: | |
comp = "rock" | |
elif comp == 2: | |
comp = "paper" | |
else: | |
comp = "scissors" | |
print("computer used ",comp) | |
if player == comp: | |
print("draw!") | |
elif player == "rock" and comp == "scissors" or player == "scissors" and comp =="paper" or player == "paper" and comp == "rock": | |
print("player wins!") | |
else: | |
print(" computer wins!") | |
will = int(input("do you want to leave? dont input 1 to leave")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment