Bubble Sort Program to sort a list March 01, 2020 aList=[15,6,13,22,3,52,2] print("original List is:",aList) n=len(aList) 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) Share Get link Facebook X Pinterest Email Other Apps Labels Practical File Program Python Share Get link Facebook X Pinterest Email Other Apps Comments
Write a program to remove all the lines that contain the character ‘a’ in a file and write it to another file. February 08, 2020 Read more
Write a program to show the use of recursion in calculation of power. February 08, 2020 #Program to show the use of recursion in calculation of power. #Code #power a to b using recursion 6_4 Read more
Factorial of a number November 19, 2019 Q:1 Write a program to Calculate the factorial of the inputted numbers. Program: 1: Read more
Comments
Post a Comment