100% found this document useful (1 vote)
128 views5 pages

Class Xii CS Practical File

This document is a practical file submitted by Dhimant Tewari of class 12A at OPG World School for the year 2023-2024. It contains an index of 27 programs completed as part of the Computer Science practical curriculum, including programs involving functions, file handling, stacks, SQL queries, and Python database connectivity. It has been certified by two examiners that Dhimant has successfully completed the prescribed practical file.
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
100% found this document useful (1 vote)
128 views5 pages

Class Xii CS Practical File

This document is a practical file submitted by Dhimant Tewari of class 12A at OPG World School for the year 2023-2024. It contains an index of 27 programs completed as part of the Computer Science practical curriculum, including programs involving functions, file handling, stacks, SQL queries, and Python database connectivity. It has been certified by two examiners that Dhimant has successfully completed the prescribed practical file.
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/ 5

COMPUTER SCIENCE

PRACTICAL FILE
(2023-2024)

OPG WORLD SCHOOL

Submitted By: -

Name: - Dhimant Tewari


Class: -
XII-A
Roll No.: - 05
CERTIFICATE
This is to certify that Dhimant Tewari of class XII-A, OPG World
School has successfully completed his practical file of Computer
Science as prescribed by CBSE in the year 2023-24 under the
guidance of Ms. Ankita Yadav.

Date:

Signature Signature
(Internal Examiner) (External Examiner)
ACKNOWLEDGEMENT
I would like to express a deep sense of thanks and gratitude to
my practical guide Ms. Ankita Yadav for guiding me
immensely through the course of the Year. She always evinced
keen interest in my work. Her constructive advice and constant
motivation have been responsible for the successful completion
of this practical file. I also thank my parents for their
motivation and support. I must thank my classmates for their
timely help and support for the compilation of this file.
INDEX
S.No Program List Page No.
Functions
1 Write a menu driven program in python language which takes an integer
number as input and as per user choice checks whether the number is a prime
number (having only 2 factors) or a palindromic number (reverse of the
number is equal to the original number).
2 Implement the following pattern in python using function pattern () take the
number of rows of the pattern as the input from the user.
*
**
***
****
*****
****
***
**
*
3 Write a short python code segment using functions that print the longest word
in the list of the word.
4 Write a program to have following functions :
(i) A function that takes a number as argument and calculates cube for it. The
function does not return a value. If there is no value passed to the function in
function call, the function should calculate cube of 2.
(ii) A function that takes two char arguments and returns True if both the
arguments are equal otherwise False.
Test both these functions by giving appropriate function call statements.
5 Write a program that generates a series using a function which takes first and
last values of the series and then generates four terms that are equidistant e.g.,
if two numbers passed are 1 and 7 then function returns 1 3 5 7.
File Handling
6 WAP to read a text file line by line and display each word separated by a #.
7 WAP to read a text file and display the number of vowels, consonants,
uppercase letters and lowercase letters.
8 Program to create binary file to store Rollno and Name, Search any Rollno and
display name if Rollno found otherwise “Rollno not found”.

9 Write a program to count the words "to" and "the" present in a text file
"Poem.txt".
10 Write a method/function DISPLAYWORDS() in python to read lines from a
text file STORY.TXT, and display those words, which are less than 4
characters.
11 A binary file “Book.dat” has structure [Book No, Book_NAME, Author, Price] .
i) Write a user defined function CreteFile() to input data for a record
and add to book.dat.
ii) Write a function CountRec(Author) in python which accepts the author
name as parameter and count and return number of books by the given
Author are stored in the binary file “Book.dat”.
12 Write a program to remove all the lines that contain the word “and” in a txt file
and write it to another txt file, also let the program read the file names from the
user.
13 Write a python program to write a nested python list to a csv file in one go.
After writing the csv file, read the csv file and display the content.
14 Program to create CSV file and store empno, name, salary and search any empno
and display name, salary and if not found appropriate message.
15 Write a program that reads a text file and creates another text file with the
same content except the lines beginning with “check”.
16 Write a function that reads a csv file and creates another csv file with the
same content, but with a different delimiter.
Stack
17 Write a menu driven program to implement a stack for these book-details
(bookno, book name). That is, now each item node contains two types of
information- a bookno and its name. Implement Push, Pop and display
operations.
18 Write a program in python to create a stack “student” with details of student
name and their marks. Write Operation for Push, Pop and Traversal
operation using menu.
SQL Queries Based on One or Two Table
19 SQL Commands: Table- empl
20 SQL Commands: Table- Patient
21 SQL Commands: Table- Books & Table- Issued
22 SQL Commands: Table- Personal & Table- Job
23 SQL Commands: Table- Stock
Python connectivity
24 Write a program to connect Python with MySQL using database connectivity
and perform the following operations on data in database: Create a table, Insert
the data, Fetch the data, update the data, and delete the data.
25 Design a python application to obtain a search criterion from the user and then
fetches records based on that from empl table.
26 Design a python program that fetches only those records from empl table of
employee database where designation is “clerk”.
27 Write a python database connectivity script that deletes records from category
table of database items that have name “stockable”.

You might also like