diff --git a/diy1.py b/diy1.py deleted file mode 100644 index 45c9a2f..0000000 --- a/diy1.py +++ /dev/null @@ -1 +0,0 @@ -# 我们都爱夸夸夸 \ No newline at end of file diff --git "a/\346\265\213\350\257\225.py" "b/\346\265\213\350\257\225.py" new file mode 100644 index 0000000..e69de29 --- /dev/null +++ "b/\346\265\213\350\257\225.py" diff --git "a/\347\237\263\345\244\264\345\211\252\345\210\200\345\270\203.py" "b/\347\237\263\345\244\264\345\211\252\345\210\200\345\270\203.py" new file mode 100644 index 0000000..31152ea --- /dev/null +++ "b/\347\237\263\345\244\264\345\211\252\345\210\200\345\270\203.py" @@ -0,0 +1,16 @@ +import random +a=input("输入玩家请出拳:") +b=["石头","剪刀","布"] +if a in b: + print("玩家出拳:"+a) + c=random.choice(b) + print("计算机出拳:"+c) + if a==c: + print("平局") + elif (a=="石头"and c=="剪刀")or(a=="剪刀"and c=="布")or(a=="布"and c=="石头"): + print("玩家赢!") + else: + print("计算机赢") +else: + print("输入错误!") +