Commit 628be975 by BellCodeEditor

save project

parent 8ad3c495
Showing with 11 additions and 6 deletions
import random
piayer=input("玩傢請出拳:石/剪/布")
print("玩傢出拳:"+piayer)# 玩家出拳
list=["石","剪","布"]
compuret=random.choice(list)
print("電腦出拳"+compuret)
\ No newline at end of file
player=input("玩傢請出拳:石/剪/布")
print("玩傢"+player)
list = ["石","剪","布"]
computer = random.choice(list)
print("電腦出拳:"+computer)
if player == computer:
print("平侷")
elif (player == "石" and computer == "剪")or(player == "剪" and computer == "布")or(player == "布" and computer == "石"):
print("你贏了")
else:
print("你輸了")
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