turtle画五环
Posted huanghanyu
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了turtle画五环相关的知识,希望对你有一定的参考价值。
代码实现:
import turtle turtle.goto(0,0) turtle.color("blue") turtle.pensize(5) turtle.circle(50) turtle.penup() turtle.goto(100,0) turtle.color("green") turtle.pendown() turtle.circle(50) turtle.penup() turtle.goto(200,0) turtle.color("red") turtle.pendown() turtle.circle(50) turtle.penup() turtle.goto(50,-50) turtle.color("orange") turtle.pendown() turtle.circle(50) turtle.penup() turtle.goto(150,-50) turtle.color("yellow") turtle.pendown() turtle.circle(50) turtle.done()
执行结果:
以上是关于turtle画五环的主要内容,如果未能解决你的问题,请参考以下文章