0% found this document useful (0 votes)
37 views33 pages

Computer Science Practical File 2025-26

The document is a practical file for Computer Science submitted by Harshit Bharti, a Class 12 student, detailing various Python and SQL programs. It includes a certificate of completion, acknowledgments, and an index of practicals covering topics such as Python programming, SQL commands, and Python-MySQL connectivity. The file serves as a comprehensive record of the student's work and learning under the guidance of their teacher, Mr. Saroj Pal.

Uploaded by

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

Computer Science Practical File 2025-26

The document is a practical file for Computer Science submitted by Harshit Bharti, a Class 12 student, detailing various Python and SQL programs. It includes a certificate of completion, acknowledgments, and an index of practicals covering topics such as Python programming, SQL commands, and Python-MySQL connectivity. The file serves as a comprehensive record of the student's work and learning under the guidance of their teacher, Mr. Saroj Pal.

Uploaded by

bhartiharsh020
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SANDILA LIONS PUBLIC

SCHOOL

PRACTICAL FILE
COMPUTER SCIENCE (083)
SESSION: 2025 -26
SUBMITTED TO: SUBMITTED BY:
Mr. SAROJ PAL HARSHIT BHARTI
CS TEACHER CLASS: 12th (PCM)
CERTIFICATE
This is to certify that Harshit Bharti
student of Class 12th [PCM] has
successfully completed their Computer
Science Practical File on “Python,
MYSQL and Connectivity with Python
and MYSQL Programs” under the
guidance of Mr. SAROJ PAL.

Internal Examiner External Examiner


SIGNATURE SIGNATURE

PRINCIPAL Sign. Seal


Acknowledgement
I would like to express my sincere gratitude to my
Computer Science teacher, Mr. SAROJ PAL, for
their invaluable guidance, support, and motivation
throughout the preparation of this practical file.
Their expertise and constant encouragement were
instrumental in helping me understand and
complete all the practical.
I am also deeply thankful to our Principal, Mr.
PARSHANT NIGAM, and the school authorities
for providing the necessary facilities and a
conducive environment to carry out this work.
I would also like to thank my parents and friends for
their continuous support, encouragement.
This project would not have been possible without
their help and support.
HARSHIT BHARTI
CLASS 12th [PCM]
INDEX
[Link]. PRACTICALS
1. PART:A (PYTHON PROGRAM)
 Program to count capital letter, small
later, spaces etc. from string.
 Program to Sum of digits using function.
 Take a list of integer from user and
remove multiple of 5 from the list.
 Program to input marks of 5 subjects and
print percentage and grade.
 Program to check whether a year is a leap
year.
 Program to input N numbers into a list
and print largest and smallest value.
 Factorial of number using recursion
(user-defined function).
 Program to accept a string and display
whether it is a palindrome.
 To create A to E pattern with one
character increased in every line using
nested loop.
 Read a text file line by line and display
each word separated by #.
 To remove all lines that contain character
'a' in a file and write it to another file.
 Create a binary file with name, roll
number, class $ marks search for a roll no.
 Update marks in binary file, search for a
roll no.
 Write a Python program to implement a
stack using list.
 Create a CSV file by entering user-id and
password, read and search the password
for given userid.
PART:B (SQL PROGRAMS)
 Create a SLPS table and insert data
implement the following SQL commands.
1. Creating database and use it.
2. Creating table and display it.
3. Using Insert and Alter command.
4. Deleting column.
 Perform SELECT, UPDATE and DELETE
operations.
 Use ORDER BY clause (Ascending and
Descending).
 Use MAX () and MIN () functions with nested
queries.
 Use ALTER command to modify table structure.
 Use GROUP BY and HAVING functions,
 Use aggregate functions (COUNT, SUM, AVG,
MAX, DISTINCT).
 Perform NATURAL JOIN and EQUI JOIN
operations.
PART:C (PYTHON-SQL CONNECTIVITY
PROGRAMS )
 Create MYSQL database and table for
Python-MYSQL connectivity.
 Program to connect Python with MYSQL
using database connectivity.
 Program to take input from user and insert
records into MYSQL table.
 Program to display records from MYSQL
table using Python.
 Program to execute parameterized queries
using Python and MYSQL.
PART-A [PYTHON PROGRAMS]
 Program to count capital letter, small,
later, spaces etc from string.

 OUTPUT-
 Program to Sum of digits using
function.

 OUTPUT-
 Take a list of integer from user and
remove multiple of 5 from the list.

 OUTPUT-

 Program to input marks of 5 subjects


and print percentage and grade.
 OUTPUT-

 Program to check whether a year is a


leap year.

 OUTPUT-
 Program to input N numbers into a list
and print largest and smallest value.

 OUTPUT-
 Factorial of number using recursion
(user-defined function)

 OUTPUT-

 Program to accept a string and display


whether it is a palindrome.
 OUTPUT-

 To create A to E pattern with one


character increased in every line using
nested loop.

 OUTPUT-
 Read a text file line by line and display
each word separated by a #
CONTENT

 OUTPUT-
 To remove all lines that contain
character 'a' in a file and write it to
another file.

 OUTPUT-
 Create a binary file with name , roll
number , class $ marks search for a
roll no..
 OUTPUT-

 Update marks in binary file , search


for a roll no..
 OUTPUT-

 Write a Python program to implement


a stack using list.
 OUTPUT-

 Create a CSV file by entering user-id


and password, read and search the
password for given userid.
CSV FILE>>>
 OUTPUT-
PART-B [SQL PROGRAMS]
 Create SLPS table and insert data.
Implement the following SQL
commands on the SLPS table.
1. CREATING DATABASE:

2. Use Database and insert Data:

3. ABOUT TABLE:
4. Insert information and display table:

5. Using alter table command :


DELETING COLUMN—

 Implement the following SQL


commands on given SLPS table.
Given SLPS table in the database:
1. UPDATE (To modify data):

2. ORDER BY (To display data in


ascending and descending order):
ASCENDING
DESCENDING ORDER

3. DELETE (To remove tuple):

4. Using MAX () and MIN () function


with NESTED QUERIES:
Using MAX() function

Using MIN() function

 This program is based on modify table


using following queries:
1. ALTER (To modify column).
2. UPDATE (To update records).
3. Using HAVING Function.
4. Using GROUP BY Function.
1. ALTER (to modify column):

2. UPDATE (To update record and


display it):
3. Using Having Function:

4. Using GROUP BY Function:

 This program is based on ‘Aggregate


funtions’ like:
 COUNT FUNCTION
 SUM FUNCTION
 AVERAGE FUNCTION
 MAX AND DISTINCT FUNCTION
1. Using the COUNT function:

2. Using SUM function:

3. Using AVG function:


4. Using MAX function:

5. Using DISTINCT function:

 This program is based on two given


tables:
 USE DATABASE
 SHOW TABLES
 JOIN THE TABLES USING NATURAL
JOIN
 JOIN THE TABLE USING EQUI JOIN
1. >>>Using database:

2. >>>Displaying tables:
3. >>>Join the tables using ‘NATURAL
JOIN’:

4. >>>Join the tables using ‘EQUI


JOIN’:
I am able to complete my practical file
successfully with the help of my
classmates and under the guidance of
our computer science teacher and with
the help of following:
 NCERT CS TEXTBOOK CLASS 12
 SUPPORTIVE MATERIAL ON THE
CBSE WEBSITE
 CS WITH PYTHON BY SUMMITA
ARORA
THANK YOU……

You might also like