Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson9_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
5811a2d7
authored
Dec 17, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
21504d7b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
1.py/1.py
lkjj.py
1.py/1.py
View file @
5811a2d7
i
=
3
i
=
3
x
=
3
username
=
"666"
username
=
"666"
userpassword
=
"123456"
userpassword
=
"123456"
while
True
:
while
True
:
if
i
>
0
:
if
i
>
0
and
x
>
0
:
name
=
input
(
"请输入用户名"
)
name
=
input
(
"请输入用户名"
)
password
=
input
(
"请输入密码"
)
password
=
input
(
"请输入密码"
)
i
-=
1
i
-=
1
x
-=
1
if
name
==
username
and
password
==
userpassword
:
if
name
==
username
and
password
==
userpassword
:
print
(
"登录成功"
)
print
(
"登录成功"
)
break
break
if
name
!=
username
:
el
if
name
!=
username
:
print
(
"用户名错误"
)
print
(
"用户名错误"
)
continue
else
:
if
password
!=
userpassword
:
print
(
"密码错误"
)
print
(
"密码错误"
)
continue
print
(
"还剩2次"
)
else
:
else
:
print
(
"您的账号以被锁定,请查证身份"
)
print
(
"您的账号以被锁定,请查证身份"
)
break
break
\ No newline at end of file
lkjj.py
View file @
5811a2d7
...
@@ -4,7 +4,7 @@ s3={"yu":100,"shu":100,"ying":100}
...
@@ -4,7 +4,7 @@ s3={"yu":100,"shu":100,"ying":100}
s
=
{
"wu"
:
s1
,
"n"
:
s2
,
"叶文彬"
:
s3
}
s
=
{
"wu"
:
s1
,
"n"
:
s2
,
"叶文彬"
:
s3
}
while
True
:
while
True
:
name
=
input
(
"name""退出按a"
)
name
=
input
(
"name""退出按a"
)
sss
if
name
in
s
:
if
name
in
s
:
a
=
s
[
name
]
a
=
s
[
name
]
...
...
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