**Python Programming Lab**

**List of Experiments**

- Compute The GCD Of Two Numbers
- Find The Square Root Of A Number (Newton’s Method)
- Exponentiation (Power Of A Number)
- Find The Maximum Of A List Of Numbers
- Linear Search And Binary Search
- Selection Sort, Insertion Sort
- Merge Sort
- First N Prime Numbers
- Multiply Matrices
- Programs That Take Command Line Arguments (Word Count)
- Find The Most Frequent Words In A Text Read From A File
- Simulate Elliptical Orbits In Pygame
- Simulate Bouncing Ball Using Pygame

**Beyond The Syllabus**

- Bubble Sort
- Basics of Turtle Graphics Using Python

**C Lab**

**List of Experiments**

- Programs using I/O statements and expressions.
- Programs using decision-making constructs.
- Write a program to find whether the given year is leap year or Not? (Hint: not every centurion year is a leap. For example 1700, 1800 and 1900 is not a leap year)
- Design a calculator to perform the operations, namely, addition, subtraction, multiplication, division and square of a number.
- Check whether a given number is Armstrong number or not?
- Given a set of numbers like <10, 36, 54, 89, 12, 27>, find sum of weights based on the following conditions.

5 if it is a perfect cube.

4 if it is a multiple of 4 and divisible by 6.

3 if it is a prime number.

Sort the numbers based on the weight in the increasing order as shown below <10,its weight>,<36,its weight><89,its weight> - Populate an array with height of persons and find how many persons are above the average height.
- Populate a two dimensional array with height and weight of persons and compute the Body Mass Index of the individuals
- Given a string ―a$bcd./fg‖ find its reverse without changing the position of special characters.

(Example input:a@gh%;j and output:j@hg%;a) - Convert the given decimal number into binary, octal and hexadecimal numbers using user defined functions
- From a given paragraph perform the following using built-in functions:

a. Find the total number of words. b. Capitalize the first word of each sentence. c. Replace a given word with another word. - Solve towers of Hanoi using recursion
- Sort the list of numbers using pass by reference
- Generate salary slip of employees using structures and pointers
- Compute internal marks of students for five different subjects using structures and functions.
- Insert, update, delete and append telephone details of an individual or a company into a telephone directory using random access file.
- Count the number of account holders whose balance is less than the minimum balance using sequential access file.
- Mini project

Create a ―”Railway reservation system” with the following modules

a) Booking b) Availability checking c) Cancellation d) Prepare chart

**Beyond The Syllabus**

- Program to find standard deviation
- Program to find the ASCII value of a Character
- Program to calculate the Power of a Number using Recursion

System Configuration |
1. Intel Core2Duo Processor 2. 2GB RAM |

Software Details |
Python, C Compiler |

Operating System |
Windows 7 |