Python Lab Manual Cse Format
Python Lab Manual Cse Format
ANDREWS INSTITUTE
OF TECHNOLOGY & MANAGEMENT
Bachelor of Technology
A Practical File
Subject Code-LC-CSE-215G
ROLL
NO.:
St. Andrews Institute of Technology
& Management, Gurugram
Department
of…………………………… Practical
Average Marks
SOURCE CODE
import math
gcd_value = math.gcd(a, b)
return gcd_value
# Example numbers
num1 = 60
num2 = 48
OUTPUT
Program 2: Find the square root of a number Newton‘s method)
SOURCE CODE
OUTPUT
⮚ Program 3: Exponentiation (power of a number)
SOURCE CODE
OUTPUT
⮚ Program 4: Find the maximum of a list of numbers
SOURCE CODE
OUTPUT
⮚ Program 5: Linear search and Binary search
LINEAR SEARCH
SOURCE CODE
OUTPUT
BINARY SEARCH
SOURCE CODE
OUTPUT
⮚ Program 6: Selection sort, Insertion sort
SELECTION SORT
SOURCE CODE
OUTPUT
INSERTION SORT
SOURCE CODE
OUTPUT
⮚ Program 7: Merge sort
SOURCE CODE
OUTPUT
⮚ Program 8: First n prime numbers
SOURCE CODE
OUTPUT
⮚ Program 9: Multiply matrices
SOURCE CODE
OUTPUT
⮚ Program 10: Programs that take command line arguments (word
count)
SOURCE CODE
OUTPUT
⮚ Program 11: Find the most frequent words in a text read from a
file
SOURCE CODE
OUTPUT
⮚ Program 12: Simulate elliptical orbits in Pygame
SOURCE CODE
OUTPUT
⮚ Program 13: Simulate bouncing ball using Pygame
SOURCE CODE
OUTPUT