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
6ddeaf9f
authored
Oct 07, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
2c16130d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
5 deletions
diy1.py
不要删除
斯莱特林.py
diy1.py
View file @
6ddeaf9f
...
@@ -3,11 +3,6 @@ userpassword = "1" # 保存在服务器数据库中的用户密码(正确
...
@@ -3,11 +3,6 @@ userpassword = "1" # 保存在服务器数据库中的用户密码(正确
while
True
:
while
True
:
name
=
input
(
"亲,输入账号:"
)
name
=
input
(
"亲,输入账号:"
)
password
=
input
(
"亲,输入密码:"
)
password
=
input
(
"亲,输入密码:"
)
if
name
==
username
and
password
==
userpassword
:
print
(
"登录成功"
)
break
print
(
"请重新输入:"
)
print
(
"欢迎来到格兰芬多公共休息室"
)
# 请用input()实现用户输入账号、密码的功能
# 请用input()实现用户输入账号、密码的功能
...
...
不要删除
0 → 100644
View file @
6ddeaf9f
++ "b/\344\270\215\350\246\201\345\210\240\351\231\244"
斯莱特林.py
0 → 100644
View file @
6ddeaf9f
i
=
5
i
=
5
username
=
"2"
# 保存在服务器数据库中的用户账号(正确的账号)
userpassword
=
"1"
# 保存在服务器数据库中的用户密码(正确的密码)
while
True
:
if
i
>
0
name
=
input
(
"亲,输入账号:"
)
i
=
i
-
1
if
name
!=
username
:
print
(
"账号错误"
)
shishi
=
str
(
i
)
print
(
"你还有"
+
shishi
+
"机会"
)
continue
password
=
input
(
"亲,输入密码:"
)
if
password
!=
userpassword
:
print
(
"密码错误"
)
if
name
==
username
and
password
==
userpassword
:
print
(
"登录成功"
)
break
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