python turtle画4个同心圆方法
from turtle import *
def test():
reset()
circle(30,-360)
up()
goto(0,-10)
down()
circle(40,-360)
up()
goto(0,-20)
down()
circle(50,-360)
up()
goto(0,-30)
down()
circle(60,-360)
if __name__ == '__main__':
test()
如何用python画一个同心圆,外环为红色?
# encoding: utf-8
# Python 3.6.0
import turtle
for i in range(1,3):
if i==2:
turtle.pencolor("red")
turtle.pensize(10)
turtle.penup()
turtle.goto(0,-60*i)
turtle.pendown()
turtle.circle(60*i)
Python编程:怎么给同心圆上色
用
插入-图片-自选图形-基本形状-同心圆
画,再双击此圆进行颜色编辑,填充颜色和线条颜色都可以变,透明度也可以调。
python turtle我想用五种颜色画五个圆,并且用画圆周的颜色填充,老是出问题,怎么回事,怎么修改?
from turtle import *
colors = ['red', 'blue', 'green', 'yellow', 'orange', 'purple']
def circle():
for i in range(36):
forward(20)
left(10)
for i in colors:
color(i)
begin_fill()
circle()
end_fill()
left(60)
版权声明:本站所有文章皆为原创,欢迎转载或转发,请保留网站地址和作者信息。