Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson3-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
8ea75886
authored
Apr 16, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
50d17946
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
65 additions
and
6 deletions
1.py
2.2.py
2.py
3
3.1.py
diy1.py
1.py
0 → 100644
View file @
8ea75886
num
=
int
(
input
(
"请输入你要玫瑰的数量"
))
if
num
==
1
:
print
(
"唯一"
)
elif
num
==
3
:
print
((
"我爱你"
))
elif
num
==
10
:
print
(
"十全十美"
)
elif
num
==
99
:
print
(
"天长地久"
)
else
:
print
(
"你在狗叫什么?"
)
\ No newline at end of file
2.2.py
0 → 100644
View file @
8ea75886
import
turtle
pen
=
turtle
.
Pen
()
pen
.
penup
()
pen
.
goto
(
-
100
,
100
)
pen
.
pendown
()
for
i
in
range
(
4
):
pen
.
forward
(
200
)
pen
.
right
(
90
)
pen
.
penup
()
pen
.
goto
(
0
,
-
50
)
pen
.
pendown
()
pen
.
fillcolor
(
"blue"
)
pen
.
begin_fill
()
pen
.
circle
(
50
,
360
)
pen
.
end_fill
()
turtle
.
done
()
\ No newline at end of file
2.py
0 → 100644
View file @
8ea75886
import
turtle
pen
=
turtle
.
Pen
()
pen
.
penup
()
pen
.
goto
(
-
100
,
100
)
pen
.
pendown
()
for
i
in
range
(
4
):
pen
.
forward
(
200
)
pen
.
right
(
90
)
pen
.
penup
()
pen
.
goto
(
0
,
-
50
)
pen
.
pendown
()
pen
.
fillcolor
(
"blue"
)
pen
.
begin_fill
()
turtle
.
circle
(
50
,
360
)
pen
.
end_fill
()
turtle
.
done
()
3
0 → 100644
View file @
8ea75886
3.1.py
0 → 100644
View file @
8ea75886
name
=
"wln"
mm
=
"xuebi710068"
unname
=
input
(
"用户名:"
)
unmm
=
input
(
"密码:"
)
if
unname
==
name
and
unmm
==
mm
:
print
(
"登录成功"
)
else
:
print
(
"gun"
)
\ No newline at end of file
diy1.py
View file @
8ea75886
import
turtle
screen
=
turtle
.
Screen
()
screen
.
bgcolor
(
"pink"
)
lovesize
=
screen
.
textinput
(
"提示"
,
"请输入你想画的爱心大小"
)
a
=
screen
.
textinput
(
"提示"
,
"请输入你想写下的文字内容"
)
pen1
=
turtle
.
Pen
()
cd
=
int
(
input
(
"请输入你要画的爱心的长度"
))
pen1
.
pensize
(
5
)
pen1
.
pencolor
(
"red"
)
pen1
.
fillcolor
(
"red"
)
pen1
.
begin_fill
()
pen1
.
left
(
45
)
pen1
.
forward
(
2
*
cd
)
pen1
.
circle
(
cd
,
180
)
pen1
.
forward
(
2
*
int
(
lovesize
)
)
pen1
.
circle
(
int
(
lovesize
)
,
180
)
pen1
.
right
(
90
)
pen1
.
circle
(
cd
,
180
)
pen1
.
forward
(
2
*
cd
)
pen1
.
circle
(
int
(
lovesize
)
,
180
)
pen1
.
forward
(
2
*
int
(
lovesize
)
)
pen1
.
end_fill
()
pen1
.
hideturtle
()
pen
=
turtle
.
Pen
()
pen
.
penup
()
pen
.
goto
(
100
,
-
100
)
pen
.
write
(
"我爱你"
,
font
=
(
"Times"
,
30
,
"normal"
))
pen
.
write
(
a
,
font
=
(
"Times"
,
30
,
"normal"
))
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