Commit 9a60a277 by BellCodeEditor

auto save

parent b5c6bbbe
Showing with 41 additions and 0 deletions
# 玩家出拳
a=0
s_win=0
a_win=0
n_win=0
s=input("请出剪刀,石头,布\n")#s=player
a+=1
print("现在是第"+str(a)+"局")
print("玩家出的是"+s)
import random
list=["剪刀","石头","布"]
a= random.choice(list)#a=computer
print("电脑出的是:"+a)
if s==a:
print("平局\n_________________")
elif s=="布" and a=="石头"\
or s=="剪刀" and a=="布"\
or s=="石头" and a=="剪刀":
print("你赢了\n_________________")
else:
print("你输了\n_________________")
\ No newline at end of file
# 玩家出
s=input("请出剪刀,石头,布\n")#s=player
import random
list=["剪刀","石头","布"]
a= random.choice(list)#a=computer
if s in list:
print("玩家出的是"+s)
print("电脑出的是:"+a)
if s==a:
print("平局\n_________________")
elif s=="布" and a=="石头"\
or s=="剪刀" and a=="布"\
or s=="石头" and a=="剪刀":
print("你赢了\n_________________")
else:
print("你输了\n_________________")
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