Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson5_1
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
73e4d060
authored
Nov 14, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
6b20c3cd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
diy1.py
diy1.py
View file @
73e4d060
"""
import
random
使用turtle模块画图
key
=
"hb kersgher阿发送到范德萨发顺丰vuyefbsdgfythyg6867689768687t875砂粉色的范德萨rt5T87G6B7D43568967T@#$
%
^&*&^t
%
r$e#w@$r
%
t^78YdsiugdfXGHJLIKH&^#
%
O*I
%
$"
每次移动都增加画笔移动的长度,并旋转91°,重复执行300次,查看效果
massage
=
input
()
"""
key_massage
=
""
import
turtle
noise
=
"*&(&
%
^*&)(按时$
%%
&^*(&
%%
$^^&**&^*&$!@#$
%
^&*())(V达传说中LKBFVFDHUOJ*OG^IY:I8h6gi8gsdythg9ogf9erufrei87ty645unbt87ffgvunsd88er70eruy65-=-012+))"
for
i
in
massage
:
str1
=
i
str2
=
random
.
choice
(
key
)
str3
=
random
.
choice
(
key
)
text
=
str1
+
str2
+
str3
key_massage
=
key_massage
+
text
list1
=
list
(
key_massage
)
a
=
random
.
randint
(
0
,
len
(
list1
))
list1
.
insert
(
a
,
noise
)
b
=
""
.
join
(
list1
)
print
(
b
)
\ No newline at end of file
pen
=
turtle
.
Pen
()
# 请创造师在下面接着创作
while
True
:
distance
=
1
for
i
in
range
(
300
):
pen
.
forward
(
distance
)
distance
+=
1
pen
.
right
(
91
)
# 隐藏画笔,保存画布
pen
.
hideturtle
()
turtle
.
done
()
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment