0% found this document useful (0 votes)
128 views3 pages

Class 12 CS Practical List 2024

Hi

Uploaded by

ravi642007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
128 views3 pages

Class 12 CS Practical List 2024

Hi

Uploaded by

ravi642007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

CLASS 12 CS PRACTICAL LIST 2024-NEW

1. Write a menu driven program to do the following:

1. Input a list of integers, find the minimum element in it without using built in
function.
2. Find the sum and average of elements in the list without using sum()
function
3. Double the values of odd elements and divide the even elements by 2.
2. W45rite a menu driven program to do the following:

1. Input a string and check whether its palindrome.


2. Input a string and count the no: of lowercase, uppercase, special characters
and digits present separately.
3. To count the total no: of words present in the string.
4. To print the alternate elements in the string.
3. Write a user defined function cube() to find the cube of a number inputted by
user.

4. Write a user defined function countfrequency() to count the frequencies of


elements in a dictionary.

Eg: if the list is list1=[10,20,10,20,30,10,40,10,40]

Output must be: {10: 4, 20: 2, 30: 1, 40: 2}

5. Write a user defined function randomgen() that generates random numbers


between 1 and 6 (simulates a dice).

6. Write a program in python to read a text file line by line and display each word
separated by a #. (Assume the name of the textfile as para.txt)

7. Write a function displaywords() in python to read lines from a text file story.txt
and display those words which are less than 4 characters.

8. Write a function count_is() to count the occurances of word “is” in a text file
notes.txt.

9. Write a program to read a text file and display the number of vowels/ consonants/
uppercase/ lowercase characters in the file myfile.txt.
10. Write a function in python to count and display the number of lines starting with
alphabet A present in the text file Lines.txt.

11. Write a program to remove all the words that contain the character 'a' in a text
file “myfile.txt” and write it to another file “data.txt”.

12. Write a program to create a binary file “stu.dat” with name and roll number.
Search for a given roll number and display the name, if not found display
appropriate message.

13. Write a program to create a binary file Student.dat with roll number, name and
marks. Input a roll number and update the marks.

14. A file sports.dat contains information in the following format:

Event Participant

Write a function copy_content() that would read the contents from file sports.dat
and creates a file named athletic.dat copying only those records from sports.dat
where the event name is “Atheletics”

15. Write a program in python to create a CSV file by entering user-id and password,
read and search the password for given userid.

16. Write a program in python to implement the Stack operations(push and pop).

17. SQL-1
(Create a table and insert 5 rows )
18 SQL-2
(In an existing table execute )
1. select all
2. select with condition
3. pattern matches
4. between
5. in operator
6. distinct keyword
19. SQL-3
(In an existing table execute )
1. Update
2. Alter table
3. delete
4. order by
5. group by
20. SQL-4
(In an existing table execute )
1. min()
2. max()
3. count()
4. count(*)
5. sum()
6. avg()
7. group by and having
21. Write a program in python that successfully connects to a database and executes
“Create table command”

22. Write a program in python that successfully connects to a database and executes
“insert into” and “Select command”

23. Write a program in python that successfully connects to a database and executes
“select command with condition”

24. Write a program in python that successfully connects to a database and executes
“update command”

25. Write a program in python that successfully connects to a database and executes
“delete command”

You might also like