Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson3-5-2_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
9d708ce3
authored
Dec 11, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
3aa250a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
7 deletions
bug.py
bug.py
View file @
9d708ce3
username
=
"dream"
userpassword
=
"340111019013"
a
=
input
(
"请输入账号:"
)
b
=
input
(
"请输入密码:"
)
if
a
==
username
and
b
==
userpassword
:
print
(
"密码正确,登录成功"
)
else
:
print
(
"密码错误,登录失败"
)
\ No newline at end of file
i
=
3
while
True
:
if
i
>
0
:
a
=
input
(
"请输入账号:"
)
b
=
input
(
"请输入密码:"
)
if
a
==
username
and
b
==
userpassword
:
print
(
"密码正确,登录成功"
)
break
i
=
i
-
1
if
a
!=
username
:
print
(
"用户名错误,重新输入"
)
print
(
"温馨提示:你还有"
+
str
(
i
)
+
"几次机会"
)
continue
if
b
!=
userpassword
:
print
(
"密码错误,重新输入"
)
print
(
"温馨提示:你还有"
+
str
(
i
)
+
"几次机会"
)
else
:
print
(
"账户已被锁定,请携带相关证件来公司申诉"
)
exit
()
i
-=
1
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