欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

Python海龜畫圖工具繪制叮當貓程序

使用海龜畫圖工具,畫一個叮當貓。
先學習幾個基本函數(shù):
import turtle;#引入海龜工具模塊
t=turtle.Pen()#創(chuàng)建海龜畫筆

創(chuàng)新互聯(lián)建站主打移動網(wǎng)站、成都網(wǎng)站設計、成都網(wǎng)站制作、網(wǎng)站改版、網(wǎng)絡推廣、網(wǎng)站維護、域名注冊、等互聯(lián)網(wǎng)信息服務,為各行業(yè)提供服務。在技術實力的保障下,我們?yōu)榭蛻舫兄Z穩(wěn)定,放心的服務,根據(jù)網(wǎng)站的內(nèi)容與功能再決定采用什么樣的設計。最后,要實現(xiàn)符合網(wǎng)站需求的內(nèi)容、功能與設計,我們還會規(guī)劃穩(wěn)定安全的技術方案做保障。

t.fillcolor("blue")#填充顏色
t.begin_fill()#開始填充
t.circle(160)#畫圓
t.end_fill()#結束填充

t.up() #鼠標抬起
t.goto(-20,240)#重新調(diào)整畫筆的位置
t.down()#鼠標落下

Python海龜畫圖工具繪制叮當貓程序

#畫叮當貓。
import turtle;
t=turtle.Pen()
#畫頭
t.fillcolor("blue")
t.begin_fill()
t.circle(160)
t.end_fill()
#畫臉
t.fillcolor("white")
t.begin_fill()
t.circle(130)
t.end_fill()
#畫眼睛
t.up()
t.goto(-20,240)#第一只眼睛(左)
t.down()
t.fillcolor("#fff")
t.begin_fill()
t.circle(20)
t.up()
t.goto(20,240)#第二只眼睛
t.down()
t.circle(20)
t.end_fill()

#畫里面的眼珠黑色部分
t.fillcolor("black")
t.begin_fill()
t.circle(10)
t.up()
t.goto(-20,240)
t.down()
t.circle(10)
t.end_fill()

#畫鼻子
t.up()
t.goto(0,200)
t.down()
t.fillcolor("red")
t.begin_fill()
t.circle(20)
t.end_fill()
t.right(90)
t.forward(70)
#畫嘴巴
t.up()
t.goto(-50,100)
t.down()
t.circle(50,180)

#畫胡子
t.up()
t.goto(20,150)
t.down()
t.right(100)
t.forward(80)
t.up()
t.goto(20,180)
t.down()
t.left(30)
t.forward(80)

t.up()
t.goto(20,160)
t.down()
t.left(-10)
t.forward(80)

#畫左邊胡子
t.up()
t.goto(-20,160)
t.down()
t.right(180)
t.forward(80)

t.up()
t.goto(-20,180)
t.down()
t.right(20)
t.forward(80)

t.up()
t.goto(-20,150)
t.down()
t.right(-40)
t.forward(80)

t.up()
t.goto(0,-50)
t.write("Python青少年編程 .13684090437何老師 ", align="center",font=("微軟雅黑", 16, "bold"))
t.write("https://edu.51cto.com/course/17675.html ", align="center",font=("微軟雅黑", 16, "bold"))

turtle.done()

分享名稱:Python海龜畫圖工具繪制叮當貓程序
文章URL:http://www.chinadenli.net/article28/jdgpjp.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供響應式網(wǎng)站品牌網(wǎng)站設計網(wǎng)站建設面包屑導航云服務器軟件開發(fā)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)

成都網(wǎng)站建設