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
9a48aeac
authored
Jun 11, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
325e9fd9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
5 deletions
diy1.py
diy1.py
View file @
9a48aeac
...
@@ -2,9 +2,29 @@ username = "迷你是垃圾" # 保存在服务器数据库中的用户账号
...
@@ -2,9 +2,29 @@ username = "迷你是垃圾" # 保存在服务器数据库中的用户账号
userpassword
=
"mn4250"
# 保存在服务器数据库中的用户密码(正确的密码)
userpassword
=
"mn4250"
# 保存在服务器数据库中的用户密码(正确的密码)
# 请用input()实现用户输入账号、密码的功能
# 请用input()实现用户输入账号、密码的功能
name
=
input
(
"输入账号:"
)
i
=
3
password
=
input
(
"输入密码:"
)
while
True
:
if
i
>
0
:
# 如果用户输入的账号、密码正确,提示登陆成功
name
=
input
(
"输入账号:"
)
if
name
==
username
and
password
==
userpassword
:
if
username
!=
name
:
print
(
"账号错误"
)
i
-=
1
print
(
"对不起,你没有登陆最好玩儿的炸图模拟器————迷你屎界"
)
continue
password
=
input
(
"输入密码:"
)
# 如果用户输入的账号、密码正确,提示登陆成功
if
name
==
username
and
password
==
userpassword
:
print
(
"输入成功"
)
print
(
"输入成功"
)
print
(
"恭喜你登陆了最好玩儿的炸图模拟器————迷你屎界,它获得了2021年年度抄袭奖"
)
break
if
name
!=
username
:
print
(
"账号错误"
)
print
(
"对不起,你没有登陆最好玩儿的炸图模拟器————迷你屎界"
)
i
-=
1
if
name
!=
userpassword
:
print
(
"密码错误"
)
print
(
"对不起,你没有登陆最好玩儿的炸图模拟器————迷你屎界"
)
i
-=
1
else
:
print
(
"没有关系,你可以玩我的世界"
)
exit
()
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