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
962ae25c
authored
Apr 13, 2025
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
884e846f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
11 deletions
diy1.py
diy1.py
View file @
962ae25c
username
=
"
python
"
# 保存在服务器数据库中的用户账号(正确的账号)
username
=
"
666666
"
# 保存在服务器数据库中的用户账号(正确的账号)
userpassword1
=
"123456"
# 保存在服务器数据库中的用户密码(正确的密码)
userpassword1
=
"123456"
# 保存在服务器数据库中的用户密码(正确的密码)
userpassword2
=
"244466666"
userpassword2
=
"244466666"
userpassword3
=
" "
userpassword3
=
" "
userpassword4
=
"12345,上山打老虎"
userpassword4
=
"12345,上山打老虎"
w
=
input
(
"账号"
)
userpassword5
=
"666666"
e
=
input
(
"密码"
)
i
=
5
# 请用input()实现用户输入账号、密码的功能
# 请用input()实现用户输入账号、密码的功能
if
w
==
username
and
e
==
userpassword1
:
while
True
:
r
=
input
(
"密码"
)
if
i
>
0
:
if
r
==
userpassword2
:
w
=
input
(
"账号"
)
t
=
input
(
"密码"
)
e
=
input
(
"密码"
)
if
t
==
userpassword3
:
if
w
==
username
and
e
==
userpassword1
:
y
=
input
(
"密码"
)
r
=
input
(
"密码"
)
if
y
==
userpassword4
:
if
r
==
userpassword2
:
print
(
"登陆成功"
)
t
=
input
(
"密码"
)
if
t
==
userpassword3
:
y
=
input
(
"密码"
)
if
y
==
userpassword4
:
u
=
input
(
"密码"
)
if
u
==
userpassword5
:
print
(
"登陆成功"
)
break
else
:
if
u
!=
userpassword4
:
print
(
"密码错误"
)
i
-=
1
else
:
if
y
!=
userpassword4
:
print
(
"密码错误"
)
i
-=
1
else
:
if
t
!=
userpassword3
:
print
(
"密码错误"
)
i
-=
1
else
:
if
r
!=
userpassword2
:
print
(
"密码错误"
)
i
-=
1
else
:
if
w
!=
username
:
print
(
"用户名错误"
)
i
-=
1
continue
if
e
!=
userpassword1
:
print
(
"密码错误"
)
i
-=
1
else
:
print
(
"你的银行卡已被冻结,请立即拿着你的身份证到我们公司解冻"
)
exit
()
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