文章詳情頁
python 動(dòng)態(tài)繪制愛心的示例
瀏覽:3日期: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 動(dòng)態(tài)繪制愛心的示例的詳細(xì)內(nèi)容,更多關(guān)于python 繪制愛心的資料請關(guān)注好吧啦網(wǎng)其它相關(guān)文章!
相關(guān)文章:
1. PHP?strstr函數(shù)原型源碼分析2. 不使用XMLHttpRequest對象實(shí)現(xiàn)Ajax效果的方法小結(jié)3. ThinkPHP6使用JWT+中間件實(shí)現(xiàn)Token驗(yàn)證實(shí)例詳解4. ASP.NET MVC實(shí)現(xiàn)登錄后跳轉(zhuǎn)到原界面5. TP5使用RabbitMQ實(shí)現(xiàn)消息隊(duì)列的項(xiàng)目實(shí)踐6. log4net在Asp.net MVC4中的使用過程7. ASP.NET MVC限制同一個(gè)IP地址單位時(shí)間間隔內(nèi)的請求次數(shù)8. 怎樣打開XML文件?xml文件如何打開?9. JSP出現(xiàn)中文亂碼問題解決方法詳解10. ASP基礎(chǔ)入門第二篇(ASP基礎(chǔ)知識)
排行榜
