Commit 69ae3831 by BellCodeEditor

auto save

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