Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson4_4_2
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
03adddfe
authored
Sep 25, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
ba207fc7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
40 deletions
diy2.py
diy2.py
View file @
03adddfe
import
time
import
turtle
def
shua
():
pen
=
turtle
.
Pen
()
for
i
in
range
(
100
):
pen
.
pencolor
(
"blue"
)
print
(
" "
)
for
i
in
range
(
3
):
#exit()#退出程序
pen
.
forward
(
100
)
username
=
"python"
pen
.
left
(
120
)
userpassword
=
"123456"
pen
.
up
()
i
=
5
pen
.
goto
(
0
,
60
)
shua
()
pen
.
down
()
while
True
:
for
i
in
range
(
3
):
if
i
==
0
:
pen
.
forward
(
100
)
shua
()
pen
.
left
(
-
120
)
print
(
"五次机会已用完!"
)
turtle
.
fillcolor
(
"light blue"
)
time
.
sleep
(
1
)
pen
.
begin_fill
()
shua
()
\ No newline at end of file
asdf
=
10
for
i
in
range
(
10
):
print
(
str
(
asdf
)
+
"秒后继续"
)
time
.
sleep
(
1
)
asdf
-=
1
shua
()
i
=
5
name
=
input
(
"请输入用户名:"
)
password
=
input
(
"请输入密码:"
)
if
name
==
username
and
password
==
userpassword
:
print
(
"登录成功!"
)
break
shua
()
elif
username
!=
name
:
print
(
"用户名错误!"
)
i
-=
1
print
(
"剩余次数"
+
str
(
i
)
+
"次!"
)
elif
password
!=
userpassword
:
print
(
"密码错误!"
)
i
-=
1
print
(
"剩余次数"
+
str
(
i
)
+
"次!"
)
time
.
sleep
(
1
)
shua
()
print
(
"欢迎来到贝尔编程!"
)
\ 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