Commit 6316ced9 by BellCodeEditor

auto save

parent de7c3893
Showing with 3282 additions and 0 deletions
# name=input("请问你叫什么名字")
# print(name+",你好啊!")
# import turtle
# pen=turtle.Pen()
# pen.shape("turtle")
# pen.speed(10)
# pen.pencolor("red")
# pen.fillcolor("red")
# pen.begin_fill()
# for i in range(5):
# pen.forward(200)
# pen.right(144)
# pen.end_fill()
# pen.hideturtle()
# turtle. done()
import random
player=input("请输出:拳头/剪刀/布:")
print("玩家出拳:"+player)
list=['拳头','剪刀','布']
computer=random.choice(list)
print("计算机出拳:"+computer)
if player in list:
# if player==computer:
# print("平局!")
# if(player=='拳头' and computer == '剪刀')or (player=='剪刀 ' and computer=='布') or (player=='布' and computer== '拳头'):
# print("玩家赢了!")
# else:
# print('计算机赢了!')
if player==computer:
print("平局!")
elif(player=='拳头' and computer == '剪刀')or (player=='剪刀 ' and computer=='布') or (player=='布' and computer== '拳头'):
print("玩家赢了!")
else:
print('计算机赢了!')
else:
12,
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