Model Practical Qp 2025
Model Practical Qp 2025
SECTION A
1. Write a Menu based python program with functions
a) add() To add details in a csv file “cricket.csv” to store information about
statistics of batsmen –playername,runsscored,matchesplayed
b) averageruns() -to read the CSV file “cricket.csv” and display the average
runs scored by each player.
Name TotalRuns Matches Average
SECTION B
1. Consider the tables given below and answer the questions that follow using MySQL:
Table: ISSUES
Book_ID Qty_Issued
L02 13
L04 5
L05 21
Table: BOOKS
(8+4+8+7+3=30 Marks)
SECTION A
1. Write a menu based python program to perform the following with the following
functions
a) To create a binary file to store information about books in the form of a list
[bookname,author,price]
b) To read the file and display those books with price >300.
SECTION B
2. Consider the tables given below and answer the questions that follow using MySQL:
Table: Employee
N Name Salary Zone Age Grade Dept
o
1 Mukul 30000 West 28 A 10
2 Kritika 35000 Centre 30 A 10
3 Naveen 32000 West 40 B 20
4 Uday 38000 North 38 C 30
5 Nupur 32000 East 26 B 20
(8+4+8+7+3=30 Marks)
SECTION A
1. Write a menu based program to implement stack operations with names of cities
and its temperature in the dictionary,
CITY={‘Chennai’:40,’Bengaluru’:34,‘Trichy’:41,’Madurai’:44,’Ooty’:27}
3. PROJECT
4. PRACTICAL RECORD
5. VIVA
(8+4+8+7+3=30 Marks)
4
SECTION A
1. Write menu based python program with functions
a) Countlines () to read the text file “notes.txt” and count the lines beginning with
“S”
b) Displayfour() to display four letter words in notes.txt.
SECTION B
2. .Consider the tables given below and answer the questions that follow using MySQL
Table: ITEMS
ID PNAME PRICE MDATE QTY
T001 Soap 12.00 11/03/2007 200
T002 Paste 39.50 23/12/2006 55
T003 Deodorant 125.00 12/06/2007 46
T004 Hair Oil 28.75 25/09/2007 325
T006 Tooth Brush 25.00 17/02/2006 455
Table: COMPANY
ID COMP City
T001 HLL Mumbai
T008 Colgate Delhi
T003 HLL Mumbai
T004 Paras Himapur
T009 Ponds Delhi
T006 Wipro Ahmedabad
I. Create and insert the records in the following tables
II. To delete the items produced before 1st Jan 2007.
Execute the queries and write output
III. To display the pname and company name which is located in city beginning with “A”
IV. To display the city name and the number of companies in the city.
3. PROJECT
4. PRACTICAL RECORD
5. VIVA
(8+4+8+7+3=30 Marks)
5
1. From a dictionary containing names and price of products as key value pair ,write a
python functions
a) Push those products in to a stack EXPENSIVE whose price is greater than 10000.If
the dictionary product contains the following data
Product={“Speaker”:1000,”Laptop”:30000,”Ac”:35000,”Monitor”:9000}
The program should make the list by pushing elements in to stack,
EXPENSIVE=[“Laptop”,”Ac”]
b)pop() the topmost element of the stack
c)Display the stack Expensive
SECTION B
1. Write Sql command for the following : 5
Table: Hospital
3. PROJECT
4. PRACTICAL RECORD
5. VIVA
(8+4+8+7+3=30 Marks)
6
SECTION A
1.Write menu based python program with functions
c) Countwords () to read the text file “notes.txt” and count the words ‘He’,’She’
separately
d) Displaylines() to display lines which begin with Vowels.
SECTION B
2.Consider the table given below and answer the questions that follow using MySQL
Table: ITEMS
ID PNAME PRICE MDATE QTY
T001 Soap 12.00 11/03/2007 200
T002 Paste 39.50 23/12/2006 55
T003 Deodorant 125.00 12/06/2007 46
T004 Hair Oil 28.75 25/09/2007 325
T006 Tooth Brush 25.00 17/02/2006 455
Write SQL Queries to perform the following
i. Create and insert records in the table ITEMS
ii. To display PNAME, PRICE * QTY only for the products manufactured in the year 2007.
iii. To increase the quantity by 20 for soap and paste.
iv. To delete the items whose price between 10 and 30
3. PROJECT
4. PRACTICAL RECORD
5. VIVA
(8+4+8+7+3=30 Marks)