Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson5_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
2350cd71
authored
Aug 04, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
289f1f34
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
23 deletions
1.py
1.py
View file @
2350cd71
a
=
10
# username="abcd"
username
=
"abcd"
# while True:
userpassword
=
"147258"
# name=input("请输入账号")
while
True
:
# password=input("请输入密码")
if
a
>
0
:
# if name==username and password==userpassword:
name
=
input
(
"请输入你的账号"
)
# print("登陆成功")
password
=
input
(
"请输入你的密码"
)
# break
a
-=
1
# if name!=
if
name
==
username
and
password
==
userpassword
:
print
(
"登录成功"
)
# if
break
if
name
!=
username
:
# print("欢迎")
print
(
"账号错误"
)
print
(
"温馨提醒,你还有"
+
str
(
a
)
+
"次"
)
# num=0
continue
# while num<20:
if
password
!=
userpassword
:
# if num%2==1:
print
(
"密码错误"
)
# print(num)
print
(
"温馨提醒,你还有"
+
str
(
a
)
+
"次"
)
# num+=1
else
:
\ No newline at end of file
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