文章詳情頁
python 動態(tài)繪制愛心的示例
瀏覽:2日期:2022-07-09 18:05:41
代碼
import turtleturtle.bgcolor('black')turtle.pensize(2)sizeh = 1.2def curve(): for ii in range(200): turtle.right(1) turtle.forward(1 * sizeh)turtle.speed(0)turtle.color('red', 'red')turtle.begin_fill()turtle.left(140)turtle.forward(111.65 * sizeh)curve()turtle.left(120)curve()turtle.forward(111.65 * sizeh)turtle.end_fill()turtle.hideturtle()
效果圖
以上就是python 動態(tài)繪制愛心的示例的詳細(xì)內(nèi)容,更多關(guān)于python 繪制愛心的資料請關(guān)注好吧啦網(wǎng)其它相關(guān)文章!
相關(guān)文章:
排行榜
