Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson11_2
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
db4c625a
authored
Apr 15, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
d958d16c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
func.py
func.py
View file @
db4c625a
#total = []
list1
=
[
12
,
34
,
45
,
6
,
77
,
8997
,
5
,
12.4556
]
def
x
():
for
j
in
range
(
0
,
len
(
list1
)
-
1
):
#while True:
for
i
in
range
(
j
,
len
(
list1
)):
try
:
if
list1
[
i
]
>
list1
[
j
]:
int
(
input
(
"请输入:"
))
list1
[
i
],
list1
[
j
]
=
list1
[
j
],
list1
[
i
]
except
:
print
(
list1
)
print
(
"请输入整数"
)
else
:
print
()
print
(
"程序结束"
)
x
()
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