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
55b00fc1
authored
Aug 20, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
ab11ffc2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
4 deletions
diy1.py
text1.py
第二节课.py
邀请函。py
diy1.py
View file @
55b00fc1
neme
=
input
(
"输入名字"
)
#neme=input("输入名字")
print
(
neme
+
"你好啊"
)
#print(neme+"你好啊")
\ No newline at end of file
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
0 → 100644
View file @
55b00fc1
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
0 → 100644
View file @
55b00fc1
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
邀请函。py
deleted
100644 → 0
View file @
ab11ffc2
-- "a/\351\202\200\350\257\267\345\207\275\343\200\202py"
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