python title库函数,绘画哆啦A梦

  1 from turtle import *
  2 setup(750,650,200,200)
  3 speed(10)
  4 bgcolor("deepskyblue")
  5 penup()
  6 pendown()
  7 pensize(3)
  8 pencolor("black")
  9 seth(10)
 10 fd(150)
 11 seth(55)
 12 circle(105,270)#脑袋
 13 begin_fill()
 14 fillcolor("red")
 15 seth(-145)
 16 circle(10,180)
 17 seth(10)
 18 fd(150)
 19 seth(45)
 20 circle(10,180)
 21 end_fill()#脖子
 22 seth(65)
 23 circle(90,100)#右脸里半圈
 24 begin_fill()
 25 fillcolor("white")
 26 seth(90)
 27 circle(15,110)
 28 seth(-150)
 29 circle(20,180)
 30 seth(75)
 31 circle(50,30)
 32 end_fill()#右眼睛圈
 33 penup()
 34 seth(200)
 35 fd(15)
 36 pendown()
 37 seth(145)
 38 circle(5,180)#右眼睛
 39 penup()
 40 seth(190)
 41 fd(10)
 42 pendown()
 43 begin_fill()
 44 fillcolor("white")
 45 seth(90)
 46 circle(15,110)
 47 seth(-150)
 48 circle(20,180)
 49 seth(75)
 50 circle(50,30)
 51 end_fill()#左眼睛圈
 52 penup()
 53 seth(210)
 54 fd(17)
 55 pendown()
 56 begin_fill()
 57 fillcolor("black")
 58 seth(90)
 59 circle(5,90)
 60 seth(-150)
 61 circle(7,150)
 62 seth(75)
 63 circle(13,35)
 64 end_fill()#左眼
 65 penup()
 66 seth(200)
 67 fd(17)
 68 pendown()
 69 circle(76,120)#左半脸圈
 70 penup()
 71 goto(70,100)
 72 seth(0)
 73 pendown()
 74 begin_fill()
 75 fillcolor("firebrick")
 76 circle(16,360)
 77 end_fill()
 78 seth(10)
 79 fd(5)
 80 seth(-75)
 81 fd(30)
 82 seth(10)
 83 fd(50)
 84 begin_fill()
 85 fillcolor("brown")
 86 seth(190)
 87 fd(120)
 88 seth(-70)
 89 circle(60,160)
 90 end_fill()
 91 penup()
 92 seth(190)
 93 fd(120)
 94 seth(-70)
 95 circle(60,70)
 96 pendown()
 97 begin_fill()
 98 fillcolor("tomato")
 99 circle(60,60)
100 seth(160)
101 circle(70,70)
102 end_fill()
103 
104 penup()
105 goto(101,96)
106 pendown()
107 seth(5)
108 fd(50)
109 
110 penup()
111 goto(101,105)
112 pendown()
113 seth(23)
114 fd(50)
115 
116 penup()
117 goto(98,119)
118 pendown()
119 seth(40)
120 fd(50)#右胡须
121 
122 penup()
123 goto(50,80)
124 pendown()
125 seth(-160)
126 fd(60)
127 
128 penup()
129 goto(50,90)
130 pendown()
131 seth(-180)
132 fd(60)
133 
134 penup()
135 goto(50,100)
136 pendown()
137 seth(-200)
138 fd(60)
139 
140 penup()
141 goto(0,0)
142 seth(10)
143 fd(80)
144 
145 pendown()
146 begin_fill()
147 fillcolor("gold")
148 seth(190)
149 circle(25,360)
150 end_fill()
151 
152 penup()
153 seth(190)
154 circle(25,60)
155 pendown()
156 seth(10)
157 fd(45)
158 
159 penup()
160 goto(79,9)
161 seth(190)
162 circle(25,70)
163 pendown()
164 seth(11)
165 fd(50)
166 
167 penup()
168 goto(88,-29)
169 seth(100)
170 pendown()
171 fd(8)
172 penup()
173 fd(5)
174 pendown()
175 seth(190)
176 begin_fill()
177 fillcolor("goldenrod")
178 end_fill()
179 circle(5,360)
180 done()

效果图(小白画图)

猜你喜欢

转载自www.cnblogs.com/xiao-ju/p/12521426.html