用户:
破坏查看:0 回复:0 评论:0 创建时间:2020-07-30T22:19:42
【作品展示】

【作品介绍】
插入排序
【作品源代码】
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
f = int(input())
c = [a, b, c, d, e, f]
def insert_sort(c):
count = len(c)
for i in range(1, count):
key = c[i]
j = i - 1
while j >= 0:
if c[j] > key:
c[j + 1] = c[j]
c[j] = key
j -= 1
print(c)
insert_sort(c)
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn