Download as pdf or txt
Download as pdf or txt
You are on page 1of 34

ROYAL PUBLIC SENIOR SECONDARY SCHOOL

M
2023-24
ACADEMIC YEAR: 2022-23
COMPUTER SCIENCE PRACTICAL FILE ON PYTHON
AND MYSQL

Submitted To- Submitted By-


SUMAN
Mrs. Anita Mishra Name- SURYANSH
MAM
A3
Class- XII A1

Roll No.- 36
NON
Stream- Medical
MEDICAL
Subject- Computer
Science(083)
CERTIFICATE

This is to certify that Miss.___________


SURYANSH of XII class, Royal Public

Senior Secondary School, Wazirpur has completed this project

file under my supervision.

She
He has taken keen interest and shown utmost sincerity

in completion of this project. She has successfully completed the

project file of Computer Science up to my satisfaction.

Signature of Internal Signature of External


Examiner Examiner
ACKNOWLEDGEMENT

I would like to express my gratitude to my project guide Mrs. Anita


suman

malik for guiding me immensely through the course of the


Mishra

project. She always evinced a keen interest in my work. Her

constructive advice and constant motivation have been responsible

for the successful completion of this project.

My sincere thanks go to Dr. Vijay Singh Chauhan, our Principal

sir, for his coordination in extending every possible support for the

completion of this project.

I also thank my parents for their motivation and support. I must

thank to my classmates for their timely help and support for the

compilation of this project.

Last but not the least, I would like to thank those who had helped

directly or indirectly towards the completion of this project.


SUBMISSION

This report is submitted as a part of a project examination included in

curriculum of CBSE for all India Senior Secondary Examination to be

held in the year 2022-23.


2023-2024
INDEX
S.NO. PROGRAMS REMARKS
1. WAP a program to read a text file line by
line and display each word separated by
“#”.
2. WAP to read a text file and display the
number of vowels, consonants, uppercase
and lowercase characters in the file.
3. WAP to remove all the lines that contain the
character “a” in a file and write it to another
file.
4. WAP to create a binary file with name and
roll no., search for a given roll no. and
display the name (if not found display
appropriate message).
5. WAP to create a binary file with roll no.,
name and marks, input a roll no. and update
the marks.
6. WAP to create a CSV file by entering user
id and password, read and search the
password for the given user id.
7. WAP of random number generator that
generate random numbers between 1 and 6
(simulates a dice).
8. WAP to calculate simple interest using
function INSERT () that can receive
principal amount, time, rate and return the
simple interest. Do specific default value for
rate and time as 10% and five years
respectively.
9. WAP a program to find the factorial of a
given number using function.
10. WAP to find the area and perimeter of circle
using user defined module.
11. WAP to read a text file ‘india.txt’ and display
those words which having exactly four
characters.
12. WAP for implementation of stack using list.
13. WAP to implement a stack for these book
details (book number, book name)
implement push, pop and display operation.
14. WAP to create a table EMPLOYEE with the
following structure and display the structure
after creation.
15. WAP to insert five records into the table
EMPLOYEE and display the table contents
after insertion.
16. WAP to display the details of employee in
ascending order of their salary.
17. WAP to connect with database, insert
record entered by the user in a table and
display all the records.
18. WAP to search the record in mysql table
using python, if not found display
appropriate message.
19. WAP to update the record in mysql table
using python, if not found display
appropriate message.
20. WAP a program to delete the particular
record in mysql table using python.
1. WAP a program to read a text file line by line and
display each word separated by “#”. Source Code-

Output-

Source File-
2. WAP to read a text file and display the number of vowels,
consonants, uppercase and lowercase characters in the
file.
Source Code-

Output-

Source File-
3. WAP to remove all the lines that contain the character “a”
in a file and write it to another file.
Source Code-

Output-
Before-

After-
4. WAP to create a binary file with name and roll no.,
search for a given roll no. and display the name (if not
found display appropriate message). Source Code-
Output-
5. WAP to create a binary file with roll no., name and
marks, input a roll no. and update the marks.
Source Code-
Output-
6. WAP to create a CSV file by entering user id and
password, read and search the password for the given user
id.
Source Code-
Output-
7. WAP of random number generator that generate random
numbers between 1 and 6 (simulates a dice).

Source Code-

Output-
8. WAP to calculate simple interest using function INSERT
() that can receive principal amount, time, rate and return
the simple interest. Do specific default value for rate and
time as 10% and five years respectively.

Source Code-

Output-
9. WAP a program to find the factorial of a given number
using function.

Source Code-

Output-
10. WAP to find the area and perimeter of circle using user
defined module.

Source Code-

Output-

Module used in this program-


11. WAP to read a text file ‘india.txt’ and display those
words which having exactly four characters.

Source Code-

Output-
12. WAP for implementation of stack using list.

Source Code-
Output-
13. WAP to implement a stack for these book details (book
number, book name) implement push, pop and display
operation.
Source Code-
Output-
14. WAP to create a table EMPLOYEE with the
following structure and display the structure after
creation.

Source Code-

Outpur-
15. WAP to insert five records into the table
EMPLOYEE and display the table contents after
insertion.

Source Code-

Output-
16. WAP to display the details of employee in
ascending order of their salary.

Source Code-

Output-
17. WAP to connect with database, insert record
entered by the user in a table and display all the
records.

Source Code-
Output-
18. WAP to search the record in mysql table using python,
if not found display appropriate message.

Source Code-

Output-
19. WAP to update the record in mysql table using python,
if not found display appropriate message.

Source Code-

Output-

Checking of updation-
20. WAP a program to delete the particular record in mysql
table using python.

Source Code-

Output-

You might also like