Python使用海龟写黄耀洁
import turtle
设置画笔
pen = turtle.Pen() pen.pensize(5) pen.speed(1)
写黄
pen.color("yellow") pen.begin_fill() pen.circle(100) pen.end_fill()
移动位置,准备写洁
pen.penup() pen.goto(50, 50) pen.pendown()
写洁
pen.color("blue") pen.begin_fill() pen.circle(50) pen.end_fill()
pen.penup() pen.goto(100, 0) pen.pendown()
pen.begin_fill() pen.circle(50) pen.end_fill()
turtle.done()
原文地址: http://www.cveoy.top/t/topic/eFQf 著作权归作者所有。请勿转载和采集!