Computer Science, asked by XxYatashixX, 2 months ago

OUTPUT OF PY.THON C.O.D.E

alist=[15,6,13,22,3,52,2]
print ("origianl list is :",alist)
n=len(alist)
#tranverse through all list elements
for i in range(n):
for j in range(0,n-i-1):
if alist[j]>alist[j+1]:
alist[j],alist[j+1]=alist[j+1],alist[j]
print("list after sorting:",alist)

"SPAM WILL BE REPORTED"

Answers

Answered by Anonymous
2

Answer:

After Running Above Python C.ode Output is given in the Attachment. . .

Attachments:
Answered by Anonymous
0

Explanation:

alist=[15,6,13,22,3,52,2]

print ("origianl list is :",alist)

n=len(alist)

#tranverse through all list elements

for i in range(n):

for j in range(0,n-i-1):

if alist[j]>alist[j+1]:

alist[j],alist[j+1]=alist[j+1],alist[j]

print("list after sorting:",alist)

Similar questions