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
55d885cb
authored
May 04, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
12052e64
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
22 deletions
diy1.py
diy1.py
View file @
55d885cb
import
turtle
pen
=
turtle
.
Pen
()
pen
.
pencolor
(
"red"
)
pen
.
pensize
(
10
)
screen
=
turtle
.
Screen
()
screen
.
bgcolor
(
"light pink"
)
len
=
screen
.
textinput
(
"你想要多大的爱心"
,
"20到50"
)
pen
.
fillcolor
(
"red"
)
pen
.
begin_fill
()
pen
.
left
(
45
)
pen
.
forward
(
len
)
pen
.
circle
(
len
,
180
)
pen
.
right
(
90
)
pen
.
circle
(
len
,
180
)
pen
.
forward
(
len
)
pen
.
penup
()
pen
.
forward
(
100
)
pen
.
pendown
()
pen
.
write
(
"你,聪明的,
\n
告诉我,
\n
什么是快乐星球?"
,
font
=
(
"Times"
,
30
,
"normal"
))
pen
.
end_fill
()
pen
.
hideturtle
()
turtle
.
done
()
zhanghu
=
py
mima
=
20090418
name
=
print
(
"请输入你的账户名:"
)
ma
=
print
(
"请输入密码:"
)
a
=
3
while
True
:
if
name
==
zhanghu
and
ma
==
mima
:
print
(
"账户名正确"
)
print
(
"密码正确"
)
print
(
"登陆成功!"
)
break
else
:
print
(
"登陆失败"
)
a
=
a
-
1
if
a
==
0
:
print
(
"请稍后再试"
)
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