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
2fd49cc1
authored
Nov 18, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
d82e8cb5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
1.py
1.py
View file @
2fd49cc1
#随机数库
import
turtle
import
turtle
pen1
=
turtle
.
Pen
()
pen1
=
turtle
.
Pen
()
pen1
.
penup
()
pen1
.
penup
()
...
@@ -17,9 +16,11 @@ pen.color("red")
...
@@ -17,9 +16,11 @@ pen.color("red")
# 设置画笔粗细
# 设置画笔粗细
pen
.
pensize
(
10
)
pen
.
pensize
(
10
)
# 画爱心
# 画爱心
#设圆的半径为len
#输入爱心大小控制爱心的大小
#随机数法
#len = 圆的半径
#len = int(input("输入圆的半径:"))
len
=
int
(
screen
.
textinput
(
"提示"
,
"请输入爱心的大小:"
))
# a =screen.textinput("提示","请输入爱心的大小:")
#len = int(a)
pen
.
left
(
45
)
pen
.
left
(
45
)
# 正方形边长为圆的直径:2*len
# 正方形边长为圆的直径:2*len
# fd = forword
# fd = forword
...
...
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