Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson4_4_2
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
c017b0f7
authored
Mar 26, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
798b17e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
diy2.py
diy2.py
View file @
c017b0f7
...
...
@@ -3,9 +3,9 @@ i=3
username
=
"python"
userpassword
=
"123456"
#判断
name
=
input
(
"你账号是?"
)
while
True
:
if
i
==
3
:
name
=
input
(
"你账号是?"
)
if
i
>
-
1
:
if
name
==
username
:
password
=
input
(
"你密码是?"
)
if
password
==
userpassword
:
...
...
@@ -14,8 +14,10 @@ while True:
if
password
!=
userpassword
:
print
(
"密码错误"
+
"你还有"
+
str
(
i
)
+
"次机会"
)
i
-=
1
if
name
!=
username
:
else
:
print
(
"账户错误"
)
i
-=
1
continue
continue
else
:
print
(
"你号没了"
)
exit
()
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