Commit c10e7abb by BellCodeEditor

save project

parent ce4adc2d
Showing with 8 additions and 1 deletions
ma=input("请出拳石头/剪刀/布") ma=input("请出拳石头/剪刀/布")
print("玩家出拳:"+ma) print("玩家出拳:"+ma)
import random import random
s=("石头","剪刀","布") s=["石头","剪刀","布"]
p=random.choice(s) p=random.choice(s)
print("电脑出拳"+p) print("电脑出拳"+p)
if ma==p:
print("平局")
elif(ma=="石头" and p=="剪刀") or (ma=="剪刀" and p=="布") or (ma=="布" and p=="石头"):
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