Commit 619a9bc1 by BellCodeEditor

save project

parent a666a636
Showing with 16 additions and 14 deletions
......@@ -2,16 +2,18 @@ import random
player=input("paper,scissors......(paper/scissors/rock)")
print("player:"+player)
list=["paper","scissors","rock"]
if
com=random.choice(list)
print("computer:"+com)
if player==com:
print("We are the same.")
elif player =="rock" and com == "scissors":
print("You win!")
elif player =="scissors" and com == "paper":
print("You win!")
elif player =="paper" and com == "rock":
print("You win!")
else:
print("You lose!")
\ No newline at end of file
if player in list:
com=random.choice(list)
print("computer:"+com)
if player==com:
print("We are the same.")
elif player =="rock" and com == "scissors":
print("You win!")
elif player =="scissors" and com == "paper":
print("You win!")
elif player =="paper" and com == "rock":
print("You win!")
else:
print("You lose!")
else:
print("It's wrong.")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment