Commit ab6543c6 by BellCodeEditor

auto save

parent 4cac003e
Showing with 54 additions and 3 deletions
neme=input("输入名字")
print(neme+"你好啊")
\ No newline at end of file
import random
player=input("请出拳:石头/剪刀/布")
computerlist=["石头","剪刀","布"]
computer=random.choice(computerlist)
#
if player in computerlist:
if player==computer:
print("这局平局,再来一局")
elif (player=="石头" and computer=="剪刀") or (player=="剪刀" and computer=="布") or (player=="布" and computer=="石头"):
print("玩家获胜")
else:
print("输了")
else:
print("输入错误重新输入")
print("玩家出拳:"+player)
print("电脑出拳:"+computer)
import turtle #导入画笔
pen=turtle.pen()#创建画笔
pen.penup()#抬笔
pen.goto(-100,100)#移动到坐标
pen.pendown()#落笔
for i in range(4):#循环4次
pen.forward(200)#移动200步
pen.right(90)#右转90度
pen.penup()#抬笔
pen.goto(0,-50)#移动到坐标
pen.pendown()#落笔
pen.fillcolo("blue")#设置填充颜色
pen.degin_fill()#开始填充
pen.circle(50)#半径50的圆
pen.end_fill()#结束填充
turtle.done()#保存画布
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