You are on page 1of 14

GRADE-12

COMPUTER SCIENCE (083)


PRACTICAL FILE
SESSION-2023-24

SUBMITTED TO: SUBMITTED BY:


MS.SHIVATI JASROTIA DISHA SHARMA
GRADE-12th NON MEDICAL
ROLL NO-
Index
No. Practical name Page no Signature
1. Write a program to calculate Simple Interest using a
function Interest() that can receive principal amount, time
and rate and return the calculated simple interest. Do
specify default values from rate and time as 10% and 2 year
respectively.
2. Program to read the content and display total number of
consonant, vowels, upper case and lower case characters.
3. Program to read the content line by line and write it to
another file except for the lines that contain the letter a in
it.
4. Program to create binary file to store Roll No and Name.
Search any Roll No and display the message “Roll No is
found” otherwise print message “Roll No not found”
5. Program to create binary file to store rollno, name and
marks and update the marks for the rollno entered.
6. Program to generate random number between 1 to 6,
simulating a dice
7. Program to implement Stack in python using a List.
8. Create a CSV file by entering user id and password, read
and search the password for the given user id.
9. Create a database MySql using python program; perform all
the operation with reference to table ‘students’ through
MySql and Python connectivity.
10. Program to read and display file content line by line with
each word separated by #
Program1. Write a program to calculate Simple Interest using a function
Interest() that can receive principal amount, time and rate and return
the calculated simple interest. Do specify default values from rate and
time as 10% and 2 year respectively.

CODE-

OUTPUT-
Program2. Program to read the content and display total number of
consonant, vowels, upper case and lower case characters.

CODE-

OUTPUT-

NOTE- If the original content of file is:

abcdefghijklmnopqrstuvwxyz

ABCDEFGHIJKLMNOPQRSTUVWXYZ
Program3. Program to read the content line by line and write it to
another file except for the lines that contain the letter ‘a’ in it.

CODE-

OUTPUT-

Note- If the original content of file is:

Letter 'd' is a wonderful letter.

it is impossible to think of a sentence without it


Program4. Program to create binary file to store Roll No and Name.
Search any Roll No and display the message “Roll No is found” otherwise
print message “Roll No not found”

CODE-

OUTPUT-
Program5. Program to create binary file to store rollno, name and marks
and update the marks for the rollno entered.

CODE-

OUTPUT-
Program6. Program to generate random number between 1 to 6,
simulating a dice

CODE-

OUTPUT-
Program7. Program to implement Stack in python using a List.

CODE-
OUTPUT-
Program 8. Create a CSV file by entering user id and password, read and
search the password for the given user id.

CODE-

OUTPUT-
Program 9. Create a database MySql using python program; perform all
the operation with reference to table ‘students’ through MySql and
Python connectivity.

CODE-
OUTPUT-

NOTE-

The database created


Program 10. Program to read and display file content line by line with
each word separated by “#”.

CODE-

OUTPUT:

NOTE- If the original content of file is:

Letter 'd' is a wonderful letter.

it is impossible to think of a sentence without it

You might also like