這篇文章給大家分享的是有關(guān)python如何利用turtle庫繪制笑臉和哭臉的內(nèi)容。小編覺得挺實用的,因此分享給大家做個參考,一起跟隨小編過來看看吧。
創(chuàng)新互聯(lián)建站專業(yè)為企業(yè)提供甘谷網(wǎng)站建設、甘谷做網(wǎng)站、甘谷網(wǎng)站設計、甘谷網(wǎng)站制作等企業(yè)網(wǎng)站建設、網(wǎng)頁設計與制作、甘谷企業(yè)網(wǎng)站模板建站服務,十載甘谷做網(wǎng)站經(jīng)驗,不只是建網(wǎng)站,更提供有價值的思路和整體網(wǎng)絡服務。代碼:
import turtle turtle.pensize(5) turtle.pencolor("yellow") turtle.fillcolor("red") turtle.penup() turtle.goto(0,-200) turtle.pendown() turtle.circle(200) turtle.penup() turtle.goto(-100,50) turtle.pendown() turtle.begin_fill() turtle.circle(17.5) turtle.end_fill() turtle.penup() turtle.goto(100,50) turtle.pendown() turtle.begin_fill() turtle.circle(17.5) turtle.end_fill() turtle.penup() turtle.goto(0,50) turtle.pendown() turtle.circle(-70,steps=3) turtle.penup() turtle.goto(-100,-70) turtle.pendown() turtle.right(90) turtle.circle(100,180) turtle.mainloop()#結(jié)果如下
import turtle turtle.pensize(5) turtle.pencolor("green") turtle.fillcolor("red") turtle.penup() turtle.goto(0,-200) turtle.pendown() turtle.circle(200) turtle.penup() turtle.goto(-100,50) turtle.pendown() turtle.begin_fill() turtle.circle(17.5) turtle.end_fill() turtle.penup() turtle.goto(100,50) turtle.pendown() turtle.begin_fill() turtle.circle(17.5) turtle.end_fill() turtle.penup() turtle.goto(0,50) turtle.pendown() turtle.circle(-70,steps=3) turtle.penup() turtle.goto(-50,-120) turtle.pendown() turtle.left(90) turtle.circle(-50,180) turtle.mainloop()#結(jié)果如下
import turtle turtle.pensize(5) turtle.pencolor("green") turtle.fillcolor("red") turtle.penup() turtle.goto(0,-200) turtle.pendown() turtle.circle(200) turtle.penup() turtle.goto(-100,50) turtle.pendown() turtle.begin_fill() turtle.circle(17.5) turtle.end_fill() turtle.penup() turtle.goto(100,50) turtle.pendown() turtle.begin_fill() turtle.circle(17.5) turtle.end_fill() turtle.penup() turtle.goto(0,50) turtle.pendown() turtle.circle(-70,steps=3) turtle.penup() turtle.goto(-100,-120) turtle.pendown() turtle.left(90) turtle.circle(-25,180) turtle.left(180) turtle.circle(-25,180) turtle.left(180) turtle.circle(-25,180) turtle.left(180) turtle.circle(-25,180) turtle.mainloop()#結(jié)果如下
python的五大特點:1.簡單易學,開發(fā)程序時,專注的是解決問題,而不是搞明白語言本身。2.面向?qū)ο?,與其他主要的語言如C++和Java相比, Python以一種非常強大又簡單的方式實現(xiàn)面向?qū)ο缶幊獭?.可移植性,Python程序無需修改就可以在各種平臺上運行。4.解釋性,Python語言寫的程序不需要編譯成二進制代碼,可以直接從源代碼運行程序。5.開源,Python是 FLOSS(自由/開放源碼軟件)之一。
感謝各位的閱讀!關(guān)于“python如何利用turtle庫繪制笑臉和哭臉”這篇文章就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,讓大家可以學到更多知識,如果覺得文章不錯,可以把它分享出去讓更多的人看到吧!
另外有需要云服務器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務器、裸金屬服務器、高防服務器、香港服務器、美國服務器、虛擬主機、免備案服務器”等云主機租用服務以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應用場景需求。
網(wǎng)站欄目:python如何利用turtle庫繪制笑臉和哭臉-創(chuàng)新互聯(lián)
新聞來源:http://muchs.cn/article24/dshoce.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供微信公眾號、企業(yè)網(wǎng)站制作、商城網(wǎng)站、網(wǎng)站導航、Google、品牌網(wǎng)站制作
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容