Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson4_5
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
dde49a1d
authored
Oct 15, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
70ca84f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
1.py
1.py
View file @
dde49a1d
username
=
'python'
password
=
'123456'
num
=
3
while
True
:
if
num
>
0
:
input__name
=
input
(
"输入用户名:"
)
input_password
=
input
(
"输入密码“"
)
if
input__name
!=
username
:
print
(
"用户名错误,请输入正确的用户名!"
)
continue
elif
input_password
!=
password
:
num
-=
1
print
(
"密码错误,请输入正确密码! 还有"
+
str
(
num
)
+
"次机会"
)
continue
else
:
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