文章詳情頁
python 動態(tài)繪制愛心的示例
瀏覽:14日期: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)文章:
1. Java如何基于反射機(jī)制獲取不同的類2. php模擬實(shí)現(xiàn)斗地主發(fā)牌3. asp判斷某個文件是否存在的函數(shù)4. IntelliJ IDEA安裝插件的方法步驟5. Android table布局開發(fā)實(shí)現(xiàn)簡單計(jì)算器6. 理解PHP5中static和const關(guān)鍵字7. ASP.NET泛型三之使用協(xié)變和逆變實(shí)現(xiàn)類型轉(zhuǎn)換8. .Net Core使用Coravel實(shí)現(xiàn)任務(wù)調(diào)度的完整步驟9. .NET Core Web APi類庫內(nèi)嵌運(yùn)行的方法10. Vuex localStorage的具體使用
排行榜

網(wǎng)公網(wǎng)安備