Commit 619a9bc1 by BellCodeEditor

save project

parent a666a636
Showing with 11 additions and 8 deletions
...@@ -2,16 +2,18 @@ import random ...@@ -2,16 +2,18 @@ import random
player=input("paper,scissors......(paper/scissors/rock)") player=input("paper,scissors......(paper/scissors/rock)")
print("player:"+player) print("player:"+player)
list=["paper","scissors","rock"] list=["paper","scissors","rock"]
if if player in list:
com=random.choice(list) com=random.choice(list)
print("computer:"+com) print("computer:"+com)
if player==com: if player==com:
print("We are the same.") print("We are the same.")
elif player =="rock" and com == "scissors": elif player =="rock" and com == "scissors":
print("You win!") print("You win!")
elif player =="scissors" and com == "paper": elif player =="scissors" and com == "paper":
print("You win!") print("You win!")
elif player =="paper" and com == "rock": elif player =="paper" and com == "rock":
print("You win!") print("You win!")
else: else:
print("You lose!") 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