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
74c2f9f8
authored
Oct 05, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
41b1915f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
10 deletions
diy1.py
diy1.py
View file @
74c2f9f8
username
=
"python"
username
=
"python"
userpassword
=
"123456"
userpassword
=
"123456"
i
=
3
while
True
:
while
True
:
yourname
=
input
(
"输入"
)
if
i
>
0
:
yourpassword
=
input
(
"输入密码"
)
yourname
=
input
(
"输入"
)
if
username
==
yourname
and
userpassword
==
yourpassword
:
yourpassword
=
input
(
"输入密码"
)
print
(
"登录成功"
)
i
-=
1
break
if
username
==
yourname
and
userpassword
==
yourpassword
:
if
username
!=
yourname
:
print
(
"登录成功"
)
print
(
"用户名错误!!!!!"
)
break
continue
if
username
!=
yourname
:
if
userpassword
!=
yourpassword
:
print
(
"用户名错误!!!!!"
)
print
(
"密码!!!!!"
)
print
(
"您还有"
+
str
(
i
)
+
"次机会"
)
continue
if
userpassword
!=
yourpassword
:
print
(
"密码!!!!!"
)
print
(
"您还有"
+
str
(
i
)
+
"次机会"
)
else
:
print
(
"封号!!!!!!!!!!"
)
exit
()
print
(
"欢迎"
)
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