computer science
computer science
Science Practical
Programs
For Grade – X I [2024-2025]
Code – 083
Name: Ishika
Class: XII SCI. Roll
Number: 17
Iwish toexpress my deep senseof gratitude and
indebtedness to our learned teacher
Mrs. Neetu Saini , Vishal International
Schoolfor herinvaluable help, advice,
andguidance in the preparation of this project. I
amalso greatly indebtedto our principal Mrs.
Sunita Bhan and school authorities
for providing me with the facilities andrequisite
laboratory conditions for making this practical
file. Ialsoextendmy thanks toseveral teachers,
my classmates andfriends who helped
metocomplete this practical file successfully.
Ishika Thakur
This is to certify that Ishika Thakur student of
Class XII (A), VISHAL INTERNATIONAL
SCHOOL has completed the practical file
during the academic year 2024 – 2025
towards partial fulfilment of credit for the
Computer Science practical evaluation
of CBSE - 2025 and submitted
satisfactory report, as compiled in the
following pages, under my supervision.
School stamp
Seria PROGRAMS SIGNATUR
l E
No.
1. Creatinga python programto display Fibonacci series.
8. Remove all the lines that contain the character `a' in a file and write
it to another file.
10. Read a text file to print the frequency of the word ‘ He’
and ‘
She’ found
inthe file.
11. Create a binary file with name and roll number. Search for a
given ro l number anddisplaythename, ifnotfound
displayappropriate message.
12. Create a binary file with ro l number, name and marks. Input a roll
number andupdatethemarks.
14. Create a CSV file by entering user-id and password, read and
search the password forgiven userid.
18. Queries for Aggregate functions- SUM(), AVG(), MIN( ), MAX( ), COUNT()
Output:-
2. Creating a menu driven programto find factorial and sumof list of numbers using function.
Output :-
3. Creating apython programtoimplementreturning value(s)fromfunction.
Output :-
Output :-
Output :-
8. Remove all the lines that contain thecharacter `a' inafile andwriteittoanother file.
Output :-
9. Write aprogramtocreatea text file andprint the lines starting with‘ T’ or‘
P’ .
(Bothuppercaseandlowercase).
Output :-
10. Read atextfiletoprintthefrequencyof the word‘ He’ and ‘ She’ foundin thefile.
Output :-
11. Createa binaryfile with nameand roll number. Search foragiven roll number
anddisplaythe name, ifnotfound displayappropriate message.
Output :-
12. Create abinaryfilewith roll number, nameandmarks. Inputa roll number and
updatethe marks.
Output :-
Output :-
Output:-
Queries using[group by]
Output :-
Output :-
Output:-
18. Queries forAggregatefunctions-SUM( ), AVG( ),MIN(), MAX(),
COUNT(). Ans –
Output :-
Output :-
Output :-
(iv) -Returns themaximumvalueof a column.
Output :-
Output:-
Output :-
19. WAP toconnectPython with MySQL using database
connectivityandperform thefollowing operation on dataindatabase:
Createa tableindatabase.
Output :-
If thetablealreadyexists