Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson4_1
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
eaa7b9b5
authored
Dec 24, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
7f1e4ec2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
diy1.py
diy1.py
View file @
eaa7b9b5
...
@@ -3,7 +3,7 @@ d= "123456" # 保存在服务器数据库中的用户密码(正确的密码
...
@@ -3,7 +3,7 @@ d= "123456" # 保存在服务器数据库中的用户密码(正确的密码
w
=
"0"
w
=
"0"
i
=
"0"
i
=
"0"
import
turtle
import
turtle
while
not
u
==
w
and
not
d
=
=
i
:
while
u
!=
w
or
d
!
=
i
:
w
=
input
(
"账号:"
)
w
=
input
(
"账号:"
)
i
=
input
(
"密码:"
)
i
=
input
(
"密码:"
)
# 请用input()实现用户输入账号、密码的功能
# 请用input()实现用户输入账号、密码的功能
...
@@ -11,7 +11,14 @@ while not u==w and not d==i:
...
@@ -11,7 +11,14 @@ while not u==w and not d==i:
print
(
"登陆成功!"
)
print
(
"登陆成功!"
)
print
(
"欢迎来到贝尔编程!"
)
print
(
"欢迎来到贝尔编程!"
)
p
=
turtle
.
Pen
()
p
=
turtle
.
Pen
()
p
.
write
(
"欢迎你!创造师!
\n
快和我一起进入奇妙的编程世界吧!"
)
p
.
hideturtle
()
turtle
.
done
()
turtle
.
done
()
else
:
else
:
print
(
"账号或密码错误!"
)
if
u
!=
w
and
d
!=
i
:
print
(
"账号和密码错误!"
)
if
u
!=
w
and
d
==
i
:
print
(
"账号输入错误!"
)
if
u
==
w
and
d
!=
i
:
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