Sample PRACTICAL PAPER Cs
Sample PRACTICAL PAPER Cs
Q2. Write a program in python using user defined functions to do following using functions:
Create and store name,percentage of 4 students binary file ‘a.dat’
Read the file Display the students information scoring percentage above 90.
Q3. Write a program in python using user defined functions to do following using functions:
Create and store name,percentage of 4 students csv file ‘a.csv’
Read the file Display the students information scoring percentage above 90.
Q5.Look the following Table ‘EMP and answer the questions that follows:
Now write SQL statement for (i) –(iii) and give output for iv)-(v)
i) Display the names in descending order of salary.
ii) Count the number of unique departments.
iii) Display the player name where name contains letter ‘A’ and salary above 10000.
Give output:
iv) SELECT dept,AVG(RUNS) FROM PLAYER GROUP BY dept;
v) SELECT ENAME FROM emp WHERE eNAME LIKE ‘%N%’ AND salary IS NULL;
Q6. Write a program, with separate user defined functions to perform the following operations:
● Push the keys (name of the student) of the dictionary into a stack, where the corresponding value (marks) is greater than
75.
● Pop and display the content of the stack.
Q7. Following Table ‘PLAYER in in MySQL contains below information :
CODE NAME RUNS TEAM
P1 AMIT 2500 A
P2 MAC 1101 B
P3 Rohan 500 A
P4 Sachin NULL B
Now write SQL statement for (i) –(iii) and give output for iv)-(v)
i) Display the player information in descending order of Runs.
ii) Count the number of unique teams.
iii) Display the player name where player name contains letter ‘A’
Give output:
iv) SELECT TEAM,AVG(RUNS) FROM PLAYER GROUP BY TEAM;
v) SELECT NAME FROM PLAYER WHERE NAME LIKE ‘%N’ AND RUNS IS NULL;