Full Test-1
Full Test-1
Full Test-1
General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A has 18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has 03 Long Answer type questions carrying 05 marks each.
7. Section E has 02 questions carrying 04 marks each. One internal choice is given in
Q35
against Part-C only
8. All programming questions are to be answered using Python Language only.
25 Write the full forms of DDL and DML. Write any two commands of DML 2
in SQL.
(OR)
What is the use of GROUP BY clause? Give example.
SECTION-C
26. Consider the following tables: CONSIGNOR and CONSIGNEE 3
Table: CONSIGNOR
27 Write a function Show_words( ) in python to read the content of a text file 3
‘NOTES.TXT” and display the entire content in capital letters.
Example if the file contains:
“This is a test file”
Then the function should display the output as:
THIS IS A TEST FILE
(OR)
Write a function countmy( ) in python to read the text file “DATA.TXT”
and count the number of times “my” occurs in the file.
For example if the file “DATA.TXT” contains:
“This is my website. I have displayed my preferences in the CHOICE
section”
The countmy( ) function should display the output as : “my occurs 2 times”
28 Consider the following tables WORKER and PAYLEVEL and answer the following 3
parts of this question:
Table: WORKER
CODE NAME DESIG PLEVEL DOJ DOB
11 Radhe Shyam Supervisor P001 13-09-2004 23-08-1981
12 Chander Nath Operator P003 22-02-2010 12-07-1987
13 Fizza Operator P003 14-06-2009 14-10-1983
15 Ameen Ahmed Mechanic P002 19-12-2005 13-03-1983
18 Sanya Clerk P002 19-12-2005 09-06-1983
Table: PAYLEVEL
PLEVEL PAY ALLOWANCE
P001 26000 12000
P002 22000 10000
P003 12000 6000
Give the output for the following SQL queries:
(i) SELECT COUNT(PLEVEL), PLEVEL FROM WORKER GROUP BY PLEVEL;
(ii) SELECT MAX(DOB), MIN(DOJ) FROM WORKER;
(iii) SELECT Name, Pay FROM WORKER W, PAYLEVEL
P
29 WHERE 3
W.PLEVEL=P.PLEVEL AND W.CODE<13;
30 Write a function stats( ) to read all the lines except that line start with 3
“M” form f1.Txt file and copies into f2. Txt file . Give sample output also.
Write Addnew(Book) and Remove(Book) functions in python to add a
new book and remove a book from a List of books, considering them to
act as PUSH and POP operations of the data structure Stack.
(OR)
Write a function called letter_freq(my_list) that takes one parameter, a list
of strings(mylist) and returns a dictionary where the keys are the letters
from mylist and the values are the number of times that letter appears in the
mylist, e.g.,if the passed list is as:
S.N wlist=list(“aaaaabbbbcccdde”) then it should return a dictionary MARKS
O as{‘a’:5,’b’:4,’c’:3,’d’:2,’e’:1} 5
31 SECTION-D
Learn Together is an educational NGO. It is setting up its new campus at
Jabalpur for its web-based activities. The campus has four compounds
as shown in the diagram below:
return enum
print(evn([‘a’,’b’,’r’,’a’,’c’,’a’,’d’,’a’,’b’,’r’,’a’]))