用python画一只雪融融
import turtle
from turtle import *
import time
turtle.title('Python(雪容融)')
turtle.speed(10) # 修改数字控制速度
# 大头的圈圈
turtle.penup()
turtle.goto(-145, 135)
turtle.pensize(10)
turtle.pencolor("#BB3529")
turtle.fillcolor("#DA2D20")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(45)
turtle.circle(-150, 45)
turtle.forward(80)
turtle.circle(-150, 180)
turtle.forward(80)
turtle.circle(-150, 135)
turtle.end_fill()
#花纹
turtle.fillcolor("#FF9300")
turtle.begin_fill()
turtle.pensize(5)
turtle.setheading(15)
turtle.circle(-600, 28)
turtle.pencolor("#FF9300")
turtle.right(30)
turtle.circle(-150, -35)
turtle.setheading(180)
turtle.forward(100)
turtle.circle(150, 42)
turtle.end_fill()
turtle.pencolor("#DA2D20")
turtle.penup()
turtle.goto(-100, 160)
turtle.fillcolor("#DA2D20")
turtle.begin_fill()
turtle.pendown()
turtle.circle(4, 360)
turtle.end_fill()
turtle.penup()
turtle.goto(-40, 169)
turtle.fillcolor("#DA2D20")
turtle.begin_fill()
turtle.pendown()
turtle.circle(4, 360)
turtle.end_fill()
turtle.penup()
turtle.goto(20, 169)
turtle.fillcolor("#DA2D20")
turtle.begin_fill()
turtle.pendown()
turtle.circle(4, 360)
turtle.end_fill()
turtle.penup()
turtle.goto(80, 163)
turtle.fillcolor("#DA2D20")
turtle.begin_fill()
turtle.pendown()
turtle.circle(4, 360)
turtle.end_fill()
turtle.pencolor("#FF9300")
turtle.penup()
turtle.goto(-130, 135)
turtle.setheading(52)
turtle.pendown()
turtle.circle(-175, -60)
turtle.circle(-125, -70)
#2
turtle.penup()
turtle.goto(-80, 150)
turtle.setheading(54)
turtle.pendown()
turtle.circle(-175, -40)
turtle.circle(-200, -50)
#3
turtle.penup()
turtle.goto(-10, 155)
turtle.setheading(75)
turtle.pendown()
turtle.circle(-480, -35)
#4
turtle.penup()
turtle.goto(50, 150)
turtle.setheading(115)
turtle.pendown()
turtle.circle(270, -40)
turtle.circle(500, -12)
#5
turtle.penup()
turtle.goto(120, 140)
turtle.setheading(130)
turtle.pendown()
turtle.circle(180, -40)
turtle.circle(145, -80)
#脸部
turtle.pensize(8)
turtle.pencolor("#BB3529")
turtle.penup()
turtle.goto(-125, 40)
turtle.setheading(216)
turtle.fillcolor("white")
turtle.begin_fill()
turtle.pendown()
turtle.circle(34, 170)
turtle.right(60)
turtle.circle(170, 63)
turtle.right(60)
turtle.circle(32, 158)
turtle.right(65)
turtle.circle(34, 157)
turtle.circle(-15, 155)
turtle.left(30)
turtle.circle(36, 127)
turtle.circle(-15, 45)
turtle.right(38)
turtle.circle(36, 107)
turtle.circle(-15, 55)
turtle.right(22)
turtle.circle(32, 120)
turtle.end_fill()
#脸蛋
#左边
turtle.pencolor("#F44F39")
turtle.penup()
turtle.goto(-120, 5)
turtle.fillcolor("#F44F39")
turtle.begin_fill()
turtle.pendown()
turtle.circle(15, 360)
turtle.end_fill()
#右边
turtle.penup()
turtle.goto(85, 0)
turtle.fillcolor("#F44F39")
turtle.begin_fill()
turtle.pendown()
turtle.circle(15, 360)
turtle.end_fill()
#眼睛
turtle.pensize(1)
#右黑
turtle.pencolor("#534A49")
turtle.penup()
turtle.goto(65, 35)
turtle.fillcolor("#534A49")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(90)
turtle.circle(9, 180)
turtle.forward(9)
turtle.circle(9, 180)
turtle.forward(9)
turtle.end_fill()
#右白
turtle.penup()
turtle.pencolor("white")
turtle.goto(57, 36)
turtle.fillcolor("white")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(90)
turtle.circle(3, 360)
turtle.end_fill()
#左黑
turtle.pencolor("#534A49")
turtle.penup()
turtle.goto(-51, 35)
turtle.fillcolor("#534A49")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(90)
turtle.circle(9, 180)
turtle.forward(9)
turtle.circle(9, 180)
turtle.forward(9)
turtle.end_fill()
#左白
turtle.penup()
turtle.pencolor("white")
turtle.goto(-58, 36)
turtle.fillcolor("white")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(90)
turtle.circle(3, 360)
turtle.end_fill()
#头顶
turtle.pensize(5)
turtle.penup()
turtle.pencolor("#5FA8D2")
turtle.goto(-108, 170)
turtle.fillcolor("white")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(24)
turtle.forward(70)
turtle.left(15)
turtle.circle(-68, 80)
turtle.left(22)
turtle.forward(78)
turtle.circle(-4, 175)
turtle.forward(40)
turtle.right(22)
turtle.circle(24, 62)
turtle.circle(-34, 62)
turtle.circle(34, 75)
turtle.circle(-34, 62)
turtle.circle(24, 72)
turtle.right(30)
turtle.forward(24)
turtle.circle(-4, 180)
turtle.forward(4)
turtle.end_fill()
#皇冠
turtle.pensize(5)
turtle.setheading(0)
turtle.penup()
turtle.pencolor("#E7A910")
turtle.goto(-15, 225)
turtle.fillcolor("white")
turtle.begin_fill()
turtle.pendown()
turtle.circle(-7, 260)
turtle.left(70)
turtle.circle(-11, 180)
turtle.left(52)
turtle.circle(-27, 93)
turtle.left(62)
turtle.circle(-10, 180)
turtle.left(70)
turtle.circle(-7, 260)
turtle.setheading(-135)
turtle.forward(15)
turtle.right(90)
turtle.forward(10)
turtle.left(90)
turtle.forward(10)
turtle.end_fill()
#左手
turtle.pensize(6)
turtle.penup()
turtle.pencolor("#BB3529")
turtle.goto(-60, -135)
turtle.fillcolor("#DA2D20")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(150)
turtle.forward(50)
turtle.circle(25,110)
turtle.circle(32,90)
turtle.circle(332,10)
turtle.end_fill()
#右手
turtle.pensize(6)
turtle.penup()
turtle.pencolor("#BB3529")
turtle.goto(80, -125)
turtle.fillcolor("#DA2D20")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(-30)
turtle.forward(50)
turtle.circle(-25,110)
turtle.circle(-32,90)
turtle.end_fill()
#左脚
turtle.pensize(6)
turtle.penup()
turtle.pencolor("#BB3529")
turtle.goto(-65, -225)
turtle.fillcolor("#DA2D20")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(-70)
turtle.forward(40)
turtle.circle(10,40)
turtle.circle(55,40)
turtle.circle(10,70)
turtle.forward(25)
turtle.end_fill()
#右脚
turtle.pensize(6)
turtle.penup()
turtle.pencolor("#BB3529")
turtle.goto(70, -225)
turtle.fillcolor("#DA2D20")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(-110)
turtle.forward(40)
turtle.circle(-10,40)
turtle.circle(-50,40)
turtle.circle(-10,70)
turtle.forward(25)
turtle.end_fill()
#脚的花纹
turtle.pensize(7)
turtle.penup()
turtle.pencolor("#FF9300")
turtle.goto(-50, -255)
turtle.pendown()
turtle.setheading(-20)
turtle.circle(100,27)
turtle.pensize(7)
turtle.penup()
turtle.pencolor("#FF9300")
turtle.goto(15, -258)
turtle.pendown()
turtle.setheading(-10)
turtle.circle(80,28)
#身体
turtle.pensize(10)
turtle.penup()
turtle.pencolor("#BB3529")
turtle.goto(-60, -125)
turtle.fillcolor("#DA2D20")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(-120)
turtle.circle(130,30)
turtle.circle(40,62)
turtle.circle(145,45)
turtle.circle(42,62)
turtle.circle(130,35)
turtle.end_fill()
#中间白色
turtle.penup()
turtle.pencolor("white")
turtle.goto(45, -173)
turtle.fillcolor("white")
turtle.begin_fill()
turtle.pendown()
turtle.circle(38,360)
turtle.end_fill()
#冬奥会象形字
turtle.setheading(-138)
turtle.pensize(4)
turtle.penup()
turtle.pencolor("red")
turtle.goto(10, -162)
turtle.pendown()
turtle.forward(12)
turtle.setheading(18)
turtle.pencolor("blue")
turtle.forward(22)
turtle.setheading(-140)
turtle.pencolor("lightblue")
turtle.forward(34)
turtle.setheading(28)
turtle.pencolor("yellowgreen")
turtle.forward(24)
turtle.pencolor("yellow")
turtle.circle(-5,200)
turtle.pensize(2)
turtle.pencolor("lightblue")
turtle.circle(23,18)
turtle.penup()
turtle.setheading(135)
turtle.pencolor("red")
turtle.goto(0, -215)
turtle.pendown()
turtle.circle(-4,150)
turtle.penup()
turtle.setheading(175)
turtle.pencolor("blue")
turtle.goto(8, -220)
turtle.pendown()
turtle.circle(-5,120)
turtle.penup()
turtle.setheading(245)
turtle.pencolor("green")
turtle.goto(18, -215)
turtle.pendown()
turtle.circle(-4,180)
turtle.penup()
turtle.goto(-16, -199)
turtle.pencolor("black")
turtle.pendown()
turtle.write("BEIJING 2022", font=('华文新魏', 6, 'bold italic'))
turtle.penup()
turtle.penup()
turtle.goto(-10,-203)
turtle.pencolor("black")
turtle.pendown()
turtle.write("paralympic Games", font=('新宋体',4))
#围巾
turtle.pensize(1)
turtle.penup()
turtle.pencolor("#FF9300")
turtle.goto(-74, -113)
turtle.fillcolor("#FF9300")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(5)
turtle.circle(-1000,3)
turtle.right(10)
turtle.circle(300,19)
turtle.right(30)
turtle.circle(-15,120)
turtle.circle(-100,4)
turtle.right(20)
turtle.circle(-300,25)
turtle.right(20)
turtle.circle(-65,23)
turtle.circle(-15,80)
turtle.end_fill()
turtle.pensize(1)
turtle.penup()
turtle.pencolor("#FF9300")
turtle.goto(-57, -135)
turtle.fillcolor("#FF9300")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(-105)
turtle.forward(50)
turtle.circle(5,80)
turtle.forward(28)
turtle.circle(5,100)
turtle.forward(60)
turtle.end_fill()
#围巾末尾
turtle.pensize(3)
turtle.penup()
turtle.pencolor("#DA2D20")
turtle.goto(-61, -175)
turtle.pendown()
turtle.setheading(-105)
turtle.forward(20)
turtle.penup()
turtle.pencolor("#DA2D20")
turtle.goto(-54, -178)
turtle.pendown()
turtle.setheading(-105)
turtle.forward(20)
turtle.penup()
turtle.pencolor("#DA2D20")
turtle.goto(-47, -181)
turtle.pendown()
turtle.setheading(-105)
turtle.forward(20)
turtle.penup()
turtle.pencolor("#DA2D20")
turtle.goto(-40, -184)
turtle.pendown()
turtle.setheading(-105)
turtle.forward(20)
turtle.penup()
turtle.goto(145, -223)
turtle.pencolor("#DA2D20")
turtle.pendown()
turtle.hideturtle()
turtle.done() 傲雪不傲霜 发表于 2022-3-14 12:50
请问有没有冰墩墩的?
有的import turtle
turtle.title('PythonBingDwenDwen')
turtle.speed(100)# 速度
# 左手
turtle.penup()
turtle.goto(177, 112)
turtle.pencolor("lightgray")
turtle.pensize(3)
turtle.fillcolor("white")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(80)
turtle.circle(-45, 200)
turtle.circle(-300, 23)
turtle.end_fill()
# 左手内
turtle.penup()
turtle.goto(182, 95)
turtle.pencolor("black")
turtle.pensize(1)
turtle.fillcolor("black")
turtle.begin_fill()
turtle.setheading(95)
turtle.pendown()
turtle.circle(-37, 160)
turtle.circle(-20, 50)
turtle.circle(-200, 30)
turtle.end_fill()
# 轮廓
# 头顶
turtle.penup()
turtle.goto(-73, 230)
turtle.pencolor("lightgray")
turtle.pensize(3)
turtle.fillcolor("white")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(20)
turtle.circle(-250, 35)
# 左耳
turtle.setheading(50)
turtle.circle(-42, 180)
# 左侧
turtle.setheading(-50)
turtle.circle(-190, 30)
turtle.circle(-320, 45)
# 左腿
turtle.circle(120, 30)
turtle.circle(200, 12)
turtle.circle(-18, 85)
turtle.circle(-180, 23)
turtle.circle(-20, 110)
turtle.circle(15, 115)
turtle.circle(100, 12)
# 右腿
turtle.circle(15, 120)
turtle.circle(-15, 110)
turtle.circle(-150, 30)
turtle.circle(-15, 70)
turtle.circle(-150, 10)
turtle.circle(200, 35)
turtle.circle(-150, 20)
# 右手
turtle.setheading(-120)
turtle.circle(50, 30)
turtle.circle(-35, 200)
turtle.circle(-300, 23)
# 右侧
turtle.setheading(86)
turtle.circle(-300, 26)
# 右耳
turtle.setheading(122)
turtle.circle(-53, 160)
turtle.end_fill()
# 右耳内
turtle.penup()
turtle.goto(-130, 180)
turtle.pencolor("black")
turtle.pensize(1)
turtle.fillcolor("black")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(120)
turtle.circle(-28, 160)
turtle.setheading(210)
turtle.circle(150, 20)
turtle.end_fill()
# 左耳内
turtle.penup()
turtle.goto(90, 230)
turtle.setheading(40)
turtle.begin_fill()
turtle.pendown()
turtle.circle(-30, 170)
turtle.setheading(125)
turtle.circle(150, 23)
turtle.end_fill()
# 右手内
turtle.penup()
turtle.goto(-180, -55)
turtle.fillcolor("black")
turtle.begin_fill()
turtle.setheading(-120)
turtle.pendown()
turtle.circle(50, 30)
turtle.circle(-27, 200)
turtle.circle(-300, 20)
turtle.setheading(-90)
turtle.circle(300, 14)
turtle.end_fill()
# 左腿内
turtle.penup()
turtle.goto(108, -168)
turtle.fillcolor("black")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(-115)
turtle.circle(110, 15)
turtle.circle(200, 10)
turtle.circle(-18, 80)
turtle.circle(-180, 13)
turtle.circle(-20, 90)
turtle.circle(15, 60)
turtle.setheading(42)
turtle.circle(-200, 29)
turtle.end_fill()
# 右腿内
turtle.penup()
turtle.goto(-38, -210)
turtle.fillcolor("black")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(-155)
turtle.circle(15, 100)
turtle.circle(-10, 110)
turtle.circle(-100, 30)
turtle.circle(-15, 65)
turtle.circle(-100, 10)
turtle.circle(200, 15)
turtle.setheading(-14)
turtle.circle(-200, 27)
turtle.end_fill()
# 右眼
# 眼圈
turtle.penup()
turtle.goto(-64, 120)
turtle.begin_fill()
turtle.pendown()
turtle.setheading(40)
turtle.circle(-35, 152)
turtle.circle(-100, 50)
turtle.circle(-35, 130)
turtle.circle(-100, 50)
turtle.end_fill()
# 眼珠
turtle.penup()
turtle.goto(-47, 55)
turtle.fillcolor("white")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(0)
turtle.circle(25, 360)
turtle.end_fill()
turtle.penup()
turtle.goto(-45, 62)
turtle.pencolor("darkslategray")
turtle.fillcolor("darkslategray")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(0)
turtle.circle(19, 360)
turtle.end_fill()
turtle.penup()
turtle.goto(-45, 68)
turtle.fillcolor("black")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(0)
turtle.circle(10, 360)
turtle.end_fill()
turtle.penup()
turtle.goto(-47, 86)
turtle.pencolor("white")
turtle.fillcolor("white")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(0)
turtle.circle(5, 360)
turtle.end_fill()
# 左眼
# 眼圈
turtle.penup()
turtle.goto(51, 82)
turtle.fillcolor("black")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(120)
turtle.circle(-32, 152)
turtle.circle(-100, 55)
turtle.circle(-25, 120)
turtle.circle(-120, 45)
turtle.end_fill()
# 眼珠
turtle.penup()
turtle.goto(79, 60)
turtle.fillcolor("white")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(0)
turtle.circle(24, 360)
turtle.end_fill()
turtle.penup()
turtle.goto(79, 64)
turtle.pencolor("darkslategray")
turtle.fillcolor("darkslategray")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(0)
turtle.circle(19, 360)
turtle.end_fill()
turtle.penup()
turtle.goto(79, 70)
turtle.fillcolor("black")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(0)
turtle.circle(10, 360)
turtle.end_fill()
turtle.penup()
turtle.goto(79, 88)
turtle.pencolor("white")
turtle.fillcolor("white")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(0)
turtle.circle(5, 360)
turtle.end_fill()
# 鼻子
turtle.penup()
turtle.goto(37, 80)
turtle.fillcolor("black")
turtle.begin_fill()
turtle.pendown()
turtle.circle(-8, 130)
turtle.circle(-22, 100)
turtle.circle(-8, 130)
turtle.end_fill()
# 嘴
turtle.penup()
turtle.goto(-15, 48)
turtle.setheading(-36)
turtle.begin_fill()
turtle.pendown()
turtle.circle(60, 70)
turtle.setheading(-132)
turtle.circle(-45, 100)
turtle.end_fill()
# 彩虹圈
turtle.penup()
turtle.goto(-135, 120)
turtle.pensize(5)
turtle.pencolor("cyan")
turtle.pendown()
turtle.setheading(60)
turtle.circle(-165, 150)
turtle.circle(-130, 78)
turtle.circle(-250, 30)
turtle.circle(-138, 105)
turtle.penup()
turtle.goto(-131, 116)
turtle.pencolor("slateblue")
turtle.pendown()
turtle.setheading(60)
turtle.circle(-160, 144)
turtle.circle(-120, 78)
turtle.circle(-242, 30)
turtle.circle(-135, 105)
turtle.penup()
turtle.goto(-127, 112)
turtle.pencolor("orangered")
turtle.pendown()
turtle.setheading(60)
turtle.circle(-155, 136)
turtle.circle(-116, 86)
turtle.circle(-220, 30)
turtle.circle(-134, 103)
turtle.penup()
turtle.goto(-123, 108)
turtle.pencolor("gold")
turtle.pendown()
turtle.setheading(60)
turtle.circle(-150, 136)
turtle.circle(-104, 86)
turtle.circle(-220, 30)
turtle.circle(-126, 102)
turtle.penup()
turtle.goto(-120, 104)
turtle.pencolor("greenyellow")
turtle.pendown()
turtle.setheading(60)
turtle.circle(-145, 136)
turtle.circle(-90, 83)
turtle.circle(-220, 30)
turtle.circle(-120, 100)
turtle.penup()
# 爱心
turtle.penup()
turtle.goto(220, 115)
turtle.pencolor("brown")
turtle.pensize(1)
turtle.fillcolor("brown")
turtle.begin_fill()
turtle.pendown()
turtle.setheading(36)
turtle.circle(-8, 180)
turtle.circle(-60, 24)
turtle.setheading(110)
turtle.circle(-60, 24)
turtle.circle(-8, 180)
turtle.end_fill()
# 五环
turtle.penup()
turtle.goto(-5, -170)
turtle.pendown()
turtle.pencolor("blue")
turtle.circle(6)
turtle.penup()
turtle.goto(10, -170)
turtle.pendown()
turtle.pencolor("black")
turtle.circle(6)
turtle.penup()
turtle.goto(25, -170)
turtle.pendown()
turtle.pencolor("brown")
turtle.circle(6)
turtle.penup()
turtle.goto(2, -175)
turtle.pendown()
turtle.pencolor("lightgoldenrod")
turtle.circle(6)
turtle.penup()
turtle.goto(16, -175)
turtle.pendown()
turtle.pencolor("green")
turtle.circle(6)
turtle.penup()
turtle.pencolor("black")
turtle.goto(-16, -160)
turtle.write("BEIJING 2022", font=('Arial', 10, 'bold italic'))
turtle.hideturtle()
turtle.done()
print("画完了") Traceback (most recent call last):
File "C:/Users/Administrator/Desktop/自动画雪容融.py", line 8, in <module>
大头的圈圈
NameError: name '大头的圈圈' is not defined
运行后显示以上错误 请问有没有冰墩墩的? 还真有趣 学习一下{:1_911:} 厉害了,学习学习。 这个不错,前段时间找到了html版的,都画的不错! 厉害,挺有趣 学习了 ,很不错吖
我是进来看有没有并顿顿的