Commit a722530d by BellCodeEditor

auto save

parent 66c43f5d
Showing with 33 additions and 0 deletions
This source diff could not be displayed because it is too large. You can view the blob instead.
import random
player=input("请出拳(石头/剪刀/布)")
print("玩家出拳:"+player)
kj=random.choice(["石头","剪刀","布"])
print(kj)
com=["石头","剪刀","布"]
coms=random.choice(com)
print("计算机出拳":"+coms)
if coms==play:
print("平局")
elif play=="石头"and coms=="剪刀":
print("赢了")
elif play=="剪刀"and coms=="":
print("赢了")
elif play==""and coms=="石头":
print("赢了")
else:
print("输了")
\ No newline at end of file
import random
player=input("请出拳(石头/剪刀/布)")
print("玩家出拳:"+player)
com=["石头","剪刀","布"]
coms=random.choice(com)
print("计算机出拳":"+coms)
if coms==play:
print("平局")
elif play=="石头"and coms=="剪刀":
print("赢了")
elif play=="剪刀"and coms=="":
print("赢了")
elif play==""and coms=="石头":
print("赢了")
else:
print("输了")
\ 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