编程语言
首页 > 编程语言> > python 画爱心

python 画爱心

作者:互联网

 

import turtle as t
t.shape ("turtle")
#爱心
t.pensize(6)
t.speed(1)
t.pencolor("red")
t.fillcolor("pink")
t.begin_fill()
t.left(90)
t.circle(50,180)
t.forward(30)
t.left(30)
t.forward(40)
t.goto(0,-120)
t.penup()
t.goto(0,0)
t.pendown()
t.seth(90)
t.circle(-50,180)
t.forward(30)
t.right(30)
t.forward(40)
t.goto(0,-120)
t.end_fill()
 

标签:turtle,goto,python,30,40,爱心,forward,fill
来源: https://blog.csdn.net/SEVENlicherry/article/details/120847250