Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-1-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
6173bdb8
authored
Sep 16, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
6d206e0e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
79 deletions
diy1.py
text1.py
第二节课.py
diy1.py
deleted
100644 → 0
View file @
6d206e0e
#neme=input("输入名字")
#print(neme+"你好啊")
import
turtle
turtle
.
pendown
()
turtle
.
circle
(
50
,
180
)
turtle
.
penup
()
turtle
.
done
()
a
=
20
b
=
30.2
print
(
a
*
b
)
print
(
5
+
2
)
\ No newline at end of file
text1.py
deleted
100644 → 0
View file @
6d206e0e
import
turtle
pen
=
turtle
.
Pen
()
screen
=
turtle
.
Screen
()
screen
.
bgcolor
(
"pink"
)
pen
.
penup
()
pen
.
goto
(
100
,
-
100
)
pen
.
write
(
"你好呀!
\n
你最近好吗?
\n
Are you find?
\n
--悟空"
,
font
=
(
"Times"
,
30
,
"normal"
))
#添加文字
pen
.
hideturtle
()
# turtle.done()
len
=
screen
.
textinput
(
"你想要多大的爱心呢?"
,
"请输入整数:"
)
lovesize
=
int
(
len
)
pen1
=
turtle
.
Pen
()
pen1
.
penup
()
pen1
.
goto
(
-
100
,
-
150
)
pen1
.
pencolor
(
"red"
)
pen1
.
fillcolor
(
"red"
)
pen1
.
begin_fill
()
pen1
.
pendown
()
pen1
.
left
(
45
)
pen1
.
forward
(
2
*
lovesize
)
pen1
.
circle
(
lovesize
,
180
)
pen1
.
right
(
90
)
pen1
.
circle
(
lovesize
,
180
)
pen1
.
forward
(
2
*
lovesize
)
pen1
.
end_fill
()
pen1
.
hideturtle
()
turtle
.
done
()
第二节课.py
deleted
100644 → 0
View file @
6d206e0e
import
turtle
import
turtle
pen
=
turtle
.
Pen
()
screen
=
turtle
.
Screen
()
screen
.
bgcolor
(
"pink"
)
#color=input("你想要什么颜色的五角星呀?")
#pen.fillcolor(color)
#绘制五角星#
# pen.begin_fill()
#for i in range(5): #重复执行5次
# pen.forward(200) #向前移动200步
# pen.right(144) #向右移动144度,注意这里的参数一定不能变
#pen.end_fill() #结束填充红色
pen
.
penup
()
pen
.
goto
(
100
,
-
100
)
pen
.
write
(
"你好呀!
\n
你最近好吗?
\n
Are you find?
\n
--悟空"
,
font
=
(
"Times"
,
30
,
"normal"
))
#添加文字
pen
.
hideturtle
()
# turtle.done()
len
=
60
pen1
=
turtle
.
Pen
()
pen1
.
penup
()
pen1
.
goto
(
-
100
,
70
)
pen1
.
pencolor
(
"red"
)
pen1
.
fillcolor
(
"red"
)
pen1
.
begin_fill
()
pen1
.
pendown
()
pen1
.
left
(
45
)
pen1
.
forward
(
2
*
len
)
pen1
.
circle
(
len
,
180
)
pen1
.
right
(
90
)
pen1
.
circle
(
len
,
180
)
pen1
.
forward
(
2
*
len
)
pen1
.
end_fill
()
pen1
.
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