送给最好的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()

 效果如图

原文地址:https://www.cnblogs.com/r3t7rn/p/11427077.html