Commit 2bdcb911 by BellCodeEditor

save project

parent 38b1d3a3
Showing with 19 additions and 5 deletions
import random
player=input("请玩家出拳(石头/剪刀/布):")
print("玩家出拳:"+player)
t=["石头","剪刀","布"]
x=random.choice(t)
print("计算机出拳",x)
if player==x:
print("平局")
elif (player=="石头" and x=="剪刀")or(player=="剪刀" and x=="布")or(player=="布" and x=="石头"):
print("赢")
else:
print("输")
import random
player=input("请玩家出拳(石头/剪刀/布):") player=input("请玩家出拳(石头/剪刀/布):")
print=("玩家出拳:"+piayer) print=("玩家出拳:"+player)
impot random t=["石头","剪刀","布"]
t=["石头","剪刀",布"] x=random.choice(t)
computer=random.randint(0,2) print("计算机出拳",x)
print=("计算机出拳"+t[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