Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson3-4-1_DIY1
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
0496c202
authored
3 years ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
ed6beae2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
1.py
1.py
View file @
0496c202
#随机数库
import
turtle
import
turtle
pen1
=
turtle
.
Pen
()
pen1
=
turtle
.
Pen
()
pen1
.
penup
()
pen1
.
penup
()
...
@@ -16,6 +17,9 @@ pen.color("red")
...
@@ -16,6 +17,9 @@ pen.color("red")
# 设置画笔粗细
# 设置画笔粗细
pen
.
pensize
(
10
)
pen
.
pensize
(
10
)
# 画爱心
# 画爱心
#设圆的半径为len
#随机数法
#len = int(input("输入圆的半径:"))
pen
.
left
(
45
)
pen
.
left
(
45
)
# 正方形边长为圆的直径:2*len
# 正方形边长为圆的直径:2*len
# fd = forword
# fd = forword
...
@@ -27,4 +31,4 @@ pen.fd(100)
...
@@ -27,4 +31,4 @@ pen.fd(100)
# 隐藏画笔
# 隐藏画笔
pen
.
hideturtle
()
pen
.
hideturtle
()
# 保留画布
# 保留画布
turtle
.
done
()
turtle
.
done
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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