QUESTIONs For COMPUTER SCIENCE PRACTICALS
QUESTIONs For COMPUTER SCIENCE PRACTICALS
1. Write a python program to read a text file line by line and display each word
separated by '#'. (8)
2. Write SQL queries to do the following: Table:Student (4)
2. Write sql queries for the following table. TABLE : HOSIPTAL (4)
NO NAME AGE DEPARTMENT DOA CHARGES SEX
1 SANDEEP 65 SURGERY 23/02/98 300 M
2 RAVINA 24 ORTHOPEDIC 20/01/98 200 F
3 KARAN 45 ORTHOPEDIC 19/02/98 200 M
4 TARUN 12 SURGERY 01/04/98 300 M
5 ZUBIN 36 ENT 12/02/98 250 M
6 KETAKI 16 ENT 24/02/98 300 F
7 ANKITA 29 CARDIOLOGY 20/02/98 800 F
INTERIORS
No ItemName Type DateofStock Price
1 Red Rose Double Bed 23/02/2009 16000
2 Soft Touch Baby cot 25/09/2010 11000
3 Lion King Office Table 30/03/2010 5000
4 Royal Tiger Office Table 15/09/2010 7000
5 Park Sitting Sofa 15/10/2011 8000
6 Dine Paradise Dining Table 19/03/2011 9000
i. To list the ItemName whose Type is Office Table.
ii. To display a report listing ItemName, Type and Price in descending
order of Price.
iii. To count the number of ItemName.
iv. To insert a new row in the table INTERIORS.
7, ‘Comfort Zone’,’Double Bed’,’23/03/2011′, 15000
SET G
1. Write a python program to create a binary file with roll number and name.
Search for a given roll number and display the name, if not found display
appropriate message. (8)
2. Consider the table PRODUCT given below. Write commands in MySQL for (a) to
(d) . (4)
PRODUCT
No Product_Name Brand_Name Qty Price
1 Mixer Grinder Maharaja 5 1250
2 Washing Machine Whirlpool 10 8500
3 Microwave Oven Philips 6 8700
4 Vacuum Cleaner Eureka Forbs 2 7400
5 Dish Washer Maharaja 5 12500
STUDENT
No Name Class Stream Aggmarks Grade
1 Anubhav Gupta XII Science 84 A2
2 Prateek Jaiswal XII Commerce 92 A1
3 Amit Agarwal XI Commerce 76 B1
4 Mayank Agarwal XII Humanities 85 A2
5 Shaileb Khandelwal XI Commerce 89 A2
6 Junius Pereira XII Science 84 A2