KVS PGT Computer Science Question paper with answers

1. Which of the following is not hardware of a computer system?

  1. KEYBOARD
  2. PRINTER
  3. OPERATING SYSTEM
  4. MOUSE

2. Which out of the following is the least capacity of memory unit compared to other options?

  1. MB
  2. KB
  3. GB
  4. TB

3. A collection of 4 bits is known as

  1. BYTE
  2. WORD
  3. NIBBLE
  4. K.BYTE

4. While working on computer, if we open a document in MS OFFIC WORD, which of the following is used

  1. RAM
  2. ROM
  3. BIOS
  4. I/O BUS

5. ______________ is not an operating system.

  1. UNIX
  2. WINDOWS
  3. ANDROID
  4. MS OFFICE

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

NOT True OR False AND True

  1. False
  2. True
  3. Error in Expression
  4. No result

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

8. Which of the following represents Absorption law correctly?

  1. X+Y.Z = (X+Y).(X+Z)
  2. X+X.Y = X
  3. (X+Y)’ = X’ Y’
  4. (X..X)’ = X’

9. Which of the following is exact equivalent of given binary number in Octal number?
(101110001011)2

  1. (232023)8
  2. (A8A)8
  3. (5613)8
  4. (3165)8

10. What is full form of ISCII encoding scheme?

  1. Indian Standard code for interchange of information
  2. Indian Standard code for information interchange
  3. Indian Standard coding for information in Interchange
  4. Indian Scheme of coding for information interchange

11. Which of the following cannot be registered under cybercrime?

  1. Sending pornographic material online
  2. Stealing of brand new internet routers from a showroom
  3. Accessing CCTV camera of a private company without their knowledge
  4. Sending threats on social media accounts

12. Which of the following is an example of a very strong password?

  1. STRONG
  2. Abc1234
  3. admin
  4. Ap9#2@cQ

13. Which of the following protocol is used to upload and download files from remote server/ computers?

  1. SMTP
  2. VoIP
  3. HTTP
  4. FTP

14. Garuda Skill education has set up their new skill training campus in a place near Pune. The campus has three close by buildings connected with each other using CAT6 cable. Which type of network is Estimation in the campus?

  1. PAN
  2. MAN
  3. LAN
  4. WAN

15. Which of the following is not in network device?

  1. Switch
  2. Router
  3. Hub
  4. RAM

16. Which of the following wired medium will be able to have highest speed data communication possible?

  1. Single pair telephone cable
  2. Fiber optic cable
  3. Co-axial cable
  4. Twisted pair cable

17. Which of the following is an invalid IP address?

  1. 100.0.10.32
  2. 255.255.255.10
  3. 192.168.10.15
  4. 256.10.12.5

18. What is full form of ARPANET?

  1. Advancement of Research Project Agency Network
  2. Advanced Research Project Agency Network
  3. Add on Research Project Agency Network
  4. American Research Project Agency Network.

19. Which of the following is not an example of cloud computing services?

  1. SaaS
  2. IaaS
  3. PaaS
  4. SaaP

20. Which of the following is not an application of AI?

  1. Chat Bot
  2. Financial Accounting System
  3. Driverless Car
  4. Face Recognition System

21. Which of the following is an invalid identifier in Python programming language?

  1. none
  2. False
  3. true
  4. For

22. Which of the following is not a valid operator in Python?

  1. = =
  2. = >
  3. / /
  4. * *

23. Identify the correct output of the following Python arithmetic expression:
1 + ( 2 – 3 ) * 4 * * 5 / / 6

  1. -171
  2. 172
  3. -170
  4. 170

24. Evaluate the following expression:
not True or not False and False

  1. True
  2. False
  3. None
  4. will generate an Error.

25. Identify the correct output of the following Python command:
print(10 or 40)

  1. 10
  2. 40
  3. 50
  4. 400

26. Identify the correct output of the following Python program segment?
Pi=3.141592
print(‘%d4f’ %Pi)

  1. 3.14
  2. 3.1415
  3. 3.1416
  4. 3.0000

27. Which of the following is immutable data type in Python?

  1. Set
  2. List
  3. Tuple
  4. Dictionary

28. 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:

  1. List3 = List1 + List2
  2. List3 = List1.append(List2)
  3. List3 = List1.update(List2)
  4. List3 = List1.extend(List2)

29. Identify the correct output of the following Python code:

L-13, 3, 2, 2, 1, 11
L.append(L.pop(L.pop()))
print(L)

  1. [3,2,2,1,3]
  2. [3,3,2,2,3]
  3. [1,3,2,2,1]
  4. [1,1,2,2,3,3]

30. Identify the output of the Python Command:
print(22.0/5)

  1. 4.4
  2. 4
  3. 4.0
  4. 2

31. Find the output of the following Python code:

L1 = [1,4,3,2]
L2 = L1
L1.sort()
print(L2)

  1. [1,4,3,2]
  2. [1,2,3,4]
  3. 1 4 3 2
  4. 1 2 3 4

32. 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) ?

  1. [‘Basic’,’C’,’C++’]
  2. [’C++’,’C’,‘Basic’]
  3. [‘C’,’C++’,’Basic’]
  4. [‘Basic’,’C++’,’C’]

33. Identify the correct output of the following Python program.
CHARR = [[‘A’,’B’],[‘C’,’D’],[‘E’,’F’]]
print(CHARR [1][1])

  1. ‘A’
  2. ‘B’
  3. ‘C’
  4. ‘D’

34. 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.

  1. S.pop(0)
  2. S.pop( )
  3. S.remove( )
  4. S.remove(0)

35. Traditionally the end of a stack from where PUSH(additional) and POP(deletion) take place, of popularly known as :

  1. FRONT
  2. TOP
  3. LIFO
  4. FIFO

36. 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)

  1. [1,2,3,4,5,6,7]
  2. [1,2,3,[4,5],6,7]
  3. [1,2,3,4,5,[6,7]]
  4. [1,2,3,[4,5],[6,7]]

37. Identify the correct output of the Python code:
TUP ([1, 2], [3, 4], [5, 6])
TUP[2] [1]-8
print(TUP)

  1. ([1, 2], [8, 4], [5, 6])
  2. ([1, 2], [3, 4], [8, 6])
  3. ([1, 2], [3, 4], [5, 8])
  4. will generate an error as a Tuple is immutable

38. Identify the output of the following Python program segment:
S = ‘Python Programming’
L=S.split()
S=’,’.join(L)
print(S)

  1. Python Programming
  2. Python, Programming
  3. ,Python Programming,
  4. ,Python, Programming,

39. If S-‘python language’ is a Python string, which of the following command will display the following output with ‘P’ in upper case and remaining in lower case?

  1. print(S.upper())
  2. print(S.title())
  3. print(S.capitalize())
  4. print(S.sentence())

40. Identify the correct output of the following Python Code:
Str = “Hello World! Hello India!”
Pos-Str.index (“Hello”)
print (Pos)

  1. 0
  2. 13
  3. [0, 13]
  4. (0, 13)

41. If a List L-[‘Hello’, ‘World!’] Identify the correct output of the following Python command:
print(*L)

  1. Hello World!
  2. Hello, World!
  3. ‘Hello’, ‘World!’
  4. ‘Hello’ ‘ ‘World!

42. If Str is a Python string as
Str= “Hello World!”
What will be the output of the following Python Command?
print(Str.find(‘1’))

  1. 2
  2. 3
  3. [2, 3, 7]
  4. (2, 3, 7)

43. Suppose a Python tuple TUP is declared as
TUP = (‘A’,’B’,’C’)
Which of the following command is invalid ?

  1. TUP = (‘D’)
  2. TUP = (‘D’,)
  3. TUP += (‘D’)
  4. TUP += (‘D’,)

44. Identify the correct output of the following Python code:
TUP (3, 1, 2, 4)
sorted(TUP)
print (TUP)

  1. (3, 1, 2, 4)
  2. (1, 2, 3, 4)
  3. [3, 1, 2, 4]
  4. [1, 2, 3, 4]

45. Find the correct output of the following Python program segment :
T=(‘1’)
print(T*3)

  1. 3
  2. (‘1’,’1’,’1’)
  3. 111
  4. (‘3’)

46. 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)

  1. I – N – DIA – N –
  2. I – DIA –
  3. I – DIAN
  4. I – N – DIAN

47. To execute the following code in Python, which module need to be imported?
print(_ mean ([1, 2, 3]) )

  1. math
  2. random
  3. statistics
  4. probability

48. 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 ?

  1. del(D)
  2. D.del()
  3. D.clear()
  4. D.remove()

49. 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)

  1. {‘A’ : 5, ‘B’ : 5, ‘C’ : 9, ‘D’ : 10}
  2. ‘A’ : 5, ‘B’ : 5, ‘C’ : 9, ‘B’ : 5, ‘D’ : 10}
  3. {‘A’ : 5, ‘C’ : 9, ‘D’ : 10}
  4. {‘B’ : 7, ‘D’ : 10, ‘A’ : 5, ‘C’ : 9}

50. Select the output for the given Python code from the following options:
D1 = { 1 : 2, 2 : 3, 3 : 4 }
D2 = D1.get(1,2)
print(D2)

  1. 2
  2. 3
  3. [2,3]
  4. {1 : 2, 2 : 3 }

51. Which of the following functions cannot be used with string(str) data type?

  1. islower( )
  2. isupper( )
  3. isalpha( )
  4. isnum( )

52. 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)

  1. to display the proper factors (excluding 1 and the number N itself)
  2. to check whether N is a prime or Not
  3. to calculate sum of factors of N
  4. to display all prime factor of the number N

53. If A-random.randint(B, C) assigns a random value between 1 and 6 (both inclusive) to the identifier A, what should be the values of B and C, if all required modules have already been imported?

  1. B = 0 C = 6
  2. B = 0 C = 7
  3. B=1, C = 7
  4. B = 1 C = 6

54. Identify the correct output of the following Python code:
From math import *
A = 5.6
print(floor(A), ceil(A))

  1. 5 6
  2. 6 5
  3. -5 -6
  4. -6 -5

55. Identify the correct output of the following Python program segment:
Import math
print(math.fabs(-10))

  1. 1
  2. -10
  3. -10.0
  4. 10

56. 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 = ‘ ‘)

  1. 3 4 5
  2. 2 3
  3. 4 5
  4. 3 4 5 6

57. 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))

  1. 1 4
  2. 4 1
  3. 3 4
  4. 4 3

58. 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 :

  1. A
  2. L
  3. i
  4. N

59. 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?

  1. 4 3 3
  2. 4 1 3
  3. 3 5 4
  4. 6 4 3

60. 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)

  1. 10 20 15
  2. 15 20 10
  3. 15 20 15
  4. 10 20 10

61. Which of the following mode, when used in file opening statement in Python, generates an error, if the file does not exist?

  1. a +
  2. r +
  3. w +
  4. a

62. Consider the following Python command:
File = open(‘Myfile’,’a’)
Which of the following option cannot be true ?

  1. ‘Myfile’ can be a text file
  2. ‘Myfile’ can be a csv file
  3. ‘Myfile’ can be a binary file
  4. ‘Myfile’ will be created if not exist

63. Which of the following is not true for the Python command:
File = open(‘story.txt’, ‘a+’)

  1. More text can be written into ‘story.txt’
  2. Content of the file ‘story.text’ can be read.
  3. Content of the file ‘story.text’ can be modified.
  4. Command generates an error, if the file ‘story.txt. does not exist.

64. Consider the following Python program segment:
File = open(‘Poem.txt’. ‘r’)
T = File.readline( )
Identify the data type of T :

  1. String (str)
  2. List
  3. Tuple
  4. Dictionary

65. Name the Python module need to be imported to invoke the function?

  1. csv
  2. pickle
  3. sql
  4. binary

66. 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( )

  1. to count the upper case alphabets present in the file
  2. to convert all alphabets into uppercase in the file
  3. to copy only the upper case alphabets from the file
  4. to remove all lower case alphabets from the file

67. seek( ) is a method of?

  1. csv module
  2. pickle module
  3. text module
  4. file object

68. csv module need to be imported in a program to invoke or use the function:

  1. write( )
  2. writerow( )
  3. writeline( )
  4. writelines( )

69. 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( )

  1. To count the number of words present in the file
  2. To count the number of lines present in the file
  3. To count the number of characters present in the file
  4. To count the number of words present in the first line of the file

70. CSV files are comma separated values saved as a_________

  1. text file
  2. binary file
  3. MySQL table
  4. random file

71. The creator of the open source Pandas package for data analysis in the Python programming language was__________

  1. Wes Mcinney
  2. Mc Pandas
  3. John D.Hunter
  4. Travis Oliphant

72. Which of the following is not bundled package with pandas?

  1. Six
  2. numpy
  3. pytz
  4. statistics

73. Which of the following is equivalent of and operator while using Boolean indexing on data frames?

  1. &&
  2. @
  3. &
  4. N

74. Find the output of the following Python code:
import Pandas as pd
M = pd.series({‘P’ : 10, ‘Q’ : 90})
print(M)

  1. P Q
    10 90
  2. P 10
    Q 90
  3. 0 P 10
    1 Q 90
  4. 10 P
    90 Q

75. What will be the output of the following Python code?
import pandas as pd
S = pd.series(20, 30)
print(S)

  1. TypeError
  2. 20 30
  3. 0 20
    1 30
  4. 0 1
    20 30

76. Fill in the blanks with an appropriate command from the given options to produce the output shown on the right side of the following code:

  1. D = pd.DataFrame(D, columns = A, index = B)
  2. D = pd.DataFrame(D, rows = B, columns = A)
  3. D = pd.DataFrame(D, B, i = A)
  4. D = pd.DataFrame(A, B, D )

77. What will be the output of the following Python code?
import numpy as np
B= np.array([20, 50, 80, 30])
print(B, B.size, B.shape)

  1. (20, 50, 80, 30) 4, (4,)
  2. [20, 50, 80, 30] 4, (4,)
  3. (20, 50, 80, 30) (4,) 4
  4. [20, 50, 80, 30] (4,) 4

78. Which of the following will help us to read the content of a CSV file ITEMS.CSV as pandas DataFrame ?

  1. IT-pandas.read(“ITEMS.CSV”)
  2. IT pandas.readcsv(“ITEMS.CSV”)
  3. IT-pandas.csv_read(“ITEMS.CSV”)
  4. IT-pandas.read_csv(“ITEMS.CSV”)

79. Consider the following import command:
import matplotlib.pyplot as PLT
Which of the following command will help us to draw a line chart for given values?

  1. PLT.line plot([100, 400, 200, 300])
  2. PLT.plotline([100, 400, 200, 300])
  3. PLT line([100, 400, 200, 300])
  4. PLT.plot([100, 400, 200, 300])

80. Which of the following is DDL command ?

  1. UPDATE SET
  2. DELETE
  3. DROP TABLE
  4. INSERT INTO

81. Which of the following is DML command ?

  1. INSERT INTO
  2. DROP TABLE
  3. CREATE TABLE
  4. ALTER TABLE

82. An attribute or a set of attribute which are used to identify a tuple uniquely is known as :

  1. Primary Key
  2. Foreign Key
  3. Alternate Key
  4. Candidate Key

83. Which of the following is not a valid relational operator used in SQL ?

  1. <=
  2. <>
  3. =>
  4. =

84. Which of the following is using wrong syntax for a SELECT query in SQL?

  1. SELECT * WHERE RNO>100 FROM STUDENT;
  2. SELECT * FROM STUDENT WHERE RNO>100;
  3. SELECT * FROM STUDENT WHERE RNO BETWEEN 100 AND 200;
  4. SELECT * FROM STUDENT WHERE RNO IN (100,101,105,104);

85. Which of the following will be the correct SQL command to add a new column FEES in a table TEACHER ?

  1. ALTER TABLE TEACHER
    ADD COLUMN FEES FLOAT;
  2. ADD COLUMN FEES FLOAT
    INTO TEACHER;
  3. UPDATE TEACHER
    ADD COLUMN FEES FLOAT;
  4. INSERT INTO TEACHER
    ADD COLUMN FESS FLOAT;

86. Which of the following will display a list of tables in a database ?

  1. DISPLAY TABLES;
  2. SHOW TALES;
  3. SELECT TABLES;
  4. VIEW TABLES;

87. Which of the following will display information about all the employees from employee table, whose names contains second letter as “A” ?

  1. SELECT * FROM EMPLOYEE WHERE NAME LIKE “_A%”;
  2. SELECT * FROM EMPLOYEE WHERE NAME LIKE “%A_”;
  3. SELECT * FROM EMPLOYEE WHERE NAME LIKE “_ _ A%”;
  4. SELECT * FROM EMPLOYEE WHERE NAME = “_A%”;

88. Which of the following SQL command will help in incrementing values of FEES column in STUDENT table by 10% ?

  1. UPDATE STUDENT ASSIGN FEES = FEES * 1.1;
  2. UPDATE STUDENT SET FEES = FEES * 1.1;
  3. UPDATE STUDENT SET FEES = FEES * 10%;
  4. UPDATE STUDENT SET FEES 10%;

89. Which of the following is correct sequence in a SELECT query ?

  1. SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY
  2. SELECT, WHERE, FROM, GROUP BY, HAVING, ORDER BY
  3. SELECT, FROM, WHERE, HAVING, GROUP BY, ORDER BY
  4. SELECT, FROM, WHERE, GROUP BY, ORDER BY, HAVING

90. 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 :

  1. 30 7500
  2. 200 325
  3. 30 325
  4. 200 7500

91. Which of the following set of functions is a valid set of aggregate functions in MySQL ?

  1. AVG(), ROUND(), COUNT()
  2. MIN(), UPPER(), AVG()
  3. COUNT(), MAX(), SUM()
  4. DATE(), COUNT(), LTRIM()

92. 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;

  1. 3 70000
  2. 4 35000
  3. 4 70000
  4. 3 35000

93. 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;

  1. B 83
  2. A 84
  3. A 84
    B 83
  4. A 83
    B 80

94. Consider the following tables in a database called SPORTS.
Database : SPORTS

Which is the best command from the following options to display the name of the player (PNAME) and their respective games (GNAME)

  1. SELECT PNAME, GID FROM PLAYERS ;
  2. SELECT PNAME, GAME FROM GAMES, PLAYERS
    WHERE GAMES.GID = PLAYERS.G1D ;
  3. SELECT PNAME, GNAME FROM GAMES, PLAYERS;
  4. SELECT PNAME, GNAME FROM GAMES, PLAYERS
    WHERE P.GID = G.GID;

95. 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.

  1. SELECT SUBNAME, COUNT(*)
    FROM SUBJECTS, RESULT GROUP BY SUBNAME ;
  2. SELECT SUBNAME, COUNT(*)
    FROM SUBJECTS, RESULT ORDER B SUBNAME;
  3. SELECT SUBNAME, COUNT(*)
    FROM SUBJECTS NATURAL JOIN RESULT ORDER BY SUBNAME;
  4. SELECT SUBNAME, COUNT(*)
    FROM SUBJECTS NATURAL JOIN RESULT GROUP BY SUBNAME;

96. 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 ?

  1. user
  2. password
  3. database
  4. table

97. 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 :

  1. CREATE
  2. INSERT
  3. SELECT
  4. DROP

98. While working on Python-MySQL connectivity, fetchall( ) method is used to get data from table. The method fetchall( ) returns –

  1. a list
  2. a tuple
  3. tuple of lists
  4. list of tuples

99. The method cursor( ) is used in Python-MySQL connectivity applications. This method is a member of :

  1. sql module
  2. pickle module
  3. database-connectivity module
  4. csv module

100. Which of the following clause is used with SELECT command in MySQL to avoid duplication of output rows.

  1. NO DUPLICATE
  2. UNIQUE
  3. DISTINCT
  4. NO REPEAT

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top