Commit d0bdef36 by BellCodeEditor

save project

parent ba427ee8
Showing with 16 additions and 15 deletions
import random 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"]
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!")
\ 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