摘要: #画国际象棋盘,小格边长为width import turtle turtle.speed(0) width = eval(input()) #画黑格 def drawSquare(width): turtle.pendown() turtle.begin_fill() turtle.fillcol 阅读全文
posted @ 2020-10-12 19:31 陈欢欢 阅读(79) 评论(0) 推荐(0)
摘要: import turtle turtle.speed(0) turtle.fillcolor('black') turtle.begin_fill() turtle.circle(120,180) turtle.left(180) turtle.circle(-60,180) turtle.circ 阅读全文
posted @ 2020-10-12 19:29 陈欢欢 阅读(105) 评论(0) 推荐(0)
摘要: coordA=(-110,0,110,-55,55) coordB=(-25,-25,-25,-75,-75) cl=("red","blue","green","yellow","black") #高级应用,画固定大小的奥运五环,半径45 import turtle turtle.pensize( 阅读全文
posted @ 2020-10-12 19:26 陈欢欢 阅读(98) 评论(0) 推荐(0)
摘要: import turtle for i in range(3): turtle.forward(100) turtle.right(120) turtle.left(60) turtle.forward(100) for i in range(3): turtle.right(120) turtle 阅读全文
posted @ 2020-10-12 19:23 陈欢欢 阅读(100) 评论(0) 推荐(0)
摘要: import turtle number = int(input()) #把用户输入转成整数 turtle.screensize(600,500,'white') turtle.pensize(3) #设置画笔宽度为3 turtle.pencolor('blue') #设置画笔颜色为黑色 turtl 阅读全文
posted @ 2020-10-12 19:19 陈欢欢 阅读(60) 评论(0) 推荐(0)
摘要: #利用turtle库画一组同心圆。用户输入最小圆的半径、画笔宽度和颜色 import turtle radius = eval(input()) #接收用户输入的半径并转换成数值 number = eval(input()) #接收用户输入的画笔宽度并转换成数值 cl = input() #接收用户 阅读全文
posted @ 2020-10-12 19:12 陈欢欢 阅读(199) 评论(0) 推荐(0)