Commit e4995de4 by BellCodeEditor

save project

parent d93a026e
Showing with 13 additions and 4 deletions
# 玩家出拳# 玩家出拳# 玩家出拳# 玩家出拳 # 玩家出拳# 玩家出拳# 玩家出拳# 玩家出拳
player = input("请玩家出拳(石头 / 剪刀 / 布)") p = input("请玩家出拳(石头 / 剪刀 / 布)")
print(player) print(p)
import random import random
ui = ["石头", " 剪刀" , "布"] ui = ["石头", " 剪刀" , "布"]
c = random.choice(ui) c = random.choice(ui)
print(c) print(c)
if if p == c:
\ No newline at end of file print("平局")
elif p == "布" and c == "石头":
print("玩家赢")
elif p == "石头" and c == "剪刀":
print("玩家赢")
elif p == "剪刀" and c == "布":
print("玩家赢")
else:
print("电脑赢")
\ No newline at end of file
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