cspracticalcbse.
cspracticalcbse.
CLASS-12 TH
CERTIFICATE
……………….. ………………….
Signature of Teacher Signature of External
INDEX
S.NO TOPIC SIGNATURE
To write a Python Program to Read a text file line by line
1 and display each word separated by '#'
To write a program to count the total number of vowels,
2 consonants, uppercase and lowercase words.
Remove all the lines that contain the character 'a' in a file
3 and write it to another file.
Create a binary file with name and roll number. Search for
4 a given roll number and display the name, if not found
display appropriate message
Create a binary file with roll number, name and marks.
5 Input a roll number and update the marks.
Write a random number generator that generates random
6 numbers between 1 and 6 (simulates a dice).
Write a Python program to implement a stack using list.
7
To write a Python Program to display Fibonacci Series up
8 to ‘n’ numbers.
To write a python program to determine a number is
9 prime or not.
To write a Python program to create a simulation of
10 rock,paper,scissors game.
Create a CSV file by entering user-id and password, read
11 and search the password for given userid
To write a python program to read and write a text file.
12
Write a program to find the square root of a positive
13 number, raise a custom exception when user enters a non-
integer number Code
. Write a program to take two integers and perform
14 addition of two numbers handle exception when non-
integers entered by user. Code:
To write a Python program to write and read in a csv file.
15
To write a sql query to create a database and a table.
16
To write a Python Program to integrate MYSQL with
17 Python by updating the records of table and display the
records.
To write a sql query to perform max and min function in a
18 table
To write a sql query to delete a column using alter
19 command
To write a sql query to perform distinct clause in a table.
20
To write a Python Program to integrate MYSQL with
21 Python by deleting the records of table and display the
records.
To write a Python Program to integrate MYSQL with
22 Python by inserting records to table and display the
records
To write a python program to integrate sql by searching
23 records.
Program 1
Read a text file line by line and display each word separated by a #.
Output:
Text file
Output:
Program 3
Remove all the lines that contain the character 'a' in a file and write it to another
file.
Input file:
Output file:
Program 4 ● Create a binary file with name and roll number. Search for a given
roll number and display the name, if not found display appropriate message.
Output:
Program 5:
Create a binary file with roll number, name and marks. Input a roll number and
update the marks.
Output:
Program 6
Write a random number generator that generates random numbers between 1
and 6 (simulates a dice)
Output:
Program 7
● Write a Python program to implement a stack using list
Output:
PROGRAM 8
OUTPUT:
PROGRAM 9
OUTPUT:
PROGRAM 10
OUTPUT:
Program 11
Output:
Program 12
Output:
Program 13
Program 14
Output:
Program 15
Output:
PROGRAM 16
PROGRAM 17
OUTPUT:
SQL OUTPUT:
PROGRAM 18
PROGRAM 19
PROGRAM 20
PROGRAM 21
OUTPUT:
SQL OUTPUT:
PROGRAM 20
OUTPUT:
SQL OUTPUT:
PROGRAM 21
OUTPUT:
SQL OUTPUT