送给最好的ta

最近的python课我们学习了turtle画图

课上我随手写了小心心的画图程序

 在这里分享一下

from turtle import *
from math import *

setup(650,550,200,200)
penup()
pendown()
begin_fill()
seth(90)
pensize(25)
pencolor("red")
circle(60,225)
fd(sqrt(120*100*2))
seth(45)
fd(sqrt(120*100*2))
seth(45)
circle(60,225)
color("red")
end_fill()
penup()
done()

 效果如图

Published by

风君子

独自遨游何稽首 揭天掀地慰生平

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注