Professional Documents
Culture Documents
Practical List - XII 2023 24
Practical List - XII 2023 24
(A)Python Programming
(A)Python Programming
1. Program that inputs a list of numbers in a function and searches for a given element in the list using
linear search
2. Program that takes a list of values in a function and displays the sum of even values , sum of odd
values and sum of values ending with zero.
3. Program using a user defined function myMean() to calculate the mean of floating values stored in a
list.
4. Program that inputs a number (N) in a function and checks the prime number between 2 and N
5. Program using user defined function calcPow() that accepts base and exponent as arguments and
exponent
returns the value Base where Base and exponent are integers.
6. Program to that inputs a list of numbers in a function and swap elements at the even location with the
elements at the odd location.
7. Read a text file line by line and display each word separated by a #.
9. Remove all the lines that contain the character 'a' in a file and write it to another file.
10. Create a binary file with name and roll number. Search for a given roll number and display the
name, if not found display appropriate message.
11. Create a binary file marks.dat and display the records of students who scored more than 95 marks.
12. Create a binary file with roll number, name and marks. Input a roll number and update the marks.
13. Write a random number generator that generates random numbers between 1 and 6 (simulates
a dice).
15. Create a CSV file by entering user-id and password, read and search the password for given userid
(B) Data Base Management ( SQL )
Exp1.
(i)
(iii) Display the details of the students in the ascending order of fees
(iv) Display number of students in each class
(v) Increase fees value by 500
Table : Student
Exp2.
(i) Display name of 10th class student information.
(ii) Display students' name, who are paying above or equal to 3000 fees.
(iii) Display the names that start with letter "A".
(iv) Display students' information, who are paying fees between 2500 and 3500
(v) Display sum of fees for each class
Exp3
(i) Display students' information, who are paying fees between 2500 and 3500
(ii) Remove adno 444 information.
(iii) Add one new column totalfees with number (10, 2)
(iv) Increase the fees value by 100 for adno 222
(v) Display lowest and highest fees
Exp4
(i) Display students' information, who are in section A and B.
(ii) Display information of students in class 11B.
(iii) Display the details of the students in the descending order of fees
(iv) Display the sum and average of fees
(v) Change fees data type as number(12,2).
Exp5.
(i) Display 11th and 12th class students' information.
(ii) Display sum of fees for each class.
(iii) Display different classes from student table.
(iv) Increase the fees value by 100 for adno 222.
(v) Add one new column totalfees with number (10, 2)
Exp 6
In a database there are two tables - 'Brand' and 'Item' as shown below
(i) Display Iname, price and corresponding Brand name (Bname) of those items, whose price is
between 25000 and 30000 (both values inclusive)
(ii) Display ICode, Price and BName of the item, which has IName as "Television"
Exp 7.
Design a python application that fetches and displays all the records from student
table of test database.
Exp 8.
Design a python application that fetches and displays first three rows fetched from
student table of test database
Exp 9.
Design a python application that fetches and displays all the records from student table
of test database where marks greater than 70
Exp 10.
Design a python application that fetches and displays all the records from student table
of test database where marks greater than 70 and section is ‘B’