Practical Sample Paper - B Informatics Practices
Practical Sample Paper - B Informatics Practices
INFORMATICS PRACTICES
Q1 . Write a program in python to create the following Data Frame named “df” storing the
following details:-
a. Display Teacher name , subject and salary for all TGT Teachers 1
b. Add a row for a PRT Teacher.(take your own data), print the Data Frame now 1
c. Create a CSV file from the above data frame named Teacher.csv 1
d. Add a new column Bonus which is 15% of their Salary. Print the Data Frame now. 1
e. Now plot a multi line chart depicting the Teacher name on x-axis and their
corresponding salary and bonus on y-axis, with appropriate Graph title , x-axis title , y-
axis title , gridlines , legends and color etc 2
Total=8
Q2. Create the table Teacher with above data given in the above Data Frame and define first
column as Tid(which is row index label in the df) as primary key , (bonus column is not required
here).Feed all records in the Table from Tid 101 to 106. Now answer the following SQL queries:-
a. Count and display how many male teachers are there as TGT 1
b. Display number of teachers and their average salary for each post (but only for PGT and
TGT) 1
c. Add a new column as ‘contact_no’ in the table teacher 1
d. Increase the salary of PGT by 15% 1
e. Display details of Teachers seniority wise according to date of joining(Sr to Jr) 1
Total =7