The first code

My first python-code··

#娱乐画

import turtle as t
t.pensize(4)
t.speed(15)
t.begin_fill()
t.color("black","dark orange")
t.circle(51,360)
t.end_fill()
t.circle(51,300)
t.seth(90)
t.fd(-60)
t.seth(-90)
t.circle(15,70)
t.fd(50)
t.seth(55)
t.fd(30)
t.circle(-15,75)
t.pu()
t.fd(20)
t.pd()
t.circle(39,360)
t.pu()
t.home()
t.seth(270)
t.fd(70)
t.seth(-180)
t.fd(-10)
t.pd()
t.seth(-18)
t.fd(70)
t.pu()
t.fd(30)
t.seth (-200)
t.fd(31)
t.pd()
t.circle(-20,-60)
t.seth(8)
t.fd(50)
t.pu()
t.home()
t.seth(270)
t.fd(70)
t.seth(-180)
t.fd(-12)
t.pd()
t.pd()
t.seth(-90)
t.fd(120)
t.seth(45)
t.fd(-77)
t.fd(77)
t.seth(315)
t.fd(77)


在这里插入图片描述
second:

import turtle as t
t.screensize(800,600,bg='Sky blue')
t.pensize(2)
t.pu()
t.goto(-140,-55)
#上半嘴巴
t.pd()
t.seth(156.2)
t.fd(74)
t.speed(12.3)
#鲨鱼上半身
t.begin_fill()
t.color("black","blue")
t.seth(53)
t.circle(-180,70)
t.circle(-637,19)#上半身到达尾部
#尾巴
t.seth(-90)
t.circle(60,74)
t.seth(55)
t.circle(30,105)
t.seth(0)
t.circle(30,105)
t.seth(175)
t.circle(60,74)
#身体下半嘴巴
t.pu()
t.goto(-140,-55)
t.pd()
t.seth(-151)
t.fd(61)
#身体下半部分
t.seth(-53)
t.circle(180,70)
t.circle(637,17.8)
#上嘴巴牙齿部分
t.pu()
t.goto(-140,-55)
t.seth(156)
t.fd(12)
t.pd()
for i in range(2):
    t.seth(-60*i)
    t.fd(-15)
t.pu()
t.goto(-144,-55)
t.seth(156)
t.fd(36)
t.pd()
for i in range(2):
    t.seth(-60*i)
    t.fd(-13)
#下嘴巴牙齿部分
t.pu()
t.goto(-140,-55)
t.seth(-156)
t.fd(12)
t.pd()
for i in range(2):
    t.seth(60*i)
    t.fd(-13)
t.pu()
t.goto(-140,-55)
t.seth(-156)
t.fd(30)
t.pd()
for i in range(2):
    t.seth(60*i)
    t.fd(-13)
#眼睛
t.pu()
t.goto(-94,-30)
t.seth(156)
t.pd()
t.seth(30)
t.circle(11,360)
t.pu()
t.goto(-94,-8)
t.pd()
t.seth(200)
t.fd(24)
t.fd(-31)
t.fd(15.5)
t.circle(4,360)
#上鱼鳍部分
t.pu()
t.goto(-144,-55)
t.seth(53)
t.circle(-285,32)
t.pd()
t.seth(55)
t.circle(-280,30)
t.seth(-90)
t.fd(80)
t.seth (-110)
t.fd(55)
#下半身鱼鳍
t.pu()
t.goto(-124,-140)
t.pd()
t.circle(35,100)
t.seth(90)
t.fd(18)
t.pu()
t.fd(22.5)
t.pd()
t.seth(270)
t.circle(75,60)
t.seth(90)
t.fd(45)
t.seth(85)
t.fd(15)
#下半身尾部鱼鳍
t.pu()
t.goto(-144,-55)
t.seth(-53)
t.circle(205,57)
t.pd()
t.seth(-90)
t.circle(40,85)
t.seth(90)
t.fd(34)
t.seth(60)
t.fd(31)
#鱼鳃部分1
t.pu()
t.goto(-60,-34)
t.pd()
t.seth(-80)
t.circle(-155,25)
t.pu()
#2
t.pu()
t.goto(-30,-34)
t.pd()
t.seth(-80)
t.circle(-155,25)
#3
t.pu()
t.goto(-14,-34)
t.pd()
t.seth(-80)
t.circle(-155,22)
t.end_fill()
#气泡
t.pencolor("blue")
for i in range(4):
    t.pu()
    t.goto(-276,46*(i*2))
    t.pd()
    t.circle (14,360)

在这里插入图片描述
代码有需要改进的联系一下小白的我,感谢

原创文章 27 获赞 34 访问量 2627

猜你喜欢

转载自blog.csdn.net/weixin_46313446/article/details/104963311