0% found this document useful (0 votes)
5 views2 pages

Class XII Computer Science Practical Guide

Uploaded by

sazidtyagi123
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)
5 views2 pages

Class XII Computer Science Practical Guide

Uploaded by

sazidtyagi123
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

Class XII Computer Science (083) Practical File (Session

2025–26)
📘 Part A: Python Programs (20 Programs)

File Handling (Text, Binary, CSV)

1. Read a text file line by line and display each word separated by a #.
2. Count vowels, consonants, uppercase, and lowercase letters in a text file.
3. Remove all lines containing the character 'a' and write remaining lines to another file.
4. Create a binary file with names and roll numbers, then search for a roll number.
5. Create a binary file with roll number, name, and marks; update marks for a given roll
number.
6. Create a CSV file with user-id and password; search the password for a given user-id.
7. Write data into a CSV file and display its contents.
8. Program to copy content from one file to another.

Functions and Exception Handling

9. Program to calculate factorial using recursion.


10. Program to handle division by zero using try–except.
11. Program to check if a number is prime using a user-defined function.
12. Program to display Fibonacci sequence using recursion.

Data Structures – Stack

13. Implement a stack using list with push() and pop() operations.
14. Program to check if a string is palindrome using stack logic.

Random & Miscellaneous

15. Simulate a dice roll using random module.


16. Generate random passwords of given length.

CSV/Binary Applications

17. Program to maintain student record (Roll no, Name, Marks) using CSV file.
18. Count number of records in binary file.

Combined / Integrated Tasks

19. Program to display the top 3 students from a marks file.


20. Merge contents of two text files into one.

Part B: SQL Queries (10 Questions)


Assume a table Student(Admno INT PRIMARY KEY, Name VARCHAR(20), Class INT, Marks
INT, Grade CHAR(2))

1. Display all records from the Student table.


2. Display names and marks of students with marks greater than 75.
3. Display all students in ascending order of Name.
4. Display the average marks of students in each class using GROUP BY.
5. Update marks of a student where Admno = 101.
6. Delete records where marks < 40.
7. Add a new column Address VARCHAR(30) in the Student table.
8. Display count of students having grade 'A'.
9. Display maximum and minimum marks from Student table.
10. Display names of students whose name starts with 'A'.

Part C: Python–MySQL Connectivity (5 Programs)

(Use [Link] module)

1. Insert Record: Python program to insert new student details into the database.
2. Display Records: Program to fetch and display all records from Student table.
3. Search Record: Program to search a student by Admission number.
4. Update Marks: Program to update marks for a specific student.
5. Delete Record: Program to delete a record from Student table based on admission
number.

You might also like