Xii Cs 24 Practical List
Xii Cs 24 Practical List
Programming in Python:
1 Write a python program to search first occurrence of an element in a
list by using Linear search and display frequency of each element
present in list [List and search element should be entered by user]
3 Write a python program using function to pass list to a function and
double the odd values and half even values of a list and display list
element after changing.
5 Write a menu driven program in python to delete name of a student
from
Dictionary and to search phone no of a student-by-student name.
Create menu as below:
******MENU*******
1. Delete from Dictionary
2. Search Phone number using name from Dictionary
3. Exit
7 Write a program to read a list of n integers (positive as well as
negative). Create two new lists, one having all positive numbers with
sum and the other having all negative numbers with sum from the
given list.
10 Write a program in python to Read a text file line by line and print it.
11 Write a program in python To copy the contents of one file to
another
12 Write a program to write those lines which have the character 'p'
from one
text file to another text file.
13 Write a python program to find the number of words in a text file?
14 Program to read the content of file line by line and write it to another file except for the lines
contains ‘a’ letter in it
15 A python program to count all the line having 'a' as first character
16 A python program to find occurrence of any word in a string
17 Program to read and display file content line by line with each word separated by ‘#’
18 Program to read the content of file and display the total number of consonants, uppercase,
vowels and lower-case characters‟
19 Write a Python Program to write and read contents in a binary file
20 Write a Python Program to append data and display the contents of a a binary file using
dictionary
21 Program to create binary file to store Rollno and Name, Search any Rollno and display
name if Rollno found otherwise “Rollno not found”
22 Program to create binary file to store Rollno,Name and Marks and update marks of entered
Rollno
23 Write a Python Program to write and read contents in a CSV File
24 Program to create CSV file and store empno, name, salary and search any empno and
display name, salary and if not found appropriate Message.
25 Write a menu driven python code to push, pop and display book number, book name in a
stack.
26 Write a program to push and pop the keys of the dictionary into a stack on the basis of
the values >75 from the dictionary.
27 Program to connect with MYSQL database and store record of employee Table and display
records.
28 Program to connect with MYSQL database and search employee number in the table
employee and display record, if empno not found display appropriate message..
29 Write a program of database connectivity of Python with MySQL. Program will store the
data entered by the user in a table named as 'library'.library table has following attributes
bookid
title
author
price
30 Write a database connectivity program python with MySQL to update the records in a table
‘Library’