Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson4_6
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
294c8ca2
authored
Feb 19, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
b810c294
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
uuu.py
uuu.py
0 → 100644
View file @
294c8ca2
n
=
"python"
# 保存在服务器数据库中的用户账号(正确的账号)
p
=
"123456"
# 保存在服务器数据库中的用户密码(正确的密码)
T
=
3
# 请用input()实现用户输入账号、密码的功能
while
T
>
0
:
print
(
"你还有"
+
str
(
T
)
+
"次机会"
)
n1
=
input
(
"请输入您的账号:"
)
p1
=
input
(
"请输入您的密码:"
)
if
(
p
==
p1
and
n1
==
n
):
print
(
"主人,欢迎登陆进来!"
)
break
elif
(
p
!=
p1
and
n1
==
n
):
pass
elif
(
p
!=
p1
and
n1
!=
n
):
print
(
"您的账号错误,请重输"
)
elif
(
p
==
p1
and
n1
!=
n
):
print
(
"您的账号错误,请重输"
)
T
-=
1
if
(
T
>
0
):
print
(
"主人,欢迎登陆进来!"
)
else
:
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