You are on page 1of 5

Class XII (CS)

(Session 2022-23)

Subject Name with code: (083) Computer Science

Details of Practical Examination:

Maximum Marks: 30

Sno Area Marks


1. Lab Test:
1. Python program (60% logic + 20% documentation + 20% code 7
quality) 5
2. Small Python program that sends a SQL query to a database Total=12
and displays the result. A stub program can be provided.

2. Report file: Minimum 25 Python programs based on syllabus , 7


Out of this at least 4 programs should send SQL commands to a
database and retrieve the result .
3. Project (using concepts learnt in Classes 11 and 12) 8
Term – 1 : Synopsis of the project to be submitted by the students
(documentation only, may not submit the code during Term - 1)
4. Viva voce 3
5. TOTAL 30marks

Order of the points required in practical file:

1. AIM : means the problem, which you are going to solve

2. CODING : actual code in Python (print out of code)

3. OUTPUT : output of the program on sample data (screenshot)


Practical List :

S.NO. AIM
1 Write a program to show entered string is a palindrome or not.
2 Write a program to show statistics of characters in the given line(to counts the number
of alphabets ,digits, uppercase, lowercase, spaces and other characters).
3 WAP to remove all odd numbers from the list entered by user.
4 Write a program to display frequencies of all the element of a list.

5 Write a program to display those string which are starting with ‘A’ from the given
list.
6 Write a program to swap the content with next value, if it is divisible by 7 so that the
resultant array will look like : 3,5,21,6,8,14,3,14.
7 Write a program to input name of ‘n’ countries and their capital and currency store, it
in a dictionary and display in tabular form also search and display for a particular
country.
8 Write a program to call great func() to find greater out of entered two numbers, using
import command.
9 Write a random number generator that generates random numbers between 1 and 6
(simulates a dice). Throw the two dices for 10 times and print their total.

10 Write a program to show and count the number of words in a text file ‘DATA.TXT’
which is starting/ended with an word ‘The’, ‘the’.
11 Write a program to read data from a text file DATA.TXT, and display each word with
number of vowels and consonants.
12 Write a program to read data from a text file DATA.TXT, and display word which
have maximum/minimum characters.
13 Write a program to create a text file and print the lines starting with ‘T’ or ‘P’. (Both
uppercase and lowercase).
14 Consider a binary file “Emp.bin” containing details such as empno:
ename:salary(separator‘:’).Write a python function to display details of those
employees who are earning between 20000 and 40000.
15 Create a binary file with roll number, name and marks. Input a roll number and update
the marks.
16 Read a CSV file (containing item no, name, rate, QOH) from hard disc and print all
the items whose rate is between Rs 500 and Rs 1000.
17 Create a CSV file by entering user-id and password, read and search the password for
given userid.
18 Julie has created a dictionary containing names and marks as key value pairs of 6
students. Write a program, with separate user defined functions to perform the
following operations:
● Push the keys (name of the student) of the dictionary into a stack, where the
corresponding value (marks) is greater than 75.
● Pop and display the content of the stack.
19 Raghav has created a vocabulary list. You need to help him create a program with
separate user defined functions to perform the following operations based on this list.
(a) Traverse the content of the list and push the entries having less than 7 characters
into a stack.
(b) Pop and display the content of the stack.
For example: If the sample content of the list is as follows:
W=[‘Elucidate’,’Haughty’,’Pacify’,’Quip’,’Rapport’,’Urbane’,’Young’,’Zenith’]
Sample output of the code should be:Pacify, Quip, Urbane,Young, Zenith
20 Write a program A company having a dictionary of various Departments and Number
of Computers (PC) available as key-value pairs.Write a program, with
separate user defined functions to perform the following operations:
(a) Push the keys (name of the department) of the dictionary into the stack where the
corresponding value (number of PC) is 25 or more.
(b) Pop and display the content of the stack.
For eg: setup={“HR”:10,”QUALITY”:25,”SUPPORT”:50,
”PRODUCTION”:20,”SUPPLY”:25}
Then the output should be: QUALITY SUPPORT SUPPLY
21 Alam has a list containing 10 integers. You need to help him create a program with
separate user defined functions to perform the following operations based on this list.
● Traverse the content of the list and push the even numbers into a stack.
● Pop and display the content of the stack.
For Example:
If the sample Content of the list is as follows:
N=[12, 13, 34, 56, 21, 79, 98, 22, 35, 38]
Sample Output of the code should be: 2 98 56 34 12
22 In MySql, Create a database named SGNPS, under this database create table named
STUDENT with admno,name,class,sec,rno,address. Insert two rows of data. Write
Python program to establish connection to database, update record with new values for
the entered admno.
23 Write a Program to show database connectivity of python with MySQL database to
perform insertion , updation , deletion and retrieval .

More Programs:

1. Write a program to print the Fibonacci series using function.

2. Write a function in python, which accept a list of names as argument and return total number
of palindrome names. Use the same function to test the code.

3. Write a function in python, which accept a list of marks of students and return the minimum
mark, maximum mark and the average marks. Use the same function to test.

4. Write a program to show elements of a two dimensional list in a 2-d array format.

5. Write a program to show all non -prime numbers in the entered range .

6. Read a text file to print the frequency of the vowels separately.

7. Read a text file to print the frequency of the word ‘He’ and ‘She’ found in the file.

8. Read a text file line by line and display each word separated by a #
9.Read a text file and display the number of vowels/ consonants/uppercase/ lowercase
characters in the file.

10. 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.

11. Read a file and remove all the words that contain the character `p' in word. Print the content
of the file on the screen.

13. Write a Program to enter values in python using dataFrames and show these values/rows in
4 different excel files .

14. Write a Program to read CSV file and show its data in python using dataFrames and
pandas.

You might also like