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
d6d54859
authored
Feb 11, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
9441c4b3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
15 deletions
a.py
b.py/ab.py
diy2.py
a.py
0 → 100644
View file @
d6d54859
def
dd
(
d
):
for
i
in
range
(
0
,
len
(
d
)
-
1
):
for
j
in
range
(
i
+
1
,
len
(
d
)):
if
d
[
i
]
<
d
[
j
]:
d
[
i
],
d
[
j
]
=
d
[
j
],
d
[
i
]
b
=
len
(
d
)
-
1
d
[
b
]
=
d
[
b
]
+
1
print
(
d
)
dd
([])
\ No newline at end of file
b.py/ab.py
0 → 100644
View file @
d6d54859
while
True
:
x
=
input
(
"x="
)
a
=
len
(
x
)
b
=
a
//
2
for
i
in
range
(
b
):
if
x
[
i
]
==
x
[
a
-
i
-
1
]:
c
=
1
else
:
c
=
0
if
c
==
1
:
print
(
"true"
)
else
:
print
(
"false"
)
\ No newline at end of file
diy2.py
View file @
d6d54859
username
=
"python"
userpassword
=
"123456"
while
True
:
while
True
:
if
i
>
0
:
x
=
input
(
"x="
)
name
=
input
(
"请输入用户名:"
)
a
=
len
(
x
)
password
=
input
(
"请输入密码:"
)
b
=
a
//
2
if
name
!=
username
:
for
i
in
range
(
b
):
print
(
"重输"
)
if
x
[
i
]
==
x
[
a
-
i
-
1
]:
elif
password
!=
userpassword
:
c
=
1
print
(
"重输"
)
else
:
else
name
==
username
and
password
==
userpassword
:
c
=
0
break
if
c
==
1
:
print
(
"登录成功!"
)
print
(
"true"
)
print
(
"用户名和密码错误!请重新输入"
)
else
:
else
:
exit
()
print
(
"false"
)
print
(
"欢迎来到贝尔编程!"
)
def
dd
(
d
):
for
i
in
range
(
0
,
len
(
d
)
-
1
):
for
j
in
range
(
i
+
1
,
len
(
d
)):
if
d
[
i
]
<
d
[
j
]:
d
[
i
],
d
[
j
]
=
d
[
j
],
d
[
i
]
b
=
len
(
d
)
-
1
d
[
b
]
=
d
[
b
]
+
1
print
(
d
)
dd
([
1
,
5
,
9
,
3
,
6
])
\ 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