Skip to content

Commit 7da059a

Browse files
committed
noyhing
1 parent 83697f6 commit 7da059a

24 files changed

+1438
-119
lines changed

1to100.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
for number in range(0,101):
2+
print(number)
3+
print('have a good sleep,my boy')

B_o_S.py

Lines changed: 0 additions & 33 deletions
This file was deleted.

Doraemon.py

Lines changed: 329 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,329 @@
1+
# !/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
# @Author: dong
4+
# @Date: 2018-07-05 19:37:42
5+
# @Env: python 3.6
6+
# @Github: https://github.com/PerpetualSmile
7+
8+
from turtle import *
9+
10+
11+
# 无轨迹跳跃
12+
def my_goto(x, y):
13+
penup()
14+
goto(x, y)
15+
pendown()
16+
17+
# 眼睛
18+
def eyes():
19+
fillcolor("#ffffff")
20+
begin_fill()
21+
22+
tracer(False)
23+
a = 2.5
24+
for i in range(120):
25+
if 0 <= i < 30 or 60 <= i < 90:
26+
a -= 0.05
27+
lt(3)
28+
fd(a)
29+
else:
30+
a += 0.05
31+
lt(3)
32+
fd(a)
33+
tracer(True)
34+
end_fill()
35+
36+
37+
# 胡须
38+
def beard():
39+
my_goto(-32, 135)
40+
seth(165)
41+
fd(60)
42+
43+
my_goto(-32, 125)
44+
seth(180)
45+
fd(60)
46+
47+
my_goto(-32, 115)
48+
seth(193)
49+
fd(60)
50+
51+
my_goto(37, 135)
52+
seth(15)
53+
fd(60)
54+
55+
my_goto(37, 125)
56+
seth(0)
57+
fd(60)
58+
59+
my_goto(37, 115)
60+
seth(-13)
61+
fd(60)
62+
63+
# 嘴巴
64+
def mouth():
65+
my_goto(5, 148)
66+
seth(270)
67+
fd(100)
68+
seth(0)
69+
circle(120, 50)
70+
seth(230)
71+
circle(-120, 100)
72+
73+
# 围巾
74+
def scarf():
75+
fillcolor('#e70010')
76+
begin_fill()
77+
seth(0)
78+
fd(200)
79+
circle(-5, 90)
80+
fd(10)
81+
circle(-5, 90)
82+
fd(207)
83+
circle(-5, 90)
84+
fd(10)
85+
circle(-5, 90)
86+
end_fill()
87+
88+
# 鼻子
89+
def nose():
90+
my_goto(-10, 158)
91+
seth(315)
92+
fillcolor('#e70010')
93+
begin_fill()
94+
circle(20)
95+
end_fill()
96+
97+
# 黑眼睛
98+
def black_eyes():
99+
seth(0)
100+
my_goto(-20, 195)
101+
fillcolor('#000000')
102+
begin_fill()
103+
circle(13)
104+
end_fill()
105+
106+
pensize(6)
107+
my_goto(20, 205)
108+
seth(75)
109+
circle(-10, 150)
110+
pensize(3)
111+
112+
my_goto(-17, 200)
113+
seth(0)
114+
fillcolor('#ffffff')
115+
begin_fill()
116+
circle(5)
117+
end_fill()
118+
my_goto(0, 0)
119+
120+
121+
122+
# 脸
123+
def face():
124+
125+
fd(183)
126+
lt(45)
127+
fillcolor('#ffffff')
128+
begin_fill()
129+
circle(120, 100)
130+
seth(180)
131+
# print(pos())
132+
fd(121)
133+
pendown()
134+
seth(215)
135+
circle(120, 100)
136+
end_fill()
137+
my_goto(63.56,218.24)
138+
seth(90)
139+
eyes()
140+
seth(180)
141+
penup()
142+
fd(60)
143+
pendown()
144+
seth(90)
145+
eyes()
146+
penup()
147+
seth(180)
148+
fd(64)
149+
150+
# 头型
151+
def head():
152+
penup()
153+
circle(150, 40)
154+
pendown()
155+
fillcolor('#00a0de')
156+
begin_fill()
157+
circle(150, 280)
158+
end_fill()
159+
160+
# 画哆啦A梦
161+
def Doraemon():
162+
# 头部
163+
head()
164+
165+
# 围脖
166+
scarf()
167+
168+
# 脸
169+
face()
170+
171+
# 红鼻子
172+
nose()
173+
174+
# 嘴巴
175+
mouth()
176+
177+
# 胡须
178+
beard()
179+
180+
# 身体
181+
my_goto(0, 0)
182+
seth(0)
183+
penup()
184+
circle(150, 50)
185+
pendown()
186+
seth(30)
187+
fd(40)
188+
seth(70)
189+
circle(-30, 270)
190+
191+
192+
fillcolor('#00a0de')
193+
begin_fill()
194+
195+
seth(230)
196+
fd(80)
197+
seth(90)
198+
circle(1000, 1)
199+
seth(-89)
200+
circle(-1000, 10)
201+
202+
# print(pos())
203+
204+
seth(180)
205+
fd(70)
206+
seth(90)
207+
circle(30, 180)
208+
seth(180)
209+
fd(70)
210+
211+
# print(pos())
212+
seth(100)
213+
circle(-1000, 9)
214+
215+
seth(-86)
216+
circle(1000, 2)
217+
seth(230)
218+
fd(40)
219+
220+
# print(pos())
221+
222+
223+
circle(-30, 230)
224+
seth(45)
225+
fd(81)
226+
seth(0)
227+
fd(203)
228+
circle(5, 90)
229+
fd(10)
230+
circle(5, 90)
231+
fd(7)
232+
seth(40)
233+
circle(150, 10)
234+
seth(30)
235+
fd(40)
236+
end_fill()
237+
238+
# 左手
239+
seth(70)
240+
fillcolor('#ffffff')
241+
begin_fill()
242+
circle(-30)
243+
end_fill()
244+
245+
# 脚
246+
my_goto(103.74, -182.59)
247+
seth(0)
248+
fillcolor('#ffffff')
249+
begin_fill()
250+
fd(15)
251+
circle(-15, 180)
252+
fd(90)
253+
circle(-15, 180)
254+
fd(10)
255+
end_fill()
256+
257+
my_goto(-96.26, -182.59)
258+
seth(180)
259+
fillcolor('#ffffff')
260+
begin_fill()
261+
fd(15)
262+
circle(15, 180)
263+
fd(90)
264+
circle(15, 180)
265+
fd(10)
266+
end_fill()
267+
268+
# 右手
269+
my_goto(-133.97, -91.81)
270+
seth(50)
271+
fillcolor('#ffffff')
272+
begin_fill()
273+
circle(30)
274+
end_fill()
275+
276+
# 口袋
277+
my_goto(-103.42, 15.09)
278+
seth(0)
279+
fd(38)
280+
seth(230)
281+
begin_fill()
282+
circle(90, 260)
283+
end_fill()
284+
285+
my_goto(5, -40)
286+
seth(0)
287+
fd(70)
288+
seth(-90)
289+
circle(-70, 180)
290+
seth(0)
291+
fd(70)
292+
293+
#铃铛
294+
my_goto(-103.42, 15.09)
295+
fd(90)
296+
seth(70)
297+
fillcolor('#ffd200')
298+
# print(pos())
299+
begin_fill()
300+
circle(-20)
301+
end_fill()
302+
seth(170)
303+
fillcolor('#ffd200')
304+
begin_fill()
305+
circle(-2, 180)
306+
seth(10)
307+
circle(-100, 22)
308+
circle(-2, 180)
309+
seth(180-10)
310+
circle(100, 22)
311+
end_fill()
312+
goto(-13.42, 15.09)
313+
seth(250)
314+
circle(20, 110)
315+
seth(90)
316+
fd(15)
317+
dot(10)
318+
my_goto(0, -150)
319+
320+
# 画眼睛
321+
black_eyes()
322+
323+
if __name__ == '__main__':
324+
screensize(800,600, "#f0f0f0")
325+
pensize(3) # 画笔宽度
326+
speed(10) # 画笔速度
327+
Doraemon()
328+
my_goto(100, -300)
329+
mainloop()

0 commit comments

Comments
 (0)