python中画奥运五环的方法-创新互联
创新互联www.cdcxhl.cn八线动态BGP香港云服务器提供商,新人活动买多久送多久,划算不套路!

这篇文章给大家分享的是有关python中画奥运五环的方法的内容。小编觉得挺实用的,因此分享给大家做个参考。一起跟随小编过来看看吧。
绘制奥运五环主要涉及到Python中的turtle绘图库运用:

程序源代码为:
import turtle
turtle.width(10)
turtle.color('black')
turtle.circle(50)
turtle.penup()
turtle.goto(120,0)
turtle.pendown()
turtle.color('red')
turtle.circle(50)
turtle.penup()
turtle.goto(240,0)
turtle.pendown()
turtle.color('blue')
turtle.circle(50)
turtle.penup()
turtle.goto(60,-50)
turtle.pendown()
turtle.color('yellow')
turtle.circle(50)
turtle.penup()
turtle.goto(180,-50)
turtle.pendown()
turtle.color('pink')
turtle.circle(50)
#Python绘制奥运五环运行后,结果为:

感谢各位的阅读!关于python中画奥运五环的方法就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到吧!
网站标题:python中画奥运五环的方法-创新互联
链接地址:http://www.jxjierui.cn/article/dsisce.html


咨询
建站咨询
