Commit 2142d442 by BellCodeEditor

save project

parent e54e3ea4
Showing with 8 additions and 2 deletions
...@@ -2,8 +2,14 @@ a=input("出拳") ...@@ -2,8 +2,14 @@ a=input("出拳")
print("玩家已出拳"+a) print("玩家已出拳"+a)
import random import random
list=["剪刀","石头","布"] list=["剪刀","石头","布"]
letter=random.choice(list) l=random.choice(list)
print(letter) print("电脑出拳"+l)
if a==l:
print("平局")
elif (a=="剪刀" and l=="布") or (a=="石头" and l=="剪刀") or (a=="布" and l=="石头"):
print("win")
else :
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