Commit c59e8440 by BellCodeEditor

auto save

parent 020f8b7e
Showing with 17 additions and 1 deletions
-- "a/\347\216\251\345\256\266\345\207\272\346\213\263.py" import random
import random
p=input("出什么,快快快 ")
print("玩家出拳: "+p)
o=["石头","剪刀","布"]
c=random.choice(o)
print("计算机出拳:"+c)
if p==c:
print("平局!")
elif p=="石头" and c=="剪刀" or p=="剪刀" and c=="布" or p=="布" and c=="石头":
print("恭喜,你赢!")
elif p=="剪刀" and c=="石头" or p=="布" and c=="剪刀" or p=="石头" and c=="布":
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