Commit e71efeec by BellCodeEditor

save project

parent 98e87c50
Showing with 1046 additions and 11 deletions
import turtle
t=turtle.Turtle()
turtle.Turtle().screen.delay(0)
tleft=turtle.Turtle()
#第一部分
t.penup()
t.goto(0,0)
t.pendown()
t.left(20)
t.forward(110)
t.left(25)
t.forward(40)
t.left(100)
t.circle(180,20)
t.right(120)
t.forward(250)
t.left(165)
t.forward(250)
t.right(100)
t.forward(35)
t.left(70)
t.forward(45)
t.left(70)
t.forward(120)
t.left(70)
t.forward(80)
t.left(80)
t.forward(80)
t.left(68)
t.forward(120)
t.left(180)
t.forward(78)
t.right(68)
t.forward(60)
t.right(75)
t.forward(60)
t.right(110)
t.forward(15)
t.left(38)
t.forward(65)
t.right(73)#五边形的直边
t.forward(35)
t.right(70)
t.forward(65)
t.right(68)
t.forward(50)
t.right(80)
t.forward(50)
t.penup()
t.goto(-65,68)
t.pendown()
t.right(7)
t.forward(350)
t.right(165)
t.forward(330)
t.penup()
t.goto(64,65)
t.pendown()
t.left(75)
t.forward(350)
t.left(165)
t.forward(330)
t.penup()
t.goto(300,500)
#第二部分
tleft.left(180)
tleft.right(20)
tleft.forward(110)
tleft.right(25)
tleft.forward(40)
tleft.right(100)
tleft.circle(-180,20)
tleft.left(120)
tleft.forward(250)
tleft.right(165)
tleft.forward(250)
tleft.left(100)
tleft.forward(35)
tleft.penup()
tleft.goto(0,0)
tleft.pendown()
tleft.left(20)
tleft.penup()
tleft.forward(18)
tleft.pendown()
tleft.forward(50)#额头竖线
tleft.penup()
tleft.forward(110)#消除竖线
tleft.pendown()
tleft.left(90)
tleft.forward(30)
tleft.right(90)
tleft.forward(60)
tleft.right(90)
tleft.forward(60)
tleft.right(90)
tleft.forward(60)
tleft.right(90)
tleft.forward(40)
tleft.penup()
tleft.forward(30)
tleft.pendown()
tleft.left(90)
tleft.forward(30)
tleft.right(180)
tleft.forward(100)
tleft.right(90)
tleft.forward(80)
tleft.right(90)
tleft.forward(100)
tleft.penup()
tleft.goto(150,70)
tleft.pendown()
tleft.left(100)
tleft.forward(40)
tleft.right(80)
tleft.circle(-333,40)
tleft.right(160)
tleft.forward(230)
#右半部分
tleft.left(100)
tleft.forward(40)
tleft.left(80)
tleft.forward(20)
tleft.left(100)
tleft.forward(30)
tleft.right(100)
tleft.forward(20)
tleft.right(80)
tleft.forward(30)
tleft.left(80)
tleft.forward(20)
tleft.left(100)
tleft.forward(30)
tleft.right(100)
tleft.forward(20)
tleft.right(80)
tleft.forward(30)
tleft.left(80)
tleft.forward(20)
tleft.left(100)
tleft.forward(30)
tleft.right(100)
tleft.forward(20)
tleft.right(80)
tleft.forward(30)
tleft.left(80)
tleft.forward(20)
tleft.left(100)
tleft.forward(30)
tleft.right(100)
tleft.forward(20)
tleft.right(80)
tleft.forward(30)
tleft.left(80)
tleft.forward(20)
tleft.left(100)
tleft.forward(30)
tleft.right(100)
tleft.forward(20)
tleft.right(80)
tleft.forward(30)
tleft.left(80)
tleft.forward(20)
tleft.left(100)
tleft.forward(30)
tleft.right(100)
tleft.forward(20)
tleft.right(80)
tleft.forward(30)
#右下部分
tleft.left(70)
tleft.forward(30)
tleft.right(110)
tleft.forward(40)
tleft.right(60)
tleft.forward(100)
tleft.right(30)
tleft.circle(200,20)
tleft.left(10)
tleft.forward(80)
#右下部分goto
tleft.penup()
tleft.goto(145,-198)
tleft.pendown()
tleft.left(90)
tleft.forward(30)
tleft.right(30)
tleft.forward(40)
tleft.right(150)
tleft.forward(30)
tleft.backward(30)
tleft.left(90)
tleft.forward(100)
tleft.right(90)
tleft.forward(30)
tleft.backward(30)
tleft.left(90)
tleft.right(30)
tleft.circle(200,20)
tleft.left(10)
tleft.forward(50)
#第三部分脸
t2=turtle.Turtle()
t2.penup()
t2.goto(0,-80)
#尖角
t2.circle(150,extent=90)
t2.pendown()
t2.circle(150,extent=30)
t2.penup()
t2.circle(150,extent=18)
t2.pendown()
t2.circle(150,extent=27)
t2.penup()
t2.circle(150,extent=30)
t2.pendown()
t2.circle(150,extent=27)
t2.penup()
t2.circle(150,extent=18)
t2.pendown()
t2.circle(150,extent=30)
t2.right(100)
t2.forward(40)
#左脸夹
t2.left(80)
t2.circle(333,40)
t2.left(160)
t2.forward(230)
#左半部分
t2.right(100)
t2.forward(40)
t2.right(80)
t2.forward(20)
t2.right(100)
t2.forward(30)
t2.left(100)
t2.forward(20)
t2.left(80)
t2.forward(30)
t2.right(80)
t2.forward(20)
t2.right(100)
t2.forward(30)
t2.left(100)
t2.forward(20)
t2.left(80)
t2.forward(30)
t2.right(80)
t2.forward(20)
t2.right(100)
t2.forward(30)
t2.left(100)
t2.forward(20)
t2.left(80)
t2.forward(30)
t2.right(80)
t2.forward(20)
t2.right(100)
t2.forward(30)
t2.left(100)
t2.forward(20)
t2.left(80)
t2.forward(30)
t2.right(80)
t2.forward(20)
t2.right(100)
t2.forward(30)
t2.left(100)
t2.forward(20)
t2.left(80)
t2.forward(30)
t2.right(80)
t2.forward(20)
t2.right(100)
t2.forward(30)
t2.left(100)
t2.forward(20)
t2.left(80)
t2.forward(30)
t2.right(70)
t2.forward(30)
t2.left(110)
t2.forward(40)
t2.left(60)
t2.forward(100)
t2.left(30)
t2.circle(-200,20)
t2.right(10)
t2.forward(80)
t2.penup()
t2.goto(-145,-198)#左脸颊
t2.pendown()
t2.right(90)
t2.forward(30)
t2.left(30)
t2.forward(40)
t2.left(150)
t2.forward(30)
t2.right(180)
t2.forward(30)
t2.left(90)
t2.forward(100)
t2.left(90)
t2.forward(30)
t2.left(180)
t2.forward(30)
t2.left(120)
t2.circle(-200,20)
t2.right(10)
t2.forward(50)
#左眼
t2.right(135)
t2.forward(70)
t2.left(50)
t2.forward(40)
t2.left(20)
t2.forward(20)
t2.penup()
t2.goto(-100,28)
t2.pendown()
t2.right(70)
t2.forward(65)
t2.left(50)
t2.forward(40)
t2.left(40)
t2.forward(20)
#左眼带
t2.penup()
t2.goto(-105,-10)
t2.pendown()
t2.right(100)
t2.circle(120,extent=20)
t2.circle(60,extent=80)
t2.penup()
t2.goto(-105,-13)
t2.pendown()
t2.right(100)
t2.circle(120,extent=20)
t2.circle(60,extent=80)
t2.penup()
t2.goto(-70,-40)
t2.pendown()
t2.left(10)
t2.forward(30)
t2.penup()
t2.goto(-10,-40)
t2.pendown()
t2.left(35)
t2.forward(30)
t2.penup()
t2.goto(-80,30)
t2.pendown()
t2.right(130)
t2.forward(47)
t2.left(50)
t2.forward(35)
t2.penup()
t2.goto(-60,-45)
t2.pendown()
t2.right(98)
t2.forward(60)
t2.left(20)
t2.forward(80)
t2.left(70)
t2.forward(10)
t2.left(90)
t2.forward(50)
t2.right(60)
t2.forward(30)
t2.right(60)
t2.forward(30)
t2.right(60)
t2.forward(50)
t2.left(90)
t2.forward(10)
t2.left(75)
t2.forward(80)
t2.left(15)
t2.forward(60)
t2.penup()
t2.goto(-80,-140)
t2.pendown()
t2.right(150)
t2.circle(85,extent=45)
t2.left(15)
t2.forward(70)
t2.left(15)
t2.circle(55,extent=55)
t2.penup()
t2.goto(0,-175)
t2.pendown()
t2.left(18)
t2.forward(170)
#右眼
tleft.left(135)
tleft.forward(70)
tleft.right(50)
tleft.forward(40)
tleft.right(20)
tleft.forward(20)
tleft.penup()
tleft.goto(100,28)
tleft.pendown()
tleft.left(70)
tleft.forward(65)
tleft.right(50)
tleft.forward(40)
tleft.right(40)
tleft.forward(20)
#右眼带
tleft.penup()
tleft.goto(105,-10)
tleft.pendown()
tleft.left(100)
tleft.circle(-120,extent=20)
tleft.circle(-60,extent=80)
tleft.penup()
tleft.goto(105,-13)
tleft.pendown()
tleft.left(100)
tleft.circle(-120,extent=20)
tleft.circle(-60,extent=80)
#右眼睛
tleft.penup()
tleft.goto(70,-40)
tleft.pendown()
tleft.right(10)
tleft.forward(30)
tleft.penup()
tleft.goto(10,-40)
tleft.pendown()
tleft.right(35)
tleft.forward(30)
tleft.penup()
tleft.goto(80,30)
tleft.pendown()
tleft.left(130)
tleft.forward(47)
tleft.right(50)
tleft.forward(35)
#鼻子
tleft.penup()
tleft.goto(0,-70)
tleft.pendown()
tleft.left(30)
tleft.forward(20)
tleft.left(72)
tleft.forward(10)
tleft.left(108)
tleft.forward(20)
tleft.right(42)
tleft.forward(20)
tleft.left(108)
tleft.forward(10)
tleft.left(72)
tleft.forward(20)
tleft.penup()
tleft.goto(0,-90)
tleft.pendown()
tleft.left(42)
tleft.forward(20)
tleft.left(72)
tleft.forward(10)
tleft.left(108)
tleft.forward(20)
tleft.right(42)
tleft.forward(20)
tleft.left(108)
tleft.forward(10)
tleft.left(72)
tleft.forward(20)
tleft.penup()
tleft.goto(200,500)
turtle.done()
\ No newline at end of file
from turtle import *
from random import *
from math import *
def tree(n,l):
pd()#下笔
#阴影效果
t = cos(radians(heading()+45))/8+0.25
pencolor(t,t,t)
pensize(n/3)
forward(l)#画树枝
if n>0:
b = random()*15+10 #右分支偏转角度
c = random()*15+10 #左分支偏转角度
d = l*(random()*0.25+0.7) #下一个分支的长度
#右转一定角度,画右分支
right(b)
tree(n-1,d)
#左转一定角度,画左分支
left(b+c)
tree(n-1,d)
#转回来
right(c)
else:
#画叶子
right(90)
n=cos(radians(heading()-45))/4+0.5
ran=random()
#这里相比于原来随机添加了填充的圆圈,让樱花叶子看起来更多一点
if(ran>0.7):
begin_fill()
circle(3)
fillcolor("pink")
#把原来随机生成的叶子换成了统一的粉色
pencolor("pink")
circle(3)
if(ran>0.7):
end_fill()
left(90)
#添加0.3倍的飘落叶子
if(random()>0.7):
pu()
#飘落
t = heading()
an = -40 +random()*40
setheading(an)
dis = int(800*random()*0.5 + 400*random()*0.3 + 200*random()*0.2)
forward(dis)
setheading(t)
#画叶子
pd()
right(90)
n = cos(radians(heading()-45))/4+0.5
pencolor(n*0.5+0.5,0.4+n*0.4,0.4+n*0.4)
circle(2)
left(90)
pu()
#返回
t=heading()
setheading(an)
backward(dis)
setheading(t)
pu()
backward(l)#退回
bgcolor(0.956,0.9255,0.9882)#设置背景色(把灰色换成淡紫色)
ht()#隐藏turtle
speed(0)#速度 1-10渐进,0 最快
tracer(0,0)
pu()#抬笔
backward(50)
left(90)#左转90度
pu()#抬笔
backward(300)#后退300
tree(12,100)#递归7层
done()
\ No newline at end of file
...@@ -2,24 +2,40 @@ import turtle ...@@ -2,24 +2,40 @@ import turtle
import random import random
pen = turtle.Turtle() pen = turtle.Turtle()
pen.color('sienna') pen.color('sienna')
pen.speed(100000000000000000000000000000000)
w=turtle.Screen() w=turtle.Screen()
w.bgcolor('wheat') w.bgcolor('green')
pen.left(90) pen.left(90)
pen.up() pen.up()
pen.backward(150) pen.backward(150)
pen.down() pen.down()
def tree(n):
if n>=0:
if n <=12:
color_list = ['blue','lightcoral']
color=random.choice(color_list)
pen.color(color)
pen.pensize(n/3)
else:
pen.color('red')
pen.pensize(n/10)
pen.forward(n)
angle = random.random()
pen.right(30*angle)
length=1.5*random.random()
tree(n-10*length)
pen.left(60*angle)
tree(n-10*length)
pen.right(30*angle)
pen.up()
pen.backward(n) # 后退
pen.down()
tree(60) tree(60)
turtle.done() turtle.done()
pen.forward(n)
pen.right(30)
tree(n-10)
pen.left(60)
tree(n-10)
pen.right(30)
pen.up()
pen.backward(n) # 后退
pen.down()
import time
words = input('Please input the words you want to say!:')
#例子:words = "Dear lili, Happy Valentine's Day! Lyon Will Always Love You Till The End! ♥ Forever! ♥"
for item in words.split():
#要想实现打印出字符间的空格效果,此处添加:item = item+' '
letterlist = []#letterlist是所有打印字符的总list,里面包含y条子列表list_X
for y in range(12, -12, -1):
list_X = []#list_X是X轴上的打印字符列表,里面装着一个String类的letters
letters = ''#letters即为list_X内的字符串,实际是本行要打印的所有字符
for x in range(-30, 30):#*是乘法,**是幂次方
expression = ((x*0.05)**2+(y*0.1)**2-1)**3-(x*0.05)**2*(y*0.1)**3
if expression <= 0:
letters += item[(x-y) % len(item)]
else:
letters += ' '
list_X.append(letters)
letterlist += list_X
print('\n'.join(letterlist))
time.sleep(1.5);
\ No newline at end of file
#include<conio.h>
#include<graphics.h>
#include<math.h>
#define PI acos(-1.0)
double th = PI / 180;
// 绘制斜的椭圆
void DrawEllipse(int x0, int y0, int a, int b, int k, int color);
// 绘制心形
void heart(int x0, int y0, int size, COLORREF C);
int main()
{
initgraph(640, 640);
setbkcolor(WHITE);
cleardevice();
// 设置线的宽度
setlinestyle(PS_SOLID, 5);
setlinecolor(BLACK);
setfillcolor(RGB(238, 238, 238));
// 左耳朵
fillrectangle(175, 266, 190, 325);
fillrectangle(159, 281, 175, 315);
// 右耳朵
fillrectangle(393, 268, 410, 324);
fillrectangle(410, 286, 423, 311);
fillellipse(187, 196, 397, 402);
setfillcolor(WHITE);
fillroundrect(288, 146, 302, 242, 10, 20);
// 绘制左右眼睛
DrawEllipse(243, 297, 38, 30, -30, BLACK);
DrawEllipse(350, 297, 38, 30, 30, BLACK);
setfillcolor(RGB(248, 245, 143));
floodfill(243, 297, BLACK);
floodfill(350, 297, BLACK);
line(296, 422, 249, 394);
line(296, 422, 336, 394);
setfillcolor(RGB(235, 110, 69));
floodfill(295, 410, BLACK);
setfillcolor(RGB(137, 211, 211));
fillcircle(294, 432, 10);
// 绘制身体
arc(222, 399, 286, 591, 145.0 / 180 * PI, PI + 145.0 / 180 * PI);
arc(305, 413, 364, 591, PI + 35.0 / 180 * PI, 55.0 / 180 * PI);
line(224, 485, 359, 485);
line(224, 511, 278, 549);
line(278, 549, 312, 549);
line(312, 549, 360, 515);
setfillcolor(RGB(235, 110, 69));
floodfill(294, 517, BLACK);
setfillcolor(RGB(238, 238, 238));
floodfill(252, 554, BLACK);
floodfill(334, 559, BLACK);
// 绘制左边胳膊
arc(189, 387, 353, 647, 109.0 / 180 * PI, PI);
arc(189, 480, 223, 537, 10.0 / 180.0 * PI + PI, 0);
line(196, 471, 222, 491);
setfillcolor(RGB(235, 110, 69));
floodfill(207, 501, BLACK);
// 绘制右胳膊
arc(230, 319, 424, 455, 110.0 / 180 * PI + PI, 5.0 / 180 * PI);
arc(392, 360, 424, 395, -5.0 / 180 * PI, PI + PI / 2);
arc(310, 286, 402, 394, 70.0 / 180 * PI + PI, 150.0 / 180 * PI + PI);
line(372, 390, 394, 431);
setfillcolor(RGB(235, 110, 69));
floodfill(399, 402, BLACK);
// 给身体颜色
setfillcolor(RGB(238, 238, 238));
floodfill(296, 458, BLACK);
// 连接气球
line(463, 187, 422, 365);
heart(464, 67, 30, BLACK);
setfillcolor(RGB(235, 110, 69));
floodfill(464, 70, BLACK);
setfillcolor(RGB(255, 232, 201));
solidcircle(508, 70, 6);
_getch();
return 0;
}
void heart(int x0, int y0, int size, COLORREF C)
{
double m, n, x, y;
double i;
for (i = 0; i <= 2 * size; i = i + 0.01)
{
// 产生极坐标点
m = i;
n = -size * (((sin(i) * sqrt(fabs(cos(i)))) / (sin(i) + 1.4142)) - 2 * sin(i) + 2);
// 转换为笛卡尔坐标
x = n * cos(m) + x0;
y = n * sin(m) + y0;
setfillcolor(C);
solidcircle((int)x, (int)y, 2);
}
}
void DrawEllipse(int x0, int y0, int a, int b, int k, int color)
{
double i;
double x, y, tx, ty;
for (i = -180; i <= 180; i = i + 0.5)
{
x = a * cos(i * th);
y = b * sin(i * th);
tx = x;
ty = y;
x = tx * cos(k * th) - ty * sin(k * th) + x0;
y = y0 - (ty * cos(k * th) + tx * sin(k * th));
setfillcolor(color);
solidcircle((int)x, (int)y, 2);
}
}
\ No newline at end of file
import turtle as tt
tt.speed(0)
def nose():
# 鼻子
tt.pu()
tt.goto(-100, 100)
tt.pd()
tt.seth(-30)
tt.begin_fill()
a = 0.4
for i in range(120):
if 0 <= i < 30 or 60 <= i < 90:
a = a + 0.08
tt.lt(3) # 向左转3度
tt.fd(a) # 向前走a的步长
else:
a = a - 0.08
tt.lt(3)
tt.fd(a)
tt.end_fill()
tt.pu()
tt.seth(90)
tt.fd(25)
tt.seth(0)
tt.fd(10)
tt.pd()
tt.pencolor(255, 155, 192)
tt.seth(10)
tt.begin_fill()
tt.circle(5)
tt.color(160, 82, 45)
tt.end_fill()
tt.pu()
tt.seth(0)
tt.fd(20)
tt.pd()
tt.pencolor(255, 155, 192)
tt.seth(10)
tt.begin_fill()
tt.circle(5)
tt.color(160, 82, 45)
tt.end_fill()
def head():
# 头
tt.color((255, 155, 192), "pink")
tt.pu()
tt.seth(90)
tt.fd(41)
tt.seth(0)
tt.fd(0)
tt.pd()
tt.begin_fill()
tt.seth(180)
tt.circle(300, -30)
tt.circle(100, -60)
tt.circle(80, -100)
tt.circle(150, -20)
tt.circle(60, -95)
tt.seth(161)
tt.circle(-300, 15)
tt.pu()
tt.goto(-100, 100)
tt.pd()
tt.seth(-30)
a = 0.4
for i in range(60):
if 0 <= i < 30 or 60 <= i < 90:
a = a + 0.08
tt.lt(3) # 向左转3度
tt.fd(a) # 向前走a的步长
else:
a = a - 0.08
tt.lt(3)
tt.fd(a)
tt.end_fill()
def ear():
# 耳朵
tt.color((255, 155, 192), "pink")
tt.pu()
tt.seth(90)
tt.fd(-7)
tt.seth(0)
tt.fd(70)
tt.pd()
tt.begin_fill()
tt.seth(100)
tt.circle(-50, 50)
tt.circle(-10, 120)
tt.circle(-50, 54)
tt.end_fill()
tt.pu()
tt.seth(90)
tt.fd(-12)
tt.seth(0)
tt.fd(30)
tt.pd()
tt.begin_fill()
tt.seth(100)
tt.circle(-50, 50)
tt.circle(-10, 120)
tt.circle(-50, 56)
tt.end_fill()
def eyes():
# 眼睛
tt.color((255, 155, 192), "white")
tt.pu()
tt.seth(90)
tt.fd(-20)
tt.seth(0)
tt.fd(-95)
tt.pd()
tt.begin_fill()
tt.circle(15)
tt.end_fill()
tt.color("black")
tt.pu()
tt.seth(90)
tt.fd(12)
tt.seth(0)
tt.fd(-3)
tt.pd()
tt.begin_fill()
tt.circle(3)
tt.end_fill()
tt.color((255, 155, 192), "white")
tt.pu()
tt.seth(90)
tt.fd(-25)
tt.seth(0)
tt.fd(40)
tt.pd()
tt.begin_fill()
tt.circle(15)
tt.end_fill()
tt.color("black")
tt.pu()
tt.seth(90)
tt.fd(12)
tt.seth(0)
tt.fd(-3)
tt.pd()
tt.begin_fill()
tt.circle(3)
tt.end_fill()
def gill():
# 腮
tt.color((255, 155, 192))
tt.pu()
tt.seth(90)
tt.fd(-95)
tt.seth(0)
tt.fd(65)
tt.pd()
tt.begin_fill()
tt.circle(30)
tt.end_fill()
def mouth():
# 嘴
tt.color(239, 69, 19)
tt.pu()
tt.seth(90)
tt.fd(15)
tt.seth(0)
tt.fd(-100)
tt.pd()
tt.seth(-80)
tt.circle(30, 40)
tt.circle(40, 80)
def body():
# 身体
tt.color("red", (255, 99, 71))
tt.pu()
tt.seth(90)
tt.fd(-20)
tt.seth(0)
tt.fd(-78)
tt.pd()
tt.begin_fill()
tt.seth(-130)
tt.circle(100, 10)
tt.circle(300, 30)
tt.seth(0)
tt.fd(230)
tt.seth(90)
tt.circle(300, 30)
tt.circle(100, 3)
tt.color((255, 155, 192), (255, 100, 100))
tt.seth(-135)
tt.circle(-80, 63)
tt.circle(-150, 24)
tt.end_fill()
def hand():
# 手
tt.color((255, 155, 192))
tt.pu()
tt.seth(90)
tt.fd(-40)
tt.seth(0)
tt.fd(-27)
tt.pd()
tt.seth(-160)
tt.circle(300, 15)
tt.pu()
tt.seth(90)
tt.fd(15)
tt.seth(0)
tt.fd(0)
tt.pd()
tt.seth(-10)
tt.circle(-20, 90)
tt.pu()
tt.seth(90)
tt.fd(30)
tt.seth(0)
tt.fd(237)
tt.pd()
tt.seth(-20)
tt.circle(-300, 15)
tt.pu()
tt.seth(90)
tt.fd(20)
tt.seth(0)
tt.fd(0)
tt.pd()
tt.seth(-170)
tt.circle(20, 90)
def foot():
# 脚
tt.pensize(10)
tt.color((240, 128, 128))
tt.pu()
tt.seth(90)
tt.fd(-75)
tt.seth(0)
tt.fd(-180)
tt.pd()
tt.seth(-90)
tt.fd(40)
tt.seth(-180)
tt.color("black")
tt.pensize(15)
tt.fd(20)
tt.pensize(10)
tt.color((240, 128, 128))
tt.pu()
tt.seth(90)
tt.fd(40)
tt.seth(0)
tt.fd(90)
tt.pd()
tt.seth(-90)
tt.fd(40)
tt.seth(-180)
tt.color("black")
tt.pensize(15)
tt.fd(20)
def tail():
# 尾巴
tt.pensize(4)
tt.color((255, 155, 192))
tt.pu()
tt.seth(90)
tt.fd(70)
tt.seth(0)
tt.fd(95)
tt.pd()
tt.seth(0)
tt.circle(70, 20)
tt.circle(10, 330)
tt.circle(70, 30)
tt.done()
def init():
tt.pensize(4)
tt.hideturtle()
tt.colormode(255)
tt.color((255, 155, 192), "pink")
tt.setup(840, 500)
tt.speed(10)
def main():
init()
nose()
head()
ear()
eyes()
gill()
mouth()
body()
hand()
foot()
tail()
if __name__ == '__main__':
main()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment