Commit 79bba37e by BellCodeEditor

save project

parent 37480656
Showing with 26 additions and 0 deletions
#玩家出拳
player = input("请选择石头/剪刀/布")
print("玩家出拳:"+player)
#系统出拳
import random
list=["剪刀","石头","布"]
computer = random.choice(list)
print("电脑出拳:"+computer)
if player == computer :
print("平局")
if player == ("石头") :
if computer == ("剪刀"):
print("玩家赢了")
elif computer == ("布"):
print("玩家输了")
if player == ("布") :
if computer == ("石头"):
print("玩家赢了")
elif computer == ("剪刀"):
print("玩家输了")
if player == ("剪刀") :
if computer == ("布"):
print("玩家赢了")
elif computer == ("石头"):
print("玩家输了")
#print("电脑出拳:"+computer)
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