0% found this document useful (0 votes)
64 views

PGT-CS_Question Paper

Question paper for PGT-CS

Uploaded by

Prashant Mishra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views

PGT-CS_Question Paper

Question paper for PGT-CS

Uploaded by

Prashant Mishra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Teachers Eligibility Test

Candidate’s Name:_____________ PGT-Computer Science Time Allowed: 1𝟏⁄𝟐 𝒉𝒐𝒖𝒓𝒔


-------------------------------------------------------------------------------------------------------------------------------------------------

1. What will be the result of the following Boolean expression?


NOT True OR False AND True
a) True c) No result
b) Error in Expression d) False

2. Which Boolean expression is correct interpretation of the following logic circuit?

3. Which of the following represents Absorption law correctly?


a) X+Y.Z = (X+Y).(X+Z) c) (X+Y)’ = X’ Y’
b) X+X.Y = X d) (X..X)’ = X’
4. Which of the following is exact equivalent of given binary number in Octal number?
(101110001011)2
a) (232023)8 c) (5613)8
b) (A8A)8 d) (3165)8
5. Which of the following is an example of a very strong password?
a) STRONG c) admin
b) Abc1234 d) Ap9#2@cQ
6. Which of the following is an invalid IP address?
a) 100.0.10.32 c) 192.168.10.15
b) 255.255.255.10 d) 256.10.12.5
7. Which of the following is not an application of AI?
a) Chat Bot c) Driverless Car
b) Financial Accounting System d) Face Recognition System
8. Which of the following is an invalid identifier in Python programming language?
a) none c) true
b) False d) For
9. Which of the following is not a valid operator in Python?
a) = = c) / /
b) = > d) * *
10. Evaluate the following expression:
not True or not False and False
a) True c) None
b) False d) will generate an Error.
11. Identify the correct output of the following Python program segment?
Pi=3.141592
print(‘%d4f’ %Pi)
a) 3.14 c) 3.1416
b) 3.1415 d) 3.0000
12. Which of the following is immutable data type in Python?
a) Set c) Tuple
b) List d) Dictionary
13. If we have 2 Python lists as follow:
List1=[10,20,30]
List2=[40,50,60]
If we want to generate a list List3 as
List3= [10,20,30,40,50,60]
Then best Python command out of the following is:
a) List3 = List1 + List2 c) List3 = List1.update(List2)
b) List3 = List1.append(List2) d) List3 = List1.extend(List2)
14. Identify the correct output of the following Python code:
L-13, 3, 2, 2, 1, 11
L.append(L.pop(L.pop()))
print(L)
a) [3,2,2,1,3] c) [1,3,2,2,1]
b) [3,3,2,2,3] d) [1,1,2,2,3,3]
15. Find the output of the following Python code:
L1 = [1,4,3,2]
L2 = L1
L1.sort()
print(L2)
a) [1,4,3,2] c) 1 4 3 2
b) [1,2,3,4] d) 1 2 3 4
16. If PL is Python list as follow:
PL = [‘Basic’, ‘C’, ‘C++’]
Then what will be the status of the list PL after
PL.sort(reverse = True) ?
a) [‘Basic’,’C’,’C++’] c) [‘C’,’C++’,’Basic’]
b) [’C++’,’C’,‘Basic’] d) [‘Basic’,’C++’,’C’]
17. Identify the correct output of the following Python program.
CHARR = [[‘A’,’B’],[‘C’,’D’],[‘E’,’F’]]
print(CHARR [1][1])
a) ‘A’ c) ‘C’
b) ‘B’ d) ‘D’
18. The following Python list S is implemented as a stack.
S=[10, 12, 0, 4, 6]
If 10 is the element added (pushed) last into the stack S, which command from the following option is
best to remove (pop) an element from the Stack S, if not empty.
a) S.pop(0) c) S.remove( )
b) S.pop( ) d) S.remove(0)
19. Traditionally the end of a stack from where PUSH(additional) and POP(deletion) take place, of
popularly known as :
a) FRONT c) LIFO
b) TOP d) FIFO
20. Identify the correct output of the Python code :
L1 = [1,2,3]
L2 = [4,5]
L3 = [6,7]
L1. extend(L2)
L1.append(L3)
print(L1)
a) [1,2,3,4,5,6,7] c) [1,2,3,4,5,[6,7]]
b) [1,2,3,[4,5],6,7] d) [1,2,3,[4,5],[6,7]]
21. Identify the correct output of the Python code:
TUP ([1, 2], [3, 4], [5, 6])
TUP[2] [1]-8
print(TUP)
a) ([1, 2], [8, 4], [5, 6]) c) ([1, 2], [3, 4], [5, 8])
b) ([1, 2], [3, 4], [8, 6]) d) will generate an error as a Tuple is immutable
22. Identify the output of the following Python program segment:
S = ‘Python Programming’
L=S.split()
S=’,’.join(L)
print(S)
a) Python Programming c) ,Python Programming,
b) Python, Programming d) ,Python, Programming,
23. Suppose a Python tuple TUP is declared as
TUP = (‘A’,’B’,’C’)
Which of the following command is invalid ?
a) TUP = (‘D’) c) TUP += (‘D’)
b) TUP = (‘D’,) d) TUP += (‘D’,)
23. Select the correct output of the given Python code from the following options :
S = ‘INDIAN’
L=S.Partition(‘N’)
NS = L[0]+’-’+L[1]+’-’+L[2]
print(NS)
a) I – N – DIA – N – c) I – DIAN
b) I – DIA – d) I – N – DIAN
24. If D is Python dictionary as
D= {‘A’ : 1, ‘B’ : 2, ‘C’ : 3}
Then, which of the following command will remove the entire dictionary from the memory ?
a) del(D) c) D.clear()
b) D.del() d) D.remove()
25. What will be the output of the following Python code ?
D1 = {‘A’ : 5,’B’ : 7, ‘C’ : 9}
D2 = {‘B’ : 5, ‘D’ : 10}
D1.update(D2)
print(D1)
a) {‘A’ : 5, ‘B’ : 5, ‘C’ : 9, ‘D’ : 10} c) {‘A’ : 5, ‘C’ : 9, ‘D’ : 10}
b) ‘A’ : 5, ‘B’ : 5, ‘C’ : 9, ‘B’ : 5, ‘D’ : 10} d) {‘B’ : 7, ‘D’ : 10, ‘A’ : 5, ‘C’ : 9}
26. Examine the given Python program and select the purpose of the program from the following options:
N = int(input(“Enter the number”))
for i in range(2, N):
if (N%i = = 0 ):
print(i)
a) to display the proper factors (excluding 1 and the number N itself)
b) to check whether N is a prime or Not
c) to calculate sum of factors of N
d) to display all prime factor of the number N
27. Identify the correct output of the following Python code:
From math import *
A = 5.6
print(floor(A), ceil(A))
a) 5 6 c) -5 -6
b) 6 5 d) -6 -5
28. Consider the given Python programme and identify one possible output of this code out of the following
options:
from random import *
Low-randint(2, 3)
High-randrange(5, 7)
for N in range (Low, High)
print(N, end = ‘ ‘)
a) 3 4 5 c) 4 5
b) 2 3 d) 3 4 5 6
29. Assuming all required modules have already been imported, identify the correct output of the following
Python program segment:
Data [4, 4, 1, 2, 4]
print(mean(Data), mode(data))
a) 1 4 c) 3 4
b) 4 1 d) 4 3
30. Observe the Python code carefully and answer the following question:
Def FUN(A):
L=[]
For i in range (2, A):
if (A%i = = 0):
L.append(i)
print(L)
N = 10
FUN(N)
Identify the global identifier in the above code :
a) A c) i
b) L d) N
31. Observe the following Python program carefully.
import random
Def DICE(Low = 1, High = 6):
RND = random.randint(Low, High)
print(RND, end = ‘ ‘ )
DICE( )
DICE(2)
DICE(2,4)
Which of the following options cannot be an output of the above code?
a) 4 3 3 c) 3 5 4
b) 4 1 3 d) 6 4 3
32. Identify the output of the following Python code:
def EXP(N2)
global N1
N1, N2 = N1 + 5, N2 + 10
print (N1, N2, end = ‘ ‘ )
N1 =10
EXP(N1)
print(N1)
a) 10 20 15 c) 15 20 15
b) 15 20 10 d) 10 20 10
33. Which of the following mode, when used in file opening statement in Python, generates an error, if the
file does not exist?
a) a + c) w +
b) r + d) a
34. Consider the following Python command:
File = open(‘Myfile’,’a’)
Which of the following option cannot be true ?
a) ‘Myfile’ can be a text file c) ‘Myfile’ can be a binary file
b) ‘Myfile’ can be a csv file d) ‘Myfile’ will be created if not exist
35. Which of the following is not true for the Python command:
File = open(‘story.txt’, ‘a+’)
a) More text can be written into ‘story.txt’ d) Command generates an error, if the file
b) Content of the file ‘story.text’ can be read. ‘story.txt. does not exist.
c) Content of the file ‘story.text’ can be modified.
36. Consider the following Python program segment:
File = open(‘Poem.txt’. ‘r’)
T = File.readline( )
Identify the data type of T :
a) String (str) c) Tuple
b) List d) Dictionary
37. Name the Python module need to be imported to invoke the function?
a) csv c) sql
b) pickle d) binary
38. Examine the given Python program and select the purpose of the program from the following options:
F = open(‘story.txt’, ‘r+’)
S = F.read( )
S = S.upper( )
F.seek(0)
F.write(s)
F.close( )
a) to count the upper case alphabets present in the file
b) to convert all alphabets into uppercase in the file
c) to copy only the upper case alphabets from the file
d) to remove all lower case alphabets from the file
39. seek( ) is a method of?
a) csv module c) text module
b) pickle module d) file object
40. csv module need to be imported in a program to invoke or use the function:
a) write( ) c) writeline( )
b) writerow( ) d) writelines( )
41. Examine the given Python program and select the best purpose of the program from the given options:
File = open(“Poem.txt”, “r”)
print(len(File.readline().split()))
File.close( )
a) To count the number of words present in the file
b) To count the number of lines present in the file
c) To count the number of characters present in the file
d) To count the number of words present in the first line of the file
42. CSV files are comma separated values saved as a_________
a) text file c) MySQL table
b) binary file d) random file
43. Which of the following is DDL command ?
a) UPDATE SET c) DROP TABLE
b) DELETE d) INSERT INTO
44. Which of the following is DML command ?
a) INSERT INTO c) CREATE TABLE
b) DROP TABLE d) ALTER TABLE
45. An attribute or a set of attribute which are used to identify a tuple uniquely is known as :
a) Primary Key c) Alternate Key
b) Foreign Key d) Candidate Key
46. Which of the following is not a valid relational operator used in SQL ?
a) <= c) =>
b) <> d) =
47. Which of the following is using wrong syntax for a SELECT query in SQL?
a) SELECT * WHERE RNO>100 FROM STUDENT;
b) SELECT * FROM STUDENT WHERE RNO>100;
c) SELECT * FROM STUDENT WHERE RNO BETWEEN 100 AND 200;
d) SELECT * FROM STUDENT WHERE RNO IN (100,101,105,104);
48. Which of the following will be the correct SQL command to add a new column FEES in a table TEACHER ?
a) ALTER TABLE TEACHER
ADD COLUMN FEES FLOAT;
b) ADD COLUMN FEES FLOAT
INTO TEACHER;
c) UPDATE TEACHER
ADD COLUMN FEES FLOAT;
d) INSERT INTO TEACHER
ADD COLUMN FESS FLOAT;
49. Which of the following will display information about all the employees from employee table, whose
names contains second letter as “A” ?
a) SELECT * FROM EMPLOYEE WHERE NAME LIKE “_A%”;
b) SELECT * FROM EMPLOYEE WHERE NAME LIKE “%A_”;
c) SELECT * FROM EMPLOYEE WHERE NAME LIKE “_ _ A%”;
d) SELECT * FROM EMPLOYEE WHERE NAME = “_A%”;
50. Which of the following SQL command will help in incrementing values of FEES column in STUDENT
table by 10% ?
a) UPDATE STUDENT ASSIGN FEES = FEES * 1.1;
b) UPDATE STUDENT SET FEES = FEES * 1.1;
c) UPDATE STUDENT SET FEES = FEES * 10%;
d) UPDATE STUDENT SET FEES 10%;
51. Which of the following is correct sequence in a SELECT query ?
a) SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY
b) SELECT, WHERE, FROM, GROUP BY, HAVING, ORDER BY
c) SELECT, FROM, WHERE, HAVING, GROUP BY, ORDER BY
d) SELECT, FROM, WHERE, GROUP BY, ORDER BY, HAVING
52. Consider the following tables and their respective degrees and cardinalities in a database called
SCHOOL :

Select the degree and cardinality of the cartesian product of the tables STUDENT x TEACHER from the
following options :
a) 30 7500 c) 30 325
b) 200 325 d) 200 7500
53. Which of the following set of functions is a valid set of aggregate functions in MySQL ?
a) AVG(), ROUND(), COUNT() c) COUNT(), MAX(), SUM()
b) MIN(), UPPER(), AVG() d) DATE(), COUNT(), LTRIM()
54. Find the output of the MySQL query based on the given Table-COACH (ignore the output header)

Query :
SELECT COUNT(GAME), AVG(SALARY) FROM COACH;
a) 3 70000 c) 4 70000
b) 4 35000 d) 3 35000
55. Find the output of the MySQL query based on the given Table – STUDENT (ignore the output header)

Query :
SELECT SEC, AVG (MARKS) FROM STUDENT GROUP BY SEC HAVING MIN (MARKS) > 80;
a) B 83
b) A 84
c) A 84
B 83
d) A 83
B 80
56. Following are the two tables in a MySQL database.
Database : COMPARTMENT

Select the command from the following option to display subjects (SUBNAME) and number of students
registered in that subject in table RESULT.
a) SELECT SUBNAME, COUNT(*)
FROM SUBJECTS, RESULT GROUP BY SUBNAME ;
b) SELECT SUBNAME, COUNT(*)
FROM SUBJECTS, RESULT ORDER B SUBNAME;
c) SELECT SUBNAME, COUNT(*)
FROM SUBJECTS NATURAL JOIN RESULT ORDER BY SUBNAME;
d) SELECT SUBNAME, COUNT(*)
FROM SUBJECTS NATURAL JOIN RESULT GROUP BY SUBNAME;
57. To establish the Python-MySQL connection, connect() methods is used with certain parameters or
arguments. Which of the following is not a parameter / argument used with connect() method ?
a) user c) database
b) password d) table
58. commit( ) is required to be used after the execution of certain queries in Python-MySQL connectivity
applications. Identify one such MySQL command out of the following options :
a) CREATE c) SELECT
b) INSERT d) DROP
59. While working on Python-MySQL connectivity, fetchall( ) method is used to get data from table. The
method fetchall( ) returns –
a) a list c) tuple of lists
b) a tuple d) list of tuples
60. The method cursor( ) is used in Python-MySQL connectivity applications. This method is a member of :
a) sql module c) database-connectivity module
b) pickle module d) csv module

You might also like