GD GOENKA SCHOOL
DWARKA SEC - 10
COMPUTER SCIENCE
PRACTICAL FILE
SESSION: 2025-2026
COMPUTER SCIENCE (083)
TOPIC:- Python Programming and SQL
SUBMITTED BY: MALLAIKA ARORA
CLASS: 12-A1
ROLL NO: _____________________
1

ACKNOWLEDGEMENT
I wish to express my deep sense of gratitude and
indebtedness to our learned teacher
Ms. Leena Malhotra, PGT COMPUTER SCIENCE,
G.D Goenka Public School, Dwarka
for her invaluable help, advice and guidance in
the preparation of this project.
I am also greatly indebted to our
Principal Ms. Anita Khosla
school authorities for providing me with the
facilities and requisite laboratory conditions for making
this practical file.
I also extend my thanks to a number of teachers, my
classmates and friends who helped me to complete this
practical file successfully.
2

CERTIFICATE
This is to certify that Mallaika Arora of class XII
has completed her Computer Science project
under the guidance of her teacher for the
academic year 2024-2025.
The certified student has been dedicated through-
out her research and completed her work before
the given deadline without missing any important
details from the project.
It is also certified that this project is the individ-
ual work of the student and can be submitted for
evaluation.
Total number of practical certified are: 24
Internal Examiner External Examiner
Date: School Seal Principal
3

INDEX
Name Pag Date Signature
S. e
N no.
o
PYTHON PROGRAMS
1 Creating a menu driven program to 6 4/4/25
perform arithmetic operations.
2 Creating a python program to display 7 4/425
Fibonacci series
3 Creating a menu driven program to find 8 6/4/25
factorial and sum of list of numbers using
function.
4 Creating a python program to 9 14/4/25
implement returning value(s) from
function.
5 Creating a python program to implement 10 15/4/25
mathematical functions.
6 Creating a python program to generate 11 15/4/25
random number between 1 to 6
7 Creating a python program to read a text 12 30/4/24
file line by line and display each word
separated by '#'.
8 Creating a python program to read a text 13 30/4/25
file and display the number of vowels/
consonants/lower case/upper case
characters.
9 Creating python program to display short 14 11/5/25
words from a text file
10 Creating a python program to copy 15 11/5/25
particular lines of a text file into another
text file.
11 Creating a python program to create 16 20/5/25
and search records in binary file.
12 Creating a python program to create and 18 20/5/25
update/modify records in binary file.
4

Name Pag Date Signature
S. e
N no.
o
13 Creating a python program to create 20 2/6/25
and search employee’s record in csv
file.
14 Creating a python program to implement 22 3/7/25
stack operations (List).
15 Creating a python program to 24 3/7/25
implement stack operations
(Dictionary).
PYTHON-SQL CONNECTIVITY
16 Creating a python program to integrate 26 11/8/25
MYSQL with Python (Creating database
and table)
17 Creating a python program to integrate 28 15/8/25
MYSQL with Python (Inserting
records and displaying records)
18 Creating a python program to integrate 30 20/8/25
MYSQL with Python (Searching and
displaying records)
19 Creating a python program to integrate 31 21/8/25
MYSQL with Python (Updating
records)
SQL QUERIES
20 SQL COMMANDS EXERCISE – 1 32 23/8/25
21 SQL COMMANDS EXERCISE – 2 33 23/8/25
22 SQL COMMANDS EXERCISE – 3 35 28/8/25
23 SQL COMMANDS EXERCISE – 4 37 2/9/25
24 SQL COMMANDS EXERCISE – 5 39 2/9/25
5

PYTHON PROGRAMS
1. Creating a menu driven program to perform arithmetic
Operations.
————————————————-INPUT————————————————-
———————————————OUTPUT————————————————-
6
6

2. Creating a python program to display Fibonacci series.
————————————————-INPUT————————————————-
————————————————OUTPUT————————————————-
7

3. Creating a menu driven program to find factorial and sum of
list of numbers using function.
————————————————-INPUT————————————————-
————————————————OUTPUT————————————————-
8 8

4. Creating a python program to implement returning values
from function.
————————————————-INPUT————————————————-
————————————————OUTPUT————————————————-
9

5. Creating a python program to implement mathematical
functions.
————————————————-INPUT————————————————-
————————————————OUTPUT————————————————-
10

6. Creating a python program to generate random numbers be-
tween 1 to 6.
————————————————-INPUT————————————————-
————————————————OUTPUT————————————————-
11

7. Creating a python program to read a text file line by line and
display each word separated by “#”.
————————————————-INPUT————————————————-
TEXT FILE-
————————————————OUTPUT————————————————-
12

8.Creating a python program to read a text file and display the
number of vowels/consonants/lower case/ upper case charac-
ters.
————————————————-INPUT————————————————-
————————————————OUTPUT————————————————-
13

9.Creating a python program to display short words from a
text file.
————————————————-INPUT————————————————-
————————————————OUTPUT————————————————-
14

10.Creating a python program to copy particular lines of a text
file into another text file.
————————————————-INPUT————————————————-
————————————————OUTPUT————————————————-
FILE:-
15
15

11.Creating a python program to create and search records in
binary file.
————————————————-INPUT————————————————-
16

————————————————OUTPUT————————————————-
17

12.Creating a python program to create and update/modify
records in binary file.
————————————————-INPUT—————————————————
18
18

————————————————OUTPUT————————————————
19

13.Creating a python program to create and search employ-
ee’s record in csv file.
————————————————-INPUT—————————————————
20

————————————————OUTPUT————————————————
21

14.Creating a python program to implement stack
operations(list).
————————————————-INPUT—————————————————
22

————————————————OUTPUT————————————————
23

15.Creating a python program to implement stack
operations(dictionary).
————————————————-INPUT—————————————————
24 24

————————————————OUTPUT————————————————
25

PYTHON- MY SQL CONNECTIVITY PROGRAMS
16.Creating a python program to integrate MYSQL with python
(creating database and table).
——————————————INPUT————————————————
26

——————————————OUTPUT———————————————
27

17.Creating a python program to integrate MYSQL with python
(inserting & displaying records ).
——————————————INPUT————————————————
28

——————————————OUTPUT———————————————
29

18.Creating a python program to integrate MYSQL with python
(searching & displaying records ).
——————————————INPUT————————————————
——————————————OUTPUT———————————————
30

19.Creating a python program to integrate MYSQL with python
(update & delete records ).
——————————————INPUT————————————————
——————————————OUTPUT———————————————
31

SQL COMMAND EXERCISE
20. To write Queries for the following questions based on the
given table:
32

21. To write Queries for the following questions based on the given
table:
33

34

22. To write Queries for the following questions based on the given
table:
35

36

23. To write Queries for the following questions based on the given
table:
37

38

24. To write Queries for the following questions based on the given
table:
39

40