M3 R5 Jan2023 Set3
M3 R5 Jan2023 Set3
M3 R5 Jan2023 Set3
©ê◊ËŒflÊ⁄U ∑§Ê ŸÊ◊/Name of Candidate : ________________________ ©ê◊ËŒflÊ⁄U ∑§ „SÃÊˇÊ⁄U/Signature of Candidate : ___________________
1. ÿÁº $»§Êß‹ ◊ı¡Íº Ÿ„Ë¥ „Ò ÃÙ ∑§ıŸ ‚Ê ◊Ù«U ∞∑§ Ÿß¸ 3. ∑§ıŸ ‚Ê S≈≈◊¥≈ »§Êß‹ ¬ÊÚߢ≈⁄ ∑§Ù flø◊ÊŸ ÁSÕÁà ‚ 10
$»§Êß‹ ’ŸÊÃÊ „Ò? ’Êß≈ ¬Ë¿U ‹ ¡Ê∞ªÊ–
(C) f.seek(-10, 1)
(C) •¬á«U ◊Ù«U
(D) ©¬⁄ÙÄà ◊¥ ‚ ∑§Ù߸ Ÿ„Ë¥
(D) (A) •ÊÒ⁄U (C) ŒÊŸÊ¥
Which statement will move file pointer 10
Which mode creates a new file if the file does bytes backward from current position ?
not exist ?
(A) f.seek(-10, 0)
(A) write mode
(B) f.seek(10, 0)
(B) read mode
(C) f.seek(-10, 1)
(C) append mode
(D) none of the above
(D) Both (A) and (C)
(C) ÁS≈˛¢ª ∞⁄⁄ (D) ⁄Ÿ ≈Êß◊ ∞⁄⁄ (D) ©¬⁄ÙÄà ◊¥ ‚ ∑§Ù߸ Ÿ„Ë¥
Python supports the creation of anonymous
Which of the following error is returned by
functions at runtime, using a construct called
the given code ?
__________.
>>> f = open(“test.txt”,”w”) (A) pi
>>> f.write(345) (B) anonymous
(C) String Error (D) Run Time Error (D) none of the above
fun1(10, 20)
(A) def fun1(**kwargs) 8. ÁŸêŸÁ‹Áπà ◊¥ ‚ ∑§ıŸ ‚Ë Á«UÄ‹⁄‡ÊŸ ª‹Ã „Ò?
(B) def fun1(args*)
(A) _x = 2 (B) x=3
(C) No, it is not possible in Python
(D) def fun1(*data) (C) __xyz__ = 5 (D) ߟ◊¥ ‚ ∑§Ù߸ Ÿ„Ë¥
Which of the following declarations is
incorrect ?
6. „Ê«¸Uflÿ⁄ ∑§Ù ø‹ÊŸ ∑‘ Á‹∞ ÁŸêŸ ◊¥ ‚ ∑§ıŸ ‚Ê ‚ÊÚç≈flÿ⁄
•Êfl‡ÿ∑§ „Ò? (A) _x = 2 (B) x=3
(C) strip() (D) All of the above What is the use of the zeros() function in
Numpy array in python ?
(A) To make a Matrix with all element 0
(B) To make a Matrix with all diagonal
11. ÁŸêŸÁ‹Áπà S≈≈◊¥≈ ◊¥ ‘f’ ÄÿÊ „Ò? element 0
(C) To make a Matrix with first row 0
f=open(“Data.txt”, “r”)
(D) None of the above
(A) »§Êß‹ ∑§Ê ŸÊ◊ (B) »§Êß‹ „Ò¥«U‹
14. ÁŸêŸÁ‹Áπà ◊¥ ‚ ∑§ıŸ ‚Ê ‡Êéº ¬ÊÿÕŸ ‹Ò¥Çfl¡ ∑§Ê
(C) »§Êß‹ ∑§Ê ◊Ù«U (D) »§Êß‹ „Ò¥«UÁ‹¢ª
∑§Ëfl«¸U Ÿ„Ë¥ „Ò?
What is ‘f’ in the following statement ? (A) val (B) raise
f=open(“Data.txt”, “r”) (C) try (D) with
Which of the following words is not a
(A) File Name (B) File Handle keyword of python language ?
(C) Mode of file (D) File Handling (A) val (B) raise
(C) try (D) with
12. ¬ÊÿÕŸ ‹Ò¥Çfl¡ ◊¥, k ∑§Ù ¬ÊÚfl⁄ l Ã∑§ ’…U∏ÊŸ ∑‘ Á‹∞ 15. ÁŸêŸÁ‹Áπà ∑§Ù«U ∑§Ê •Ê©≈¬È≈ ÄÿÊ „Ò?
ÁŸêŸÁ‹Áπà ◊¥ ‚ ∑§ıŸ ‚Ê •ÊÚ¬⁄≈⁄ ‚„Ë Áfl∑§À¬ „Ò? a = np.array([[1,2,3],[4,5,6]])
print(a.shape)
(A) k^l (B) k**l
(A) (2, 3) (B) (3, 2)
(C) k^^l (D) k ^ *l (C) (1, 1) (D) ߟ◊¥ ‚ ∑§Ù߸ Ÿ„Ë¥
In python language, which of the following What is the output of following code ?
operators is the correct option for raising k to import numpy as np
the power l ? a = np.array([[1,2,3],[4,5,6]])
print(a.shape)
(A) k^l (B) k**l
(A) (2, 3) (B) (3, 2)
(C) k^^l (D) k ^ *l (C) (1, 1) (D) None of these
(B) k
28. ÁŸêŸÁ‹Áπà ¬ÊÿÕŸ ∑§Ù«U ∑§Ê •Ê©≈¬È≈ ÄÿÊ „ÙªÊ?
(C) kkk
tuple1=(5,1,7,6,2)
(D) ߟ◊¥ ‚ ∑§Ù߸ Ÿ„Ë¥ tuple1.pop(2)
What is the output of the following ? print(tuple1)
(A) (5,1,6,2) (B) (5,1,7,6)
y = ‘klmn’
(C) (5,1,7,6,2) (D) Error
for i in range(len(y)):
What will be the output of the following
print(y) Python code ?
tuple1=(5,1,7,6,2)
(A) klmn klmn klmn klmn
tuple1.pop(2)
(B) k
print(tuple1)
(C) kkk (A) (5,1,6,2) (B) (5,1,7,6)
(C) 6 (D) 4
c=a+b >>>list1[0] = 4
c = c*a
>>>print(list2)
print (c[2])
(A) [1, 4] (B) [1, 3, 4]
(A) 10 (B) 21
(C) 12 (D) 28 (C) [4, 3] (D) [1, 3]
print(M) a = np.array([1,2,3,5,8])
print (a.ndim)
(A) [‘’, ‘b’, ‘bb’, ‘bbb’]
(A) 0 (B) 1
(B) [‘b’, ‘bb’, ‘bbb’, ‘bbbb’]
(C) 2 (D) 3
(C) [ ‘b’, ‘bb’, ‘bbb’]
What will be output for the following code ?
(D) ߟ◊¥ ‚ ∑§Ù߸ Ÿ„Ë¥ import numpy as np
(C) 5 ¬¢ÁÄÃÿÊ°
46. ÁŸêŸÁ‹Áπà ∑§Ê •Ê©≈¬È≈ ÄÿÊ „Ò?
(D) ©¬⁄ÙÄà ◊¥ ‚ ∑§Ù߸ Ÿ„Ë¥
print(max([1, 2, 3, 4], [4, 5, 6], [7]))
f.read(5) will read __________ from a file (file
(A) [4, 5, 6] (B) [7]
object ‘f’).
(C) [1, 2, 3, 4] (D) 7
(A) 5 characters
What is the output of the following ?
(B) 5 words
print(max([1, 2, 3, 4], [4, 5, 6], [7]))
(C) 5 lines (A) [4, 5, 6] (B) [7]
(D) None of the above (C) [1, 2, 3, 4] (D) 7
48. ÁŸêŸÁ‹Áπà ∞Ä‚¬˝‡ÊŸ ∑§Ê •Ê©≈¬È≈ ÄÿÊ „ÙªÊ? 51. ’Êߟ⁄Ë $»§Êß‹ ◊¥ ‚ÍøŸÊ Á∑§‚ ¬˝ÊM§¬ ◊¥ „ÙÃË „Ò?
x = 14 (A) ÁÄfl∑§ Á⁄S¬Ê¢‚ ∑§Ù«U
print(x>>2) (B) ©‚Ë ¬˝ÊM§¬ ◊¥ Á¡‚◊¥ «U≈Ê ∑§Ù ◊◊Ù⁄Ë ◊¥ ⁄πÊ ¡ÊÃÊ
(A) 14 (B) 1 „Ò
(C) 3 (D) 2 (C) ∞∞‚‚Ë•Ê߸•Ê߸ ¬˝ÊM§¬
What will be the output of the following
expression ? (D) ÿÍÁŸ∑§Ù«U ¬˝ÊM§¬
x = 14 In which format Binary file contains
information ?
print(x>>2)
(A) Quick response code
(A) 14 (B) 1
(C) 3 (D) 2 (B) Same format in which the data is held
in memory
(C) ASCII format
49. NumPY ∑§Ê ¬Íáʸ M§¬ „Ò?
(D) Unicode format
(A) Ÿ¢’Á⁄¢ª ¬ÊßÕŸ
(B) Ÿ¢’⁄ ߟ ¬ÊßÕŸ 52. ∑§ıŸ ‚Ê S≈≈◊¥≈ $»§Êß‹ (file object is ‘f’) ‚ ∞∑§ ¬¥ÁÄÃ
(C) ŸÈ◊Á⁄∑§‹ ¬ÊßÕŸ ¬˝SÃÈà ∑§⁄ªÊ?
(D) ©¬⁄ÙÄà ◊¥ ‚ ∑§Ù߸ Ÿ„Ë¥ (A) f.readlines( ) (B) f.readline( )
NumPY stands for : (C) f.read( ) (D) f.line( )
(A) Numbering Python Which statement will return one line from a
(B) Number In Python file (file object is ‘f’) ?
import numpy as np
64. ÁŸêŸÁ‹Áπà ¬ÊÿÕŸ ∑§Ù«U ∑§Ê •Ê©≈¬È≈ ÄÿÊ „ÙªÊ?
ary = np.array([1,2,3,5,8])
from math import *
floor(11.7) ary = ary + 1
(A) 12 print (ary[1])
(B) 11
(A) 0 (B) 1
(C) 11.0
(D) ߟ◊¥ ‚ ∑§Ù߸ Ÿ„Ë¥ (C) 2 (D) 3
84. readlines() ◊Õ«U ÄÿÊ Á⁄≈Ÿ¸ ∑§⁄ÃÊ „Ò? 87. ÁŸêŸÁ‹Áπà SÿÍ«UÙ∑§Ù«U ∑§Ê •Ê©≈¬È≈ ÄÿÊ „ÙªÊ, ¡„Ê°
ANd •ÊÚ¬⁄‡ÊŸ ∑§Ê ¬˝ÁÃÁŸÁœàfl ∑§⁄ÃÊ „Ò?
(A) ‡Êéº∑§Ù‡Ê (B) ÁS≈˛¢ª Integer a, b, c
(C) 5 (D) 7
Set b = 5, a = 1
(C) •‚ê’‹⁄ (D) ߟ◊¥ ‚ ∑§Ù߸ Ÿ„Ë¥
c=a&b
Which translator is used to convert assembly
language into machine language ? Print c
89. Á‹S≈U 1 ◊¥ ∞∑§ ∞Á‹◊¥≈U (5) ¡Ê«∏Ÿ ∑§ Á‹∞ $»¥§Ä‡ÊŸ ∑§Ê (A) // (B) ?
©¬ÿʪ Á∑§ÿÊ ¡ÊÃÊ „Ò?
(A) list1.sum(5) (C) < (D) and
(B) list1.add(5)
(C) list1.append(5)
(D) list1.addelement(5)
Which function is used to add an element (5) 92. ¬Ò∑§¡ ‚ ‚÷Ë ◊ÊÚ«KÍ‹ ßê¬Ù≈¸ ∑§⁄Ÿ ∑‘ Á‹∞ ∑§ıŸ ‚Ê
in the list1 ? S≈≈◊¥≈ ‚„Ë „Ò?
(A) list1.sum(5)
(B) list1.add(5) (A) from package import all
(C) list1.append(5)
(D) list1.addelement(5) (B) from package import *
90. ÁŸêŸÁ‹Áπà ¬ÊÿÕŸ ∑§Ù«U ∑§Ê •Ê©≈¬È≈ ÄÿÊ „ÙªÊ? (C) from package include all
x = ‘abcd’
(D) from package include *
for i in x:
print(i.upper())
Which statement is correct to import all
(A) aBCD (B) abcd modules from the package ?
(C) error (D) ABCD
What will be the output of the following (A) from package import all
Python code ?
x = ‘abcd’ (B) from package import *
for i in x:
print(i.upper()) (C) from package include all
(A) aBCD (B) abcd
(C) error (D) ABCD (D) from package include *
if n ==2:
(C) File Not Found Error
continue
(D) None of the above
print(n)
94. ÁŸêŸÁ‹Áπà ¬ÊÿÕŸ ∑§Ù«U ∑§Ê flÒÀÿÍ ÄÿÊ „Ò? (C) 432 (D) ߟ◊¥ ‚ ∑§Ù߸ Ÿ„Ë¥
n=5
(A) 9 (B) 4
while n>0:
(C) 9.0 (D) 4.0
n-=1
What is the value of the following Python if n ==2:
code ?
continue
>>>print(36 / 4)
print(n)
(A) 9 (B) 4 (A) 54310 (B) 4310
(A) $»§Êß‹ ∑§ ’Ëø ◊¥ ∑§„Ë¥ ÷Ë (B) ≈È ¬ À‚ •¬Á⁄flø Ÿ Ëÿ „Ò ¥ ¡’Á∑§ Á‹S≈˜ ‚
¬Á⁄fløŸ‡ÊË‹ „Ò¥
(B) •¢Ã (C) ≈ȬÀ‚ •ÊÒ⁄ Á‹S≈˜‚ ºÙŸÙ¥ ¬Á⁄fløŸ‡ÊË‹ „Ò¥
(C) •Ê⁄ê÷ ◊¥ (D) ≈È ¬ À‚ ¬Á⁄flø Ÿ ‡ÊË‹ „Ùà „Ò ¥ ¡’Á∑§ Á‹S≈˜ ‚
•¬Á⁄fløŸËÿ „ÙÃË „Ò¥
(D) $»§Êß‹ ∑§Ë ºÍ‚⁄Ë ¬¢ÁÄà Choose the correct option with respect to
Python.
When we open file in append mode the file
pointer is at the _________ of the file. (A) Both tuples and lists are immutable
(B) Tuples are immutable while lists are
(A) anywhere in between the file mutable
(C) Both tuples and lists are mutable
(B) end
(D) Tuples are mutable while lists are
(C) beginning immutable