Practical File Class XII-2022-23 A
Practical File Class XII-2022-23 A
Class XII
Python Programming
Revision Tour
3.Write a Program to inset ,Delete and search data in a Queue and stack of employee
data.
4. Write a Program to inset ,Delete and search data in a Queue and stack of students
data as name, roll no. and class.
File Handling
1. Write a program to add the data in file named STU.DAT which contains Roll
No, Name & Marks.
2. Write a program to add a string in a file named STORY.DAT , read the string
and display no. of upper case and lower case letters.
3. Write a program to add a string in sequential file named Music.DAT , read the
string and display no. of characters, spaces and digits .
4. Write a program to add records in a binary file “Library.dat” and write functions
to display and search records.
5. Assume a text file “coordinate.txt” is already created. Using this file create a
function to count the number of words having first character capital.
Example: Do less Thinking and pay more attention to your heart. Do Less
Acquiring and pay more Attention to what you already have. Do Less Complaining and
pay more Attention to giving. Do Less criticizing and pay more Attention to
Complementing. Do less talking and pay more attention to SILENCE. Output will be :
Total words are 16.
6. Write a programme to store data in a csv file and display the same.
Data Structure
1. Write functions to Add ,Delete and Search element in a Stack implemented through
List.
2. Create a List of books using Stack and write functions to Insert Records in a List and
Delete record as per user’s choice.
SQL+Python
1. Design a menu driven python application to read, display, search delete and
modify data of student table stored as a sql table.
SQL
1. Write the SQL commands and output of the following:
Table: SENDER
SenderID SenderName SenderAddress SenderCity
ND01 R Jain 2,ABC Appts New Dehi
MU02 H Sinha 12 , Newtown Mumbai
MU15 S Jha 27/A , Park Street Mumbai
MD50 T Prasad 122-K, SDA New Delhi
Table: RECIPIENT
RecID SenderID RecName RecAddress RecCity
KD05 ND01 R Bajpayee 5, Central Avenue Kolkata
ND08 MU02 S Mahajan 116, A Vihar New Delhi
MU19 ND01 H Singh 2A, Andheri East Mumbai
MU32 MU15 P K Swamy B5, CS Terminus Mumbai
ND45 ND50 S Tripathi 13,BID, Mayur Vihar New Delhi
i) To display the name of all senders from Mumbai.
ii) To display the RecID, SenderName , SenderAddress , RescName , RecAddress
for every recipient.
iii) To display recipient details in ascending order of RecName.
iv) To display Number of Recipients from each city.
v) SELECT DISTINCT SenderCity FROM SENDER;
2. Write the SQL commands and output of the following:
Table: PRODUCT
P_ID ProductName ManufacturerName Price
TP 01 Talcom Powder LAK 40
FW 05 Face Wash ABC 45
BS 01 Bath Soap ABC 55
SH 06 Shampoo XYZ 120
FW 12 Face Wash XYZ 95
Table: CLIENT
C_ID ClientName City P_ID
01 Cosmetic Shop Delhi FW05
06 Total Health Mumbai BS01
12 Live Life Delhi Sh06
15 Pretty Woman Delhi FW12
16 Dreams Bengluru TP01
Table: CONSIGNEE
CneeID CnorID CneeName CneeAddress CneeCity
MU05 ND01 Rahul Kishore 5, Park Avenue Mumbai
ND08 ND02 P Dhingra 16 / J , Moore Enclave New Delhi
KO19 MU15 AP Roy 2A, Central Avenue Kolkata
MU32 ND02 S Mittal P 245, AB Colony Mumbai
ND48 MU50 BP Jain 13, Block DA Vihar New Delhi
Table: SUPPLIERS
Scode Sname
11 Rotomac
12 Nataraj
13 Rainbow
i) To display detail of all the items in the table STATIONARY in ascending order
of Qty.
ii) To display ItemNo,Item name of those items from table STATIONARY whose
Rate is more than 15.
iii) To display detail of those items whose Scode is 12 or Qty in Stationary is
more than 10 from the table STATIONARY.
iv) To display minimum Rate of items for each supplier individually as per Scode
from the table STATIONARY:
v) SELECT Rate*Qty FROM STATIONARY WHERE ItemNo = 1001;
***********