Solved - O Level Python Paper July 2022 | Set 1
__________ उपयोगकर्ता दस्तावेज़ का हिस्सा है।
__________ is part of user documentation.
[A] Class Diagram
[B] Code Comment
[C] Use Case
[D] Installation Guide
Correct Answer : Installation Guide
आउटपुट निर्धारित करें:
Determine the output :
for i in range(20,30,10) :
j=i/2
print(j)
[A] 10 15
[B] 10.0 15.0
[C] 10.0
[D] None of these
Correct Answer : 10.0
निम्नलिखित का आउटपुट क्या होगा?
What will be the output of the following ?
import numpy as np
print(np.minimum([2, 3, 4], [1, 5, 2]))
[A] [1 2 5]
[B] [1 5 2]
[C] [2 3 4]
[D] [1 3 2]
Correct Answer : [1 3 2]
पहचानकर्ताओं के साथ व्यवहार करते समय पायथन एक केस संवेदनशील भाषा है।
Python is a case sensitive language when dealing with identifiers.
[A] True
[B] False
[C] Sometimes
[D] Never
Correct Answer : True
निम्नलिखित कोड का परिणाम क्या है ?
What is the output of the following code ?
print(bool(0), bool(3.14159), bool(3), bool(1.0+1j))
[A] True True False True
[B] False True False True
[C] False False False True
[D] False True True True
Correct Answer : False True True True
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code ?
def C2F(c) :
return c*9/5+32
print (C2F(100))
print (C2F(0))
[A] 212.0 32.0
[B] 314 24
[C] 567 98
[D] None of the above
Correct Answer : 212.0 32.0
किसी विशेष कार्य को दोहराने के लिए, हम __________ का उपयोग करते हैं।
To repeat a particular task, we use __________.
[A] Input
[B] Loop
[C] Output
[D] Condition
Correct Answer : Loop
निम्नलिखित में से कौन सा कथन अंतिम रूप से निष्पादित होगा?
Which of the following statement will execute in last ?
def s(n1): #Statement 1
print(n1) #Statement 2
n2=4 #Statement 3
s(n2) #Statement 4
[A] Statement 1
[B] Statement 2
[C] Statement 3
[D] Statement 4
Correct Answer : Statement 2
फ़्लोचार्टिंग में वास्तविक निर्देश __________ में दर्शाए जाते हैं।
Actual instructions in flowcharting are represented in __________.
[A] Circles
[B] Boxes
[C] Arrows
[D] Lines
Correct Answer : Boxes
निम्नलिखित का आउटपुट क्या है?
What is the output of the following ?
x = 'abcd'
for i in range(len(x)) :
i.upper()
print (x)
[A] a b c d
[B] 0 1 2 3
[C] error
[D] none of the mentioned
Correct Answer : error
सुन्न सरणी के डेटा प्रकार को खोजने के लिए किस विशेषता का उपयोग किया जाता है?
Which attribute is used to find the data type of numpy array ?
[A] type(array)
[B] dtype
[C] objects.type(array)
[D] numpy(type)
Correct Answer : dtype
निम्नलिखित कोड के लिए आउटपुट क्या होगा?
What will be output for the following code ?
import numpy as np
a = np.array([1,2,1,5,8])
b = np.array([0,1,5,4,2])
c = a + b
c = c*a
print (c[2])
[A] 6
[B] 10
[C] 0
[D] None of these
Correct Answer : 6
नीचे दिए गए प्रोग्राम का आउटपुट क्या है?
What is the output of the below program ?
def func(a, b=5, c=10) :
print('a is', a, 'and b is', b, 'and c is', c)
func(3, 7)
func(25, c = 24)
func(c = 50, a = 100)
[A] a is 7 and b is 3 and c is 10 a is 25 and b is 5 and c is 24 a is 5 and b is 100 and c is 50
[B] a is 3 and b is 7 and c is 10 a is 5 and b is 25 and c is 24 a is 50 and b is 100 and c is 5
[C] a is 3 and b is 7 and c is 10 a is 25 and b is 5 and c is 24 a is 100 and b is 5 and c is 50
[D] None of the mentioned
Correct Answer : a is 3 and b is 7 and c is 10 a is 25 and b is 5 and c is 24 a is 100 and b is 5 and c is 50
कोई भी एल्गोरिदम उचित सिंटैक्स के अनुसार लिखा गया एक प्रोग्राम है।
Any algorithm is a program written according to proper syntax.
[A] True
[B] False
[C] Can‟t say
[D] May be
Correct Answer : False
सीएसवी का फुल फॉर्म क्या है?
What is full form of CSV ?
[A] Comma Separation Value
[B] Comma Separated Variable
[C] Comma Separated Values
[D] Common Syntax Value
Correct Answer : Comma Separated Values
निम्नलिखित में से कौन सा पायथन में एक कीवर्ड नहीं है?
Which of the following is not a keyword in python ?
[A] return
[B] in
[C] False
[D] false
Correct Answer : false
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code ?
x = 50
def func(x):
print('x is', x)
x = 2
print('Changed local x to', x)
func(x)
print('x is now', x)
[A] x is 50 Changed local x to 2 x is now 50
[B] x is 50 Changed local x to 2 x is now 2
[C] x is 50 Changed local x to 2 x is now 100
[D] None of the mentioned
Correct Answer : x is 50 Changed local x to 2 x is now 50
कथन 3 के लिए उत्तर चुनें.
Choose the answer for statement 3.
import ___________ # statement 1
rec = [ ]
while True:
rn = int(input("Enter"))
nm = input("Enter")
temp = [rn, nm]
rec.append(temp)
ch = input("Enter choice (Y/N)")
if ch.upper == "N":
break
f = open("stud.dat", "____________") #statement 2
__________ .dump(rec, f) #statement 3
_______.close( ) # statement 4
[A] unpickle
[B] pickle
[C] write
[D] None of the above
Correct Answer : pickle
निम्नलिखित छद्म कोड का आउटपुट क्या होगा?
What will be the output of the following pseudo-code ?
Integer a
Set a = 5
do
print a - 2
a = a- 1
while (a not equals 0)
end while
[A] 5 3 0
[B] 3 0
[C] infinite loop
[D] None of these
Correct Answer : None of these
रवि ने ओपन() फ़ंक्शन का उपयोग करके पायथन में एक फ़ाइल खोली लेकिन मोड निर्दिष्ट करना भूल गया। फ़ाइल किस मोड में खुलेगी?
Ravi opened a file in python using open( ) function but forgot to specify the mode. In which mode the file will open ?
[A] write
[B] append
[C] read
[D] Both read and write
Correct Answer : read
परिवर्तनीय नामों के लिए निम्नलिखित में से कौन सा सत्य है?
Which of the following is true for variable names ?
[A] unlimited length
[B] limited length
[C] ampersand can be used in its name
[D] None of the above
Correct Answer : unlimited length
रिक्त स्थान को भरें।
Fill in the blank.
import pickle
f=open(“data.dat”,"rb")
d=_____________.load(f)
f.close()
[A] unpickle
[B] pickling
[C] pickle
[D] pick
Correct Answer : pickle
फ़्लोचार्ट और एल्गोरिदम का उपयोग __________ के लिए किया जाता है।
Flowcharts and algorithms are used for __________.
[A] Better programming
[B] Efficient coding
[C] Easy testing and debugging
[D] All of the above
Correct Answer : All of the above
कौन सा कथन फ़ाइल पॉइंटर को वर्तमान स्थिति से 10 बाइट्स पीछे ले जाएगा?
Which statement will move file pointer 10 bytes backward from current position ?
[A] f.seek(-10,0)
[B] f.seek(-10,1)
[C] f.seek(10,0)
[D] None of the above
Correct Answer : f.seek(-10,1)
पायथन में, निम्नलिखित में से कौन सा फ़ंक्शन एक अंतर्निहित फ़ंक्शन है?
In python, which of the following functions is a built-in function ?
[A] val( )
[B] print( )
[C] func_k( )
[D] None of these
Correct Answer : print( )
कौन सा कथन फ़ाइल से एक पंक्ति लौटाएगा (फ़ाइल ऑब्जेक्ट „f‟ है)?
Which statement will return one line from a file (file object is „f‟) ?
[A] f.readlines()
[B] f.readline()
[C] f.read()
[D] f.line()
Correct Answer : f.readline()
निम्नलिखित लाइन को कार्यात्मक बनाने के लिए कौन सा मॉड्यूल आयात किया जाना चाहिए?
Which module to be imported to make the following line functional ?
sys.stdout.write(“ABC”)
[A] system
[B] stdin
[C] stdout
[D] sys
Correct Answer : sys
निम्नलिखित कोड का आउटपुट क्या होगा?
What will be the output of following code ?
import math
abs(math.sqrt(36))
[A] Error
[B] 6
[C] -6
[D] 6.0
Correct Answer : 6.0
निम्नलिखित कोड का आउटपुट क्या है?
What is the output of following code ?
a=set('abc')
b=set('cd')
print(a^b)
[A] {a,b,c,d}
[B] {'c', 'b', 'a', 'd'}
[C] {'b', 'a', 'd'}
[D] None of these
Correct Answer : {'b', 'a', 'd'}
__________ प्रतिनिधि आकृतियों के बीच संबंध दर्शाने वाला एक कनेक्टर है।
__________ is a connector showing the relationship between the representative shapes.
[A] Line
[B] Arrow
[C] Process
[D] Box
Correct Answer : Arrow
वह विधि जो किसी दिए गए आरंभ से शुरू करके किसी कार्य को पूरा करने के लिए अच्छी तरह से परिभाषित निर्देशों की एक सूची का उपयोग करती है राज्य से अंतिम राज्य को __________ कहा जाता है।
Method which uses a list of well-defined instructions to complete a task starting from a given initial state to end state is called as __________.
[A] Program
[B] Algorithm
[C] Flowchart
[D] Both (A) and (C)
Correct Answer : Algorithm
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code ?
from math import factorial
print(math.sqrt(25))
[A] 5.0
[B] Nothing is printed
[C] Error, method sqrt doesn‟t exist in math module
[D] Error, the statement should be: print(sqrt(25))
Correct Answer : Error, the statement should be: print(sqrt(25))
निम्नलिखित में से किस ऑपरेटर की प्राथमिकता सबसे अधिक है?
Which of the following operators has the highest precedence ?
[A] &
[B] *
[C] not
[D] +
Correct Answer : not
कथन 1 के लिए उत्तर चुनें.
Choose the answer for statement 1.
import ___________ # statement 1
rec = [ ]
while True:
rn = int(input("Enter"))
nm = input("Enter")
temp = [rn, nm]
rec.append(temp)
ch = input("Enter choice (Y/N)")
if ch.upper == "N":
break
f = open("stud.dat", "____________") #statement 2
__________ .dump(rec, f) #statement 3
_______.close( ) # statement 4
[A] csv
[B] load
[C] pickle
[D] unpickle
Correct Answer : pickle
os.getlogin() क्या लौटाता है?
What does os.getlogin() return ?
[A] name of the current user logged in
[B] gets a form to login as a different user
[C] name of the superuser
[D] all of the above
Correct Answer : name of the current user logged in
इनमें से कौन सी परिभाषा मॉड्यूल का सही वर्णन करती है?
Which of these definitions correctly describes a module ?
[A] Denoted by triple quotes for providing the specification of certain program elements
[B] Design and implementation of specific functionality to be incorporated into a program
[C] Defines the specification of how it is to be used
[D] Any program that reuses code
Correct Answer : Design and implementation of specific functionality to be incorporated into a program
पैकेज से सभी मॉड्यूल आयात करने के लिए कौन सा कथन सही है?
Which statement is correct to import all modules from the package ?
[A] from package import all
[B] from package import *
[C] from package include all
[D] from package include *
Correct Answer : from package import *
__________ तुरंत एक लूप को पूरी तरह से समाप्त कर देता है।
__________ immediately terminates a loop entirely.
[A] break
[B] continue
[C] pass
[D] none of these
Correct Answer : break
प्रोग्रामिंग भाषाओं के रूप में दर्शाया गया एक एल्गोरिदम __________ है।
An algorithm represented in the form of programming languages is __________.
[A] Flowchart
[B] Pseudo code
[C] Program
[D] None of the above
Correct Answer : Program
निम्नलिखित कोड का परिणाम क्या है ?
What is the output of the following code ?
import numpy as np
a = np.array([1.1,2,3])
print(a.dtype)
[A] int32
[B] float64
[C] float
[D] None
Correct Answer : float64
निम्नलिखित में से कौन से पायथन में वैध एस्केप अनुक्रम हैं?
Which of the following are valid escape sequences in Python ?
[A] \n
[B] \t
[C] \\
[D] All of the above
Correct Answer : All of the above
कथन 2 के लिए उत्तर चुनें.
Choose the answer for statement 2.
import ___________ # statement 1
rec = [ ]
while True:
rn = int(input("Enter"))
nm = input("Enter")
temp = [rn, nm]
rec.append(temp)
ch = input("Enter choice (Y/N)")
if ch.upper == "N":
break
f = open("stud.dat", "____________") #statement 2
__________ .dump(rec, f) #statement 3
_______.close( ) # statement 4
[A] w
[B] wb
[C] w+
[D] write
Correct Answer : wb
आइए मान लें कि 4 बाइनरी में 100 है और 11 1011 है। निम्नलिखित बिटवाइज़ का आउटपुट संचालक क्या है?
Let us assume 4 is 100 in binary and 11 is 1011. What is the output of the following bitwise operators ?
a = 4
b = 11
print(a | b)
print(a >> 2)
[A] 15 1
[B] 14 1
[C] 17 2
[D] 16 2
Correct Answer : 15 1
जब हम सूची ("हैलो") निष्पादित करते हैं तो आउटपुट क्या होता है?
What is the output when we execute list("hello") ?
[A] ['h', 'e', 'l', 'l', 'o']
[B] [' hello']
[C] ['llo']
[D] ['olleh']
Correct Answer : ['h', 'e', 'l', 'l', 'o']
निम्नलिखित में से कौन सा अपरिवर्तनीय डेटा प्रकार है?
Which one of the following is immutable data type ?
[A] list
[B] set
[C] tuple
[D] dict
Correct Answer : tuple
निम्नलिखित का आउटपुट क्या है?
What is the output of the following ?
i = 2
while True:
if i%3 == 0:
break
print(i,end=" " )
i += 2
[A] 2 4 6 8 10 ..
[B] 2 4
[C] 2 3
[D] error
Correct Answer : 2 4
निम्नलिखित कोड का आउटपुट क्या होगा?
What will be the output of following code ?
x = ['XX', 'YY']
for i in x
i.lower()
print(x)
[A] ['XX', 'YY']
[B] ['xx', 'yy']
[C] [XX, YY]
[D] None of the above
Correct Answer : ['XX', 'YY']
संरचनात्मक प्रोग्रामिंग में टॉप-डाउन दृष्टिकोण का पालन किया जाता है।
Top-down approach is followed in structural programming.
[A] True
[B] False
[C] Can‟t say
[D] May be
Correct Answer : True
निम्नलिखित में से कौन सा किसी फ़ंक्शन को कॉल करने का सही तरीका है?
Which one of the following is the correct way of calling a function ?
[A] function_name()
[B] call function_name()
[C] ret function_name()
[D] function function_name()
Correct Answer : function_name()
यदि किसी फ़ंक्शन में रिटर्न स्टेटमेंट नहीं है, तो निम्न में से कौन सा फ़ंक्शन रिटर्न करता है?
If a function does not have a return statement, which of the following does the function return ?
[A] int
[B] null
[C] An exception is thrown without return
[D] None
Correct Answer : None
__________ संरचना द्वारा की गई कार्रवाई अंततः लूप को समाप्त करने का कारण बनेगी।
The action performed by a __________ structure must eventually cause the loop to terminate.
[A] sequence
[B] process
[C] repetition
[D] case
Correct Answer : repetition
निम्नलिखित कोड के लिए आउटपुट क्या होगा?
What will be output for the following code ?
import numpy as np
a = np.array([11,2,3])
print(a.min())
[A] 2
[B] 1
[C] 11
[D] 3
Correct Answer : 2
कथन 4 के लिए उत्तर चुनें.
Choose the answer for statement 4.
import ___________ # statement 1
rec = [ ]
while True:
rn = int(input("Enter"))
nm = input("Enter")
temp = [rn, nm]
rec.append(temp)
ch = input("Enter choice (Y/N)")
if ch.upper == "N":
break
f = open("stud.dat", "____________") #statement 2
__________ .dump(rec, f) #statement 3
_______.close( ) # statement 4
[A] f
[B] rec
[C] file
[D] stud
Correct Answer : f
निम्नलिखित छद्म कोड का आउटपुट क्या होगा, जहां ʌ XOR ऑपरेशन का प्रतिनिधित्व करते हैं?
What will be the output of the following pseudo code, where ʌ represent XOR operation ?
Integer a, b, c
Set b = 5, a = 1
c = a ^ b
Print c
[A] 4
[B] 3
[C] 5
[D] 7
Correct Answer : 4
सुन्न सरणी की विशेषताएँ क्या हैं?
What are the attributes of numpy array ?
[A] shape, dtype, ndim
[B] objects, type, list
[C] objects, non vectorization
[D] Unicode and shape
Correct Answer : shape, dtype, ndim
कंप्यूटर विज्ञान में, एल्गोरिदम एक फ़्लोचार्ट के सचित्र प्रतिनिधित्व को संदर्भित करता है।
In computer science, algorithm refers to a pictorial representation of a flowchart.
[A] True
[B] False
[C] Can‟t say
[D] May be
Correct Answer : False
निम्नलिखित का आउटपुट क्या है?
What is the output of the following ?
for i in range(10):
if i == 5:
break
else:
print(i)
else:
print("Here")
[A] 0 1 2 3 4 Here
[B] 0 1 2 3 4 5 Here
[C] 0 1 2 3 4
[D] 1 2 3 4 5
Correct Answer : 0 1 2 3 4
मान लीजिए कि एक टुपल एआरआर में 10 तत्व हैं। आप टुपल के 5वें तत्व को 'हैलो' पर कैसे सेट कर सकते हैं?
Suppose a tuple arr contains 10 elements. How can you set the 5th element of the tuple to 'Hello' ?
[A] arr[4] = 'Hello'
[B] arr(4) = 'Hello'
[C] Elements of tuple cannot be changed
[D] arr[5] = 'Hello'
Correct Answer : Elements of tuple cannot be changed
एक फ़्लोचार्ट जो किसी प्रोग्राम के मुख्य खंडों को रेखांकित करता है।
A flowchart that outlines the main segments of a program.
[A] Queue
[B] Macro
[C] Micro
[D] Union
Correct Answer : Macro
निम्नलिखित कोड का परिणाम क्या है ?
What is the output of the following code ?
a = 15
b = 6
print(a and b)
print(a or b)
[A] True True
[B] False False
[C] 6 15
[D] 15 6
Correct Answer : 6 15
यदि उपयोगकर्ता ने 55 दर्ज किया है तो आउटपुट क्या है?
What is the output, if user has entered 55 ?
a=input("Enter a number")
print(type(a))
[A] int
[B] float
[C] double
[D] str
Correct Answer : str
a=5, b=8, c=6 के लिए निम्नलिखित एल्गोरिदम का आउटपुट क्या होगा?
What will be the output of the following algorithm for a=5, b=8, c=6 ?
Step 1: Start
Step 2: Declare variables a,b and c.
Step 3: Read variables a,b and c.
Step 4: If a > b
If a > c
Display a is the largest number.
Else
Display c is the largest number.
Else
If b > c
Display b is the largest number.
Else
Display c is the greatest number.
Step 5: Stop
[A] b is the largest number
[B] a is the largest number
[C] c is the largest number
[D] stop
Correct Answer : b is the largest number
निम्नलिखित में से कौन सा फ़ंक्शन दो तर्क लेता है?
Which of the following function takes two arguments ?
[A] load()
[B] dump()
[C] both of the above
[D] none of the above
Correct Answer : dump()
छद्म कोड में पदानुक्रम को __________ द्वारा दिखाया जा सकता है।
Hierarchy in a pseudo-code can be shown by __________.
[A] Curly Braces
[B] Round Brackets
[C] Indentation
[D] Semicolon
Correct Answer : Indentation
यदि फ़ाइल मौजूद नहीं है तो कौन सा मोड एक नई फ़ाइल बनाता है?
Which mode creates a new file if the file does not exist ?
[A] write mode
[B] append mode
[C] both (A) & (B)
[D] none of the above
Correct Answer : both (A) & (B)
पायथन में कौन सा फ़ंक्शन फ़ाइल खोलता है?
Which function opens file in python ?
[A] open()
[B] Open()
[C] new()
[D] None of the above
Correct Answer : open()
निम्नलिखित कोड का आउटपुट क्या है?
What is the output of following code ?
a1={1:"A",2:"B",3:"C"}
b1={4:"D",5:"E"}
b1.update(a1)
print(b1)
[A] {4: 'D', 5: 'E', 1: 'A', 2: 'B', 3: 'C'}
[B] {1: 'A', 2: 'B', 3: 'C', 4: 'D', 5: 'E'}
[C] {4: 'D', 5: 'E'}
[D] None of these
Correct Answer : {4: 'D', 5: 'E', 1: 'A', 2: 'B', 3: 'C'}
कौन सा कथन एक फ़ाइल (फ़ाइल ऑब्जेक्ट „f‟) से 5 अक्षर पढ़ेगा?
Which statement will read 5 characters from a file(file object „f‟) ?
[A] f.read()
[B] f.read(5)
[C] f.reads(5)
[D] None of the above
Correct Answer : f.read(5)
प्रोग्राम में फ़ंक्शन नाम के बाद __________ लिखकर फ़ंक्शन को कॉल किया जा सकता है।
The function can be called in the program by writing function name followed by __________.
[A] [ ]
[B] { }
[C] ( )
[D] None of the above
Correct Answer : ( )
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code ?
from math import *
ceil(3.4)
[A] 4
[B] 3
[C] 3.5
[D] None of these
Correct Answer : 4
निम्नलिखित ऑब्जेक्ट का डेटा प्रकार क्या है?
What is the data type of following object ?
A = [5,‟abc‟,3.2,6]
[A] tuple
[B] array
[C] list
[D] dictionary
Correct Answer : list
एक __________ पूरे प्रोग्राम को स्कैन करता है और इसे संपूर्ण मशीन कोड में अनुवादित करता है।
A __________ scans the entire program and translates it as a whole into machine code.
[A] Compiler
[B] Interpreter
[C] Debugger
[D] None of the above
Correct Answer : Compiler
चरों के बदलते मूल्यों की जांच को स्टेपिंग कहा जाता है।
The examination of changing values of variables is called stepping.
[A] True
[B] False
[C] Can‟t say
[D] May be
Correct Answer : False
निम्नलिखित कोड का आउटपुट क्या है?
What is the output of following code ?
A=[[1,2,3],
[4,5,6],
[7,8,9]]
print(A[1][:])
[A] [1, 2, 3]
[B] [4, 5, 6]
[C] [2, 5, 8]
[D] None of these
Correct Answer : [4, 5, 6]
NumPY का मतलब है?
NumPY stands for ?
[A] Numbering Python
[B] Number In Python
[C] Numerical Python
[D] None of the above
Correct Answer : Numerical Python
कोडिंग के दौरान सॉफ़्टवेयर गलतियों को __________ के रूप में जाना जाता है।
Software mistakes during coding are known as __________.
[A] errors
[B] bugs
[C] failures
[D] defects
Correct Answer : bugs
निम्नलिखित कोड का परिणाम क्या है ?
What is the output of the following code ?
import numpy as np
a = np.array([[1,2,3],[4,5,6],[7,8,9]])
print(a.shape)
[A] (2, 3)
[B] (3, 3)
[C] (1,1)
[D] None of these
Correct Answer : (3, 3)
print((-3)** 2) का आउटपुट क्या है?
What is the output of print((-3)** 2) ?
[A] -9
[B] 6
[C] -6
[D] 9
Correct Answer : 9
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code ?
def say(message, times = 1):
print(message * times)
say('Hello')
say('World', 5)
[A] Hello WorldWorldWorldWorldWorld
[B] Hello World5
[C] Hello World,World,World,World,World
[D] Hello HelloHelloHelloHelloHello
Correct Answer : Hello WorldWorldWorldWorldWorld
समांतर चतुर्भुज द्वारा निरूपित संक्रिया को __________ कहा जाता है।
The operation represented by a parallelogram is called as__________.
[A] Input/Output
[B] Comparison
[C] Assignment
[D] Conditions
Correct Answer : Input/Output
निम्नलिखित कोड का परिणाम क्या है ?
What is the output of the following code ?
import numpy as np
a = np.array([[1,2,3]])
print(a.ndim)
[A] 1
[B] 2
[C] 3
[D] 0
Correct Answer : 2
निम्नलिखित में से कौन सा अंतर्निहित फ़ंक्शन नहीं है?
Which of the following is not the built-in function ?
[A] input( )
[B] tuple( )
[C] print( )
[D] dictionary( )
Correct Answer : dictionary( )
निम्नलिखित कोड खंड क्या प्रिंट करेगा?
What will following code segment print ?
a = True
b = False
c = False
if a or b and c:
print "HELLO"
else:
print "hello"
[A] HELLO
[B] Hello
[C] HellO
[D] None of these
Correct Answer : HELLO
निम्नलिखित में से कौन सा नंबर निम्नलिखित कोड द्वारा कभी भी उत्पन्न नहीं किया जा सकता है:
Which of the following number can never be generated by the following code :
random.randrange(0, 50)
[A] 0
[B] 1
[C] 49
[D] 50
Correct Answer : 50
निम्नलिखित का आउटपुट क्या है?
What is the output of the following ?
x = 'abcd'
for i in range(x):
print(i)
[A] a b c d
[B] 0 1 2 3
[C] error
[D] none of the mentioned
Correct Answer : error
निम्नलिखित में से कौन सा आइटम फ़ंक्शन हेडर में मौजूद है?
Which of the following items are present in the function header ?
[A] function name
[B] parameter list
[C] return value
[D] Both (A) and (B)
Correct Answer : Both (A) and (B)
निम्नलिखित कोड का परिणाम क्या है ?
What is the output of the following code ?
y = "I love Python"
y[3] = 's'
print(y)
[A] snow
[B] snow world
[C] Error
[D] snos world
Correct Answer : Error
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code ?
min(max(False,-3,-4), 2,7)
[A] -4
[B] -3
[C] 2
[D] False
Correct Answer : False
निम्नलिखित का आउटपुट क्या है?
What is the output of the following ?
t=(2, 3, 4, 3.5, 5, 6)
print(sum(t) + t.count(2))
[A] 24
[B] 23.5
[C] 24.5
[D] 25.5
Correct Answer : 24.5
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code ?
def sayHello():
print("Hello World!‟)
sayHello()
sayHello()
[A] Hello World! Hello World!
[B] "Hello World!‟ "Hello World!‟
[C] Hello Hello
[D] None of the above
Correct Answer : Hello World! Hello World!
पायथन में निम्नलिखित में से किस फ़ंक्शन का उपयोग होता है?
Which of the following is the use of function in python ?
[A] Functions are reusable pieces of programs
[B] Functions don‟t provide better modularity for your application
[C] You can‟t also create your own functions
[D] All of the mentioned
Correct Answer : Functions are reusable pieces of programs
किस डेटा प्रकार में अनुक्रमण मान्य नहीं है?
In which data type, indexing is not valid ?
[A] list
[B] dictionary
[C] string
[D] none of the above
Correct Answer : dictionary
पायथन में एक सूची को दूसरे में कैसे कॉपी करें?
How to copy one list to another in Python ?
[A] a1 = list(a2)
[B] a1 = a2.copy()
[C] a1[] = a2[:]
[D] All of these
Correct Answer : All of these
निम्नलिखित कोड का परिणाम क्या है ?
What is the output of the following code ?
a = 50
b = a= a*5
print(b)
[A] 250
[B] 10
[C] 50
[D] Syntax Error
Correct Answer : 250
पायथॉन किस भाषा में लिखा गया है?
In which language is Python written ?
[A] C
[B] C++
[C] Java
[D] None of these
Correct Answer : C
सही फ़ंक्शन हेडर को पहचानें.
Identify the correct function header.
[A] def fun(a=2, b=3, c)
[B] def fun(a=2, b, c=3)
[C] def fun(a, b=2, c=3)
[D] def fun(a, b, c=3, d)
Correct Answer : def fun(a, b=2, c=3)
निम्नलिखित में से कौन सी फाइल किसी टेक्स्ट एडिटर में खोली जा सकती है?
Which of the following file can be opened in any text editor ?
[A] Binary
[B] text
[C] Both of the above
[D] None of the above
Correct Answer : text
निम्नलिखित में से कौन सा सही है?
Which one of the following is correct ?
[A] Dictionary can have two same keys with different values
[B] Dictionary can have two same values with different keys
[C] Dictionary can have two same keys or same values but cannot have two same key-value pair
[D] Dictionary can neither have two same keys nor two same values
Correct Answer : Dictionary can have two same values with different keys
Function के लिए कौन सा कीवर्ड प्रयोग किया जाता है?
Which keyword is used for function ?
[A] fun
[B] def
[C] define
[D] function
Correct Answer : def
निम्नलिखित कोड का उद्देश्य क्या है?
What is the purpose of the following code ?
import numpy as np
z=[1,2,3]
y=np.array(z)
[A] to convert z to array
[B] to convert z to list
[C] Both of the above
[D] None of the above
Correct Answer : to convert z to array