Commit ee3aa6aa by BellCodeEditor

save project

parent 5dd1eea0
Showing with 5 additions and 5 deletions
...@@ -2,11 +2,11 @@ import random ...@@ -2,11 +2,11 @@ import random
a=input("石头,剪刀,布:")# 玩家出拳 a=input("石头,剪刀,布:")# 玩家出拳
print("出"+a) print("出"+a)
b=["石头","剪刀","布"] b=["石头","剪刀","布"]
cc=random.choice(b) c=random.choice(b)
print("出"+cc) print("出"+c)
if a==cc: if a==c:
print("平局") print("平局")
elif (a=="石头" and c=="剪刀") or (a=="剪刀" and c=="布") or (a=="布" and c=="石头"):
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