Commit 52c3c505 by BellCodeEditor

save project

parent 02c960d0
Showing with 6 additions and 6 deletions
...@@ -2,14 +2,14 @@ play = input("在(石头/剪刀/布)中选择") ...@@ -2,14 +2,14 @@ play = input("在(石头/剪刀/布)中选择")
print("玩家出拳:"+play) print("玩家出拳:"+play)
import random import random
playa = ["石头","剪刀","布"] list = ["石头","剪刀","布"]
a = random.choice(playa) a = random.choice(list)
print("电脑出拳:"+a) print("电脑出拳:"+a)
if play == a: if play == a:
print("平局") print("平局")
if play=="石头" and a=="剪刀" or play=="剪刀" and a=="布" or play=="布" and a=="石头": if play=="石头" and a=="剪刀" or play=="剪刀" and a=="布" or play=="布" and a=="石头":
print("恭喜你赢了") print("恭喜你赢了")
else: else:
print("很遗憾,你输了") 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