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
0a38b6ae
authored
Jan 30, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
b4f212e4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
diy1.py
dslaksa.py
diy1.py
View file @
0a38b6ae
i
=
3
usern
e
me
=
"python"
usern
a
me
=
"python"
userpassword
=
"123456"
userpassword
=
"123456"
while
True
:
while
True
:
if
i
>
0
:
usersname
=
input
(
"请输入账号:"
)
usersname
=
input
(
"请输入账号:"
)
if
usersname
!=
user
name
:
if
username
!=
users
name
:
print
(
"账号错误,请重新输入"
)
print
(
"账号错误,请重新输入"
)
continue
continue
userspassword
=
input
(
"请输入密码:"
)
userspassword
=
input
(
"请输入密码:"
)
...
@@ -12,4 +13,8 @@ while True:
...
@@ -12,4 +13,8 @@ while True:
break
break
else
:
else
:
print
(
"密码错误,请重新输入"
)
print
(
"密码错误,请重新输入"
)
i
-=
1
else
:
print
(
"错误次数已超出,已冻结。"
)
exit
()
print
(
"欢迎来到贝尔编程!"
)
print
(
"欢迎来到贝尔编程!"
)
\ No newline at end of file
dslaksa.py
View file @
0a38b6ae
userneme
=
"python"
userneme
=
"python"
userpassword
=
"123456"
userpassword
=
"123456"
while
True
:
while
True
:
...
@@ -10,6 +11,9 @@ while True:
...
@@ -10,6 +11,9 @@ while True:
userspassword
=
input
(
"请输入密码:"
)
userspassword
=
input
(
"请输入密码:"
)
if
userspassword
!=
userpassword
:
if
userspassword
!=
userpassword
:
print
(
"密码错误,请重新输入"
)
print
(
"密码错误,请重新输入"
)
i
-=
1
else
:
else
:
else
:
break
break
print
(
"登陆成功,欢迎来到python世界!"
)
print
(
"登陆成功,欢迎来到python世界!"
)
\ 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