话不多说上链接,希望大家多多支持:http://v.douyin.com/RxBGKX/ 
 源代码如下:
from turtle import *
import turtle
import time
turtle.hideturtle()
turtle.color("black","blue")  #画笔颜色
turtle.pensize(5)
turtle.speed(10)        #画笔的速度范围为【1-10】
turtle.up()
turtle.goto(-150,150)
turtle.down()
turtle.begin_fill()

turtle.left(55)
turtle.forward(5)
turtle.right(15)
turtle.forward(20)
turtle.right(20)
turtle.forward(15)
turtle.right(20)
turtle.forward(20)
turtle.right(8)
turtle.forward(25)
turtle.right(7)
turtle.speed(9)            #速度
turtle.forward(25)
turtle.right(10)
turtle.forward(30)
turtle.right(5)
turtle.forward(15)
turtle.pensize(3)
turtle.forward(10)
turtle.backward(10)
turtle.pensize(5)

turtle.speed(1)            #速度
turtle.left(45)                #鱼鳍
turtle.forward(65)
turtle.right(135)
turtle.forward(51)

turtle.speed(9)            #速度
turtle.right(90)
turtle.pensize(3)
turtle.forward(10)
turtle.backward(10)
turtle.pensize(5)
turtle.right(190)
turtle.forward(40)
turtle.right(10)
turtle.forward(60)
turtle.right(10)
turtle.forward(40)
turtle.right(5)
turtle.forward(10)
turtle.left(75)
turtle.speed(6)            #速度
turtle.forward(25)
turtle.right(15)
turtle.forward(20)
turtle.right(15)
turtle.forward(10)

turtle.right(130)
turtle.forward(15)
turtle.right(10)
turtle.forward(10)
turtle.right(2)
turtle.forward(20)

turtle.speed(3)            #速度
#turtle.color("red","white")
turtle.left(75)
turtle.forward(10)
turtle.right(10)
turtle.forward(15)
turtle.right(10)
turtle.forward(15)

turtle.speed(1)            #速度
turtle.right(135)
turtle.forward(15)
turtle.right(10)
turtle.forward(20)          #尾部画完

turtle.speed(9)            #速度
turtle.left(20)
turtle.forward(20)
turtle.left(5)
turtle.forward(30)
turtle.left(5)
turtle.forward(30)
turtle.left(10)
#turtle.color("red","white")
turtle.forward(40)
turtle.left(3)
turtle.forward(25)
turtle.left(2)
turtle.forward(25)

turtle.speed(2)            #速度
turtle.left(135)           #下面的鱼鳍
turtle.forward(10)
turtle.right(5)
turtle.forward(10)
#turtle.color("red","white") 
turtle.right(15)
turtle.forward(10)
turtle.right(5)
turtle.forward(15)
turtle.right(75)
turtle.forward(2)

turtle.speed(5)            #速度
turtle.right(45)
turtle.forward(15)
turtle.right(20)
turtle.forward(20)
turtle.right(15)
turtle.forward(15)
#turtle.color("red","white") 
turtle.right(1)
turtle.forward(10)
turtle.left(20)
turtle.forward(15)
turtle.left(20)
turtle.forward(15)
turtle.left(20)
turtle.forward(15)
turtle.left(10)
turtle.forward(20)

#turtle.color("red","white") 
turtle.forward(30)
turtle.right(5)
turtle.forward(10)
turtle.right(5)
turtle.forward(10)
turtle.right(50)
turtle.forward(5)
turtle.left(55)
turtle.forward(20)
#turtle.color("red","white")
turtle.right(40)
turtle.forward(5)
turtle.right(5)
turtle.forward(5)
turtle.right(5)
turtle.forward(5)
turtle.right(30)
turtle.forward(5)
turtle.right(10)
turtle.forward(2)
turtle.right(10)
turtle.forward(7)
turtle.goto(-150,150)

turtle.speed(1)            #速度
turtle.up()         #眼睛
turtle.goto(-125,135)
turtle.down()
turtle.circle(2)
turtle.end_fill()

turtle.speed(9)            #速度
turtle.up()
turtle.goto(-150,113)
turtle.down()
turtle.right(80)
turtle.forward(20)
turtle.right(15)
turtle.forward(88)
turtle.up()
turtle.speed(6)            #速度
turtle.forward(36)
turtle.down()
turtle.forward(40)
turtle.right(5)
turtle.speed(3)            #速度
turtle.forward(20)
turtle.right(5)
turtle.forward(20)
turtle.right(3)
turtle.forward(20)
turtle.right(2)
turtle.speed(1)            #速度
turtle.forward(30)

turtle.up()
turtle.goto(-130,60)
turtle.down()
time.sleep(1)
turtle.write('海豚')
turtle.up()
turtle.goto(-130,49)
turtle.down()
turtle.write('给了大海希望')
turtle.up()
turtle.goto(-130,38)
turtle.down()
time.sleep(1)
turtle.write('给了人们路标')
turtle.up()
turtle.goto(-130,27)
turtle.down()
turtle.write('当你迷路')
turtle.up()
turtle.goto(-130,16)
turtle.down()
time.sleep(1)
turtle.write('是它')
turtle.up()
turtle.goto(-130,5)
turtle.down()
turtle.write('当大海中无形的路标')
turtle.up()
turtle.goto(-130,-6)
turtle.down()
time.sleep(1)
turtle.write('当你迷离失所')
turtle.up()
turtle.goto(-130,-17)
turtle.down()
turtle.write('这是你的一希之望')
turtle.up()
turtle.goto(-130,-28)
turtle.down()
time.sleep(1)
turtle.write('我爱大海')
turtle.up()
turtle.goto(-130,-39)
turtle.down()
turtle.write('因为. . .')
turtle.up()
turtle.goto(-130,-50)
turtle.down()
time.sleep(1)
turtle.write('我爱海豚')

done()

 

转载于:https://www.cnblogs.com/ZXQian/p/9941388.html

Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐