Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson4_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
bfcb3fde
authored
May 15, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
acbf6999
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
diy2.py
diy2.py
View file @
bfcb3fde
...
...
@@ -3,16 +3,18 @@ username = "cy"
userpassword
=
"123456"
while
True
:
if
i
>
0
:
name
=
input
(
"记得你的名字吗?
:
"
)
password
=
input
(
"记得你的密码吗?
:
"
)
name
=
input
(
"记得你的名字吗?"
)
password
=
input
(
"记得你的密码吗?"
)
i
-=
1
if
name
==
username
and
password
==
userpassword
:
print
(
"对啦!"
)
break
elif
name
!=
username
:
print
(
"你的名字错了"
)
print
(
"还有"
+
str
(
i
)
+
"次哦"
)
elif
password
!=
userpassword
:
print
(
"你的密码错了"
)
print
(
"还有"
+
str
(
i
)
+
"次哦"
)
else
:
print
(
"你应该去找别人问问"
)
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