Commit cfa09c5a by BellCodeEditor

auto save

parent df310f86
Showing with 0 additions and 33 deletions
import turtle
import random
rcq = input("你想出什么拳:")
jcq = random.randint(0,2)
if jcq == 0:
print("机器人出的是:石")
if jcq == 1:
print("机器人出的是:布")
if jcq == 2:
print("机器人出的是:剪刀")
if rcq == "0": #玩家出石头
if jcq == 0:
print("平手!")
elif jcq == 1:
print("机器人赢!")
else:
print("玩家赢!")
elif rcq == "1": #玩家出布
if jcq == 0:
print("玩家赢!")
elif jcq == 1:
print("平手!")
else:
print("机器人赢!")
else: #玩家出剪刀
if jcq == 0:
print("机器人赢!")
elif jcq == 1:
print("玩家赢!")
else:
print("平手!")
input()
\ 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