Commit 6d38b379 by BellCodeEditor

save project

parent 8c218b3e
Showing with 14 additions and 2 deletions
# 玩家出拳 # 玩家出拳
import random import random
c=input("你出啥?") c=input("你出啥?")
print("玩家出拳"+c) print("玩家出拳:"+c)
list=["石头","剪刀","布"] list=["石头","剪刀","布"]
j=random.choice(list) j=random.choice(list)
print("计算计出拳"+j) print("计算计出拳:"+j)
if c==j:
print("平局")
elif c=="石头" and j=="剪刀":
print("win")
elif c=="剪刀" and j=="布":
print("win")
elif c=="布" and j=="石头":
print("win")
else:
print("lose")
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