List of Practicals Class Xii 2024 25
List of Practicals Class Xii 2024 25
Write a program to perform the following operations with a string using library functions of Dictionary :
3 (i) Add an element in dictionary (ii) Display value of a key (iii) Delete key-value from dictionary which
is at the end (iv) Arrange key-value of dictionary in ascending order
Write a program to perform the following mathematical operations using math module: (i) Find Square
4 root of a number (ii) Find absolute value of a number (iii) Calculate power of a number (iv) Find ceil
and floor values of a number
Write a program to generate random numbers between 1 to 6 and check whether a user won a lottery or
5
not.
Write a function SwapNumbers( ) to swap two numbers and display the numbers before swapping and
6
after swapping.
7 Write a function FACT( ) to calculate the factorial of an integer .
Write a function NEGATIVE_LIST(L), where L is the list of elements passed as argument to the
function. The function returns another list named ‘negativelist’ that stores the negative Elements of L.
8
For example: If L contains [-21,20,-14,0,11,-33,86]
The negativelist will have - [-21,-14,-33]
Write a function SumDiv(L,x), where L is a list of integers and x is an integer; passed as arguments to
the function. The function returns the sum of elements of L which are divisible by x or x+1.
9
For example:
If L contains [10, 27, 12, 20, 22] and x is 5, then function returns 42 (10+12+20)
12 Write a program to write those lines which have the character 'p' from one text file to another text file.
13 Write a program to count number of words in a file.
14 Write a python program to write student data in a binary file.
15 Write a python program to read student data from a binary file.
16 Write a python program to modify/update student data in a binary file.
17 Write a python program to delete student data from a binary file.
18 Write a python program to search a student record in a binary file.
19 Write a program to perform read and write operation with .csv file.
S.
NAME OF PRACTICAL
No.
20 Create a CSV file by entering user-id and password, read and search the password for given userid.
Write a program to connect Python with MySQL using database connectivity and perform the following
30
operation on data in database: Update record in the table
Write a program to connect Python with MySQL using database connectivity and perform the following
31
operation on data in database: Delete record from the table