python画图程序飞机_Python海龟画图工具绘制叮当猫程序
t.fillcolor("blue")#填充顏色
t.begin_fill()#開(kāi)始填充
t.circle(160)#畫(huà)圓
t.end_fill()#結(jié)束填充
t.up() #鼠標(biāo)抬起
t.goto(-20,240)#重新調(diào)整畫(huà)筆的位置
t.down()#鼠標(biāo)落下
#畫(huà)叮當(dāng)貓。
import turtle;
t=turtle.Pen()
#畫(huà)頭
t.fillcolor("blue")
t.begin_fill()
t.circle(160)
t.end_fill()
#畫(huà)臉
t.fillcolor("white")
t.begin_fill()
t.circle(130)
t.end_fill()
#畫(huà)眼睛
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()
#畫(huà)里面的眼珠黑色部分
t.fillcolor("black")
t.begin_fill()
t.circle(10)
t.up()
t.goto(-20,240)
t.down()
t.circle(10)
t.end_fill()
#畫(huà)鼻子
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)
#畫(huà)嘴巴
t.up()
t.goto(-50,100)
t.down()
t.circle(50,180)
#畫(huà)胡子
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)
#畫(huà)左邊胡子
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()
原文地址:https://blog.51cto.com/1388969/2421974
總結(jié)
以上是生活随笔為你收集整理的python画图程序飞机_Python海龟画图工具绘制叮当猫程序的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 求一个好听的网名qq名。
- 下一篇: python异常值删除_python删除