python画圆填色_python turtle我想用五种颜色画五个圆,并且用画圆周的颜色填充,老是出问题,怎么回事,怎么修改?:python教程同心圆...

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)

版权声明:本站所有文章皆为原创,欢迎转载或转发,请保留网站地址和作者信息。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值