Commit bf0f19dc by BellCodeEditor

save project

parent c45f18a4
Showing with 16 additions and 15 deletions
i=["石头","剪刀","布"]
z=input("你要出啥?")
import random
print("玩家出拳:"+z)
x=random.choice(i)
print("电脑出拳:"+x)
if z==x:
print("平局")
elif z=="剪刀" and x=="布":
print("玩家胜")
elif z=="石头" and x=="剪刀":
print("玩家胜")
elif z=="布" and x=="石头":
print("玩家胜")
else:
print("电脑胜")
while True:
z=input("你要出啥?")
import random
print("玩家出拳:"+z)
x=random.choice(i)
print("电脑出拳:"+x)
if z==x:
print("平局")
elif z=="剪刀" and x=="布":
print("玩家胜")
elif z=="石头" and x=="剪刀":
print("玩家胜")
elif z=="布" and x=="石头":
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