Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson4_6
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
cabf1250
authored
Apr 02, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
b810c294
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
0 deletions
a.py
b.py/ab.py
diy2.py
a.py
0 → 100644
View file @
cabf1250
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 @
cabf1250
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
0 → 100644
View file @
cabf1250
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"
)
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