Grade 12 Practical Exam Paper - SET A - PB2
Grade 12 Practical Exam Paper - SET A - PB2
1. Write a program using python to get 10 players name and their score. Write the input in a csv file. Accept a
player name using python. Read the csv file to display the name and the score. If the player’s name is not found
give an appropriate message.
OR
Create a student table in SQL with attributes-sid, sname, section, gender & mark. Integrate SQL with Python by
importing the MySQL module. Display the details of students from student table in descending order of marks
from the Python script.
2. Write queries (a) to (d) based on the tables EMPLOYEE and DEPARTMENT given below:
3. Write a program to compute the total salary of the employee and also calculate the size of of the binary file
named “emplfile.dat”. The file consists of the following fields : employee number , employee name , basic salary
, allowances.
Total salary = basic + allowance
OR
Write a python function printcaps() that prints all the upper-case alphabets from a prewritten text file
alpha.txt.
Eg: for the datafile containing the following text: “India is My Country” The output should be:
M
C