Commit 7116f488 by BellCodeEditor

save project

parent 289a9e36
Showing with 12 additions and 2 deletions
# 计算机出拳 # 计算机出拳
import random import random
c = input("请出拳:石头、布、剪刀:")
print("玩家出拳:"+c)
a = ["石头","剪刀","布"] a = ["石头","剪刀","布"]
b = random.choice(a) b = random.choice(a)
print("智障出拳:"+b) print("智障出拳:"+b)
\ No newline at end of file if c == b:
print("平局")
elif (c == "石头" and b == "剪刀") or (c == "剪刀" and b == "布") or (c == "布" and b == "石头"):
print("赢了")
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