Solved - O Level Python Paper January 2023
निम्नलिखित में से कौन सा नियंत्रण नहीं है संरचना ?
Which of the following is not a control structure ?
[A] Loop
[B] Process
[C] Decision
[D] None of these
Correct Answer : Process
दो संख्याओं का योग करने के लिए, फ्लो चार्ट में निम्नलिखित में से कौन सा प्रतीक उपयोग किया जाता है?
For performing the addition of two numbers, which of the following symbol in a flow chart are used ?
[A] Control flow
[B] Terminal
[C] Processing
[D] Decision
Correct Answer : Processing
निम्नलिखित में से कौन सा फ़ंक्शन पायथन में बिल्ट-इन फ़ंक्शन है?
Which of the following functions is a built-in function in python ?
[A] factorial()
[B] print()
[C] seed()
[D] sqrt()
Correct Answer : print()
NumPY का अर्थ है:
NumPY stands for :
[A] Numbering Python
[B] Number In Python
[C] Numerical Python
[D] None of the above
Correct Answer : Numerical Python
एक प्रवाह चार्ट में दो ब्लॉक कनेक्ट करने के लिए फ़्लोलाइन के रूप में किस प्रतीक का उपयोग किया जाता है?
Which symbol is used as a flowline to connect two blocks in a flow chart ?
[A] arrow
[B] circle
[C] box
[D] parallelogram
Correct Answer : arrow
की सही फ़ंक्शन घोषणा चुनें fun1() ताकि हम निम्नलिखित दो फ़ंक्शन कॉल सफलतापूर्वक निष्पादित कर सकें।
Choose the correct function declaration of fun1() so that we can execute the following two function calls successfully.
[A] def fun1(**kwargs)
[B] def fun1(args*)
[C] No, it is not possible in Python
[D] def fun1(*data)
Correct Answer : def fun1(*data)
कौन सा कथन a से एक पंक्ति लौटाएगा? फ़ाइल (फ़ाइल ऑब्जेक्ट 'एफ' है)?
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( )
__________ फ़ंक्शन करंट लौटाता है फ़ाइल सूचक की स्थिति.
__________ function returns the current position of file pointer.
[A] get( )
[B] tell( )
[C] seek( )
[D] cur( )
Correct Answer : tell( )
निम्नलिखित कोड का परिणाम क्या है स्निपेट?
What is the output of the following code snippet ?
print([i.lower() for i in “HELLO”])
[A] hello
[B] [‘h’, ‘e’, ‘l’, ‘l’, ‘o’]
[C] hel
[D] HELLO
Correct Answer : [‘h’, ‘e’, ‘l’, ‘l’, ‘o’]
संरचित कार्यक्रम को तोड़ा जा सकता है __________ एक से अधिक डेवलपर को असाइन करना
Structured program can be broken into __________ to assign to more than one developer.
[A] Segments
[B] Modules
[C] Units
[D] All the above
Correct Answer : Modules
निम्नलिखित का आउटपुट क्या होगा छद्म कोड?
What will be the output of the following pseudo code ?
Integer a, b
Set a = 10, b = 5
a = a mod (a - 6)
b = b mod (b - 2)
Print a – b
[A] 4
[B] 0
[C] 1
[D] 8
Correct Answer : 0
रीडलाइन() विधि क्या लौटाती है?
What does readlines() method return ?
[A] Dictionary
[B] String
[C] Tuple
[D] List
Correct Answer : List
निम्नलिखित का आउटपुट क्या होगा छद्म कोड, जहां संचालन और प्रतिनिधित्व करते हैं?
What will be the output of the following pseudo code, where & represent And operation ?
Integer a, b, c
Set b = 5, a = 1
c = a & b
Print c
[A] 1
[B] 3
[C] 5
[D] 7
Correct Answer : 1
निम्नलिखित कोड का परिणाम क्या है ? एनपी के रूप में सुन्न आयात करें
What is the output of the following code ?
import numpy as np
a = np.array([1,2,3,5,8])
b = np.array([0,3,4,2,1])
c = a + b
c = c*a
print (c[2])
[A] 10
[B] 21
[C] 12
[D] 28
Correct Answer : 21
निम्नलिखित कोड का आउटपुट क्या है? एनपी के रूप में सुन्न आयात करें
What is the output of following code ? import numpy as np
a = np.array([[1,2,3],[4,5,6]])
print(a.shape)
[A] (2, 3)
[B] (3, 2)
[C] (1, 1)
[D] None of these
Correct Answer : (2, 3)
निम्नलिखित कथन में 'f' क्या है?
What is ‘f’ in the following statement ?
f=open(“Data.txt”, “r”)
[A] File Name
[B] File Handle
[C] Mode of file
[D] File Handling
Correct Answer : File Handle
पायथन अनाम के निर्माण का समर्थन करता है नामक निर्माण का उपयोग करके रनटाइम पर कार्य करता है __________.
Python supports the creation of anonymous functions at runtime, using a construct called __________.
[A] pi
[B] anonymous
[C] lambda
[D] none of the above
Correct Answer : lambda
निम्नलिखित कोड का परिणाम क्या है ?
What is the output of the following code ?
WM=[‘b’ * x for x in range(4)]
print(WM)
[A] [‘’, ‘b’, ‘bb’, ‘bbb’]
[B] [‘b’, ‘bb’, ‘bbb’, ‘bbbb’]
[C] [ ‘b’, ‘bb’, ‘bbb’]
[D] None of these
Correct Answer : [‘’, ‘b’, ‘bb’, ‘bbb’]
निम्नलिखित कोड का परिणाम क्या है ? एनपी के रूप में सुन्न आयात करें
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 : 1
कंप्यूटर सिस्टम का मस्तिष्क __________ है।
The brain of computer system is __________.
[A] RAM
[B] CPU
[C] ROM
[D] Control Unit
Correct Answer : CPU
निम्नलिखित में से कौन सा पायथन में एक वैध अंकगणित ऑपरेटर है?
Which of the following is a valid arithmetic operator in Python ?
[A] //
[B] ?
[C] <
[D] and
Correct Answer : //
निम्नलिखित कोड के लिए आउटपुट क्या होगा?
What will be output for the following code ?
import numpy as np
a = np.array([[1,2,3],[0,1,4]])
print (a.size)
[A] 1
[B] 5
[C] 6
[D] 4
Correct Answer : 6
जबकि अनुक्रम तर्क का उपयोग नहीं किया जाएगा __________.
The sequence logic will not be used while __________.
[A] Subtracting two numbers
[B] Comparing two data values
[C] Providing output to the user
[D] Adding two numbers
Correct Answer : Comparing two data values
निम्नलिखित का आउटपुट क्या होगा?
What will be the output of following ?
Y=[2,5J,6]
Y.sort()
[A] [2,6,5J]
[B] [5J,2,6]
[C] Error
[D] [6,5J,2]
Correct Answer : Error
बाइनरी में डेटा लिखने के लिए किस फ़ंक्शन का उपयोग किया जाता है?
Which function is used to write data in binary mode ?
[A] write
[B] writelines
[C] dump
[D] pickle
Correct Answer : dump
एक मॉड्यूल को दूसरे मॉड्यूल में उपयोग करने के लिए, आपको यह इसे ________ कथन का उपयोग करके आयात करना होगा
To use a module in another module, you must import it using an ________ statement.
[A] import
[B] include
[C] both (A) and (B)
[D] none of the above
Correct Answer : import
निम्नलिखित में से कौन सी घोषणा ग़लत है?
Which of the following declarations is incorrect ?
[A] _x = 2
[B] x = 3
[C] __xyz__ = 5
[D] None of these
Correct Answer : None of these
एक _______ कथन का उपयोग तब किया जाता है जब a वाक्यविन्यास की दृष्टि से कथन आवश्यक है लेकिन आप ऐसा करते हैं नहीं चाहता कि कोई कोड निष्पादित हो।
A _______ statement is used when a statement is required syntactically but you do not want any code to execute.
[A] break
[B] pass
[C] continue
[D] none of these
Correct Answer : pass
किसी फ़ंक्शन के बाहर परिभाषित एक वेरिएबल क्या है? के रूप में भेजा ?
What is a variable defined outside a function referred to as ?
[A] A static variable
[B] A global variable
[C] A local variable
[D] An automatic variable
Correct Answer : A global variable
फ्लो चार्ट में पतंग/हीरे के प्रतीक का प्रयोग किया जाता है के लिए __________।
Kite/diamond symbol in flow chart is used for __________.
[A] Execution
[B] Decision
[C] Statement
[D] All of the above
Correct Answer : Decision
x का डेटाटाइप क्या है?
What is the datatype of x ?
import numpy as np
a=np.array([1,2,3,4])
x= a.tolist()
[A] int
[B] array
[C] tuple
[D] list
Correct Answer : list
f.read(5) एक फ़ाइल (फ़ाइल) से __________ पढ़ेगा वस्तु 'एफ')।
f.read(5) will read __________ from a file (file object ‘f’).
[A] 5 characters
[B] 5 words
[C] 5 lines
[D] None of the above
Correct Answer : 5 characters
निम्नलिखित का आउटपुट क्या होगा पायथन कोड?
What will be the output of the following Python code ?
>>>list1 = [1, 3]
>>>list2 = list1
>>>list1[0] = 4
>>>print(list2)
[A] [1, 4]
[B] [1, 3, 4]
[C] [4, 3]
[D] [1, 3]
Correct Answer : [4, 3]
निम्नलिखित कथन का परिणाम क्या होगा?
What will be the output of following statement ?
>>>”m”+”nl”
[A] ‘m+nl’
[B] ‘mnl’
[C] ‘m nl’
[D] ‘m’
Correct Answer : ‘mnl’
पायथन के संबंध में सही विकल्प चुनें
Choose the correct option with respect to Python.
[A] Both tuples and lists are immutable
[B] Tuples are immutable while lists are mutable
[C] Both tuples and lists are mutable
[D] Tuples are mutable while lists are immutable
Correct Answer : Tuples are immutable while lists are mutable
निम्नलिखित स्निपेट कोड का आउटपुट क्या होगा?
What will be the output of the following code snippet ?
d = {3, 4, 5}
for k in d:
print(k)
[A] {3, 4, 5} {3, 4, 5} {3, 4, 5}
[B] 3 4 5
[C] Syntax Error
[D] None of the above
Correct Answer : None of the above
फ्लो चार्ट और एल्गोरिदम का उपयोग किया जाता है __________.
Flow charts and Algorithms are used for __________.
[A] Better Programming
[B] Optimized Coding
[C] Systematic testing
[D] All the above
Correct Answer : All the above
एक _____________ जानकारी संग्रहीत करता है ASCII या यूनिकोड की एक धारा का रूप पात्र यानि मानव पठनीय।
A _____________ stores information in the form of a stream of ASCII or unicode characters i.e. human readable.
[A] Text file
[B] Binary file
[C] Both (A) and (B)
[D] None of these
Correct Answer : Text file
निम्नलिखित कोड खंड क्या प्रिंट करेगा?
What will following code segment print ?
if True or True:
if False and True or False:
print(‘A’)
elif False and False or True and True:
print(‘B’)
else:
print(‘C’)
else:
print(‘D’)
[A] A
[B] B
[C] C
[D] D
Correct Answer : B
पायथन भाषा में, निम्नलिखित में से कौन सा k को शक्ति एल बढ़ाने के लिए ऑपरेटर सही विकल्प है?
In python language, which of the following operators is the correct option for raising k to the power l ?
[A] k ^ l
[B] k**l
[C] k ^ ^ l
[D] k ^ *l
Correct Answer : k**l
निम्नलिखित का आउटपुट क्या होगा पायथन कोड?
What will be the output of the following Python code ?
example = “helle”
example.rfind(“e”)
[A] 1
[B] 2
[C] 4
[D] 5
Correct Answer : 4
निम्नलिखित में से कौन सा मॉड्यूल का उपयोग करने का लाभ नहीं है ?
Which of the following is not an advantage of using modules ?
[A] Provides a means of reuse of program code
[B] Provides a means of dividing up tasks
[C] Provides a means of reducing the size of the program
[D] Provides a means of testing individual parts of the program
Correct Answer : Provides a means of reducing the size of the program
निम्नलिखित पायथन कोड का आउटपुट क्या है?
What is the output of following Python code ?
>>>print(5*(2//3))
[A] 3
[B] 3.3
[C] 0
[D] error
Correct Answer : 0
निम्नलिखित कोड के लिए आउटपुट क्या होगा?
What will be output for the following code ?
import numpy as np
a = np.array([1,2,3,5,8])
print (a.ndim)
[A] 0
[B] 1
[C] 2
[D] 3
Correct Answer : 1
निम्नलिखित में से पायथन में हेरफेर कार्य कौन सी वैध स्ट्रिंग हैं?
Which of the following are valid string manipulation functions in Python ?
[A] count()
[B] upper()
[C] strip()
[D] All of the above
Correct Answer : All of the above
निम्नलिखित का आउटपुट क्या होगा पायथन कोड?
What will be the output of the following Python code ?
from math import *
floor(11.7)
[A] 12
[B] 11
[C] 11.0
[D] None of these
Correct Answer : 11
कौन सा कथन फ़ाइल पॉइंटर 10 को स्थानांतरित करेगा वर्तमान स्थिति से बाइट्स पीछे की ओर?
Which statement will move file pointer 10 bytes backward from current position ?
[A] f.seek(-10, 0)
[B] f.seek(10, 0)
[C] f.seek(-10, 1)
[D] none of the above
Correct Answer : f.seek(-10, 1)
हम एक फ़ाइल को राइट मोड में खोलने का प्रयास करते हैं मौजूद नहीं ?निम्नलिखित में से कौन सी त्रुटि कब लौटाई जाती है?
Which of the following error is returned when we try to open a file in write mode which does not exist ?
[A] File Found Error
[B] File Not Exist Error
[C] File Not Found Error
[D] none of the above
Correct Answer : none of the above
का आउटपुट क्या होगा 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 smallest number.
Else
Display c is the smallest number.
Else
If b < c
Display b is the smallest number.
Else
Display c is the smallest number.
Step 5 : Stop
[A] a is the smallest number
[B] b is the smallest number
[C] c is the smallest number
[D] stop
Correct Answer : a is the smallest number
निम्नलिखित में से कौन सी त्रुटि दिया गया कोड लौटाई गई है?
Which of the following error is returned by the given code ?
>>> f = open(“test.txt”,”w”)
>>> f.write(345)
[A] Syntax Error
[B] Type Error
[C] String Error
[D] Run Time Error
Correct Answer : Type Error
बाइनरी फ़ाइल जानकारी किस प्रारूप में होती है?
In which format Binary file contains information ?
[A] Quick response code
[B] Same format in which the data is held in memory
[C] ASCII format
[D] Unicode format
Correct Answer : Same format in which the data is held in memory
निम्नलिखित का आउटपुट क्या होगा पायथन कोड?
What will be the output of the following Python code ?
from math import factorial
print(math.factorial(5))
[A] 120
[B] Nothing is printed
[C] Error, method factorial doesn’t exist in math module
[D] Error, the statement should be : print(factorial(5))
Correct Answer : Error, the statement should be : print(factorial(5))
निम्नलिखित में से कौन सा शब्द पायथन भाषा का कीवर्ड नहीं है?
Which of the following words is not a keyword of python language ?
[A] val
[B] raise
[C] try
[D] with
Correct Answer : val
किसी तत्व (5) को 1 सूची में जोड़ने के लिए किस फ़ंक्शन का उपयोग किया जाता है?
Which function is used to add an element (5) in the list1 ?
[A] list1.sum(5)
[B] list1.add(5)
[C] list1.append(5)
[D] list1.addelement(5)
Correct Answer : list1.append(5)
निम्नलिखित का आउटपुट क्या है?
What is the output of the following ?
y = ‘klmn’
for i in range(len(y)):
print(y)
[A] klmn klmn klmn klmn
[B] k
[C] k k k
[D] None of the these
Correct Answer : klmn klmn klmn klmn
हार्डवेयर चलाने के लिए निम्नलिखित में से कौन सा सॉफ्टवेयर आवश्यक है?
Which of the following software is required to run the hardware ?
[A] Task Manager
[B] Task Bar
[C] Program Manager
[D] Device Driver
Correct Answer : Device Driver
निम्नलिखित में से किसमें डेटा स्थायी रूप से संग्रहीत किया जाता है?
In which of the following, data is stored permanently ?
[A] Variable
[B] File
[C] Both of the above
[D] None of the above
Correct Answer : File
जिसमें सॉफ्टवेयर विकास चरण में सॉफ्टवेयर की गुणवत्ता का दस्तावेजीकरण किया गया है?
In which software development phase quality of software is documented ?
[A] Testing
[B] Delivery
[C] Idea
[D] Development
Correct Answer : Testing
पायथन में शून्य () फ़ंक्शन का उपयोग क्या है?
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 element 0
[C] To make a Matrix with first row 0
[D] None of the above
Correct Answer : To make a Matrix with all element 0
निम्नलिखित पायथन कोड का आउटपुट क्या होगा ?
What will be the output of the following Python code ?
x = ‘abcd’
for i in x:
print(i.upper())
[A] a B C D
[B] a b c d
[C] error
[D] A B C D
Correct Answer : A B C D
पुनरावर्ती कार्य __________ है।
Recursive function is __________.
[A] A function that calls itself
[B] A function that calls other functions
[C] Both (A) and (B)
[D] None of the above
Correct Answer : A function that calls itself
यदि फ़ाइल अस्तित्व में नहीं है तो कौन सा मोड एक नई फ़ाइल बनाता है?
Which mode creates a new file if the file does not exist ?
[A] write mode
[B] read mode
[C] append mode
[D] Both (A) and (C)
Correct Answer : Both (A) and (C)
निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?
What will be the output of the following code snippet ?
from math import *
a = 2.19
b = 3.999999
c = -3.30
print(int(a), floor(b), ceil(c), fabs(c))
[A] 2 3 -3 3
[B] 3 4 -3 3
[C] 2 3 -3 3
[D] 2 3 -3 -3.3
Correct Answer : 2 3 -3 3
डेटा किस प्रकार का है: arr = [(1, 1), (2, 2), (3,3)] ?
What type of data is : arr = [(1, 1), (2, 2), (3, 3)] ?
[A] List of tuples
[B] Tuples of lists
[C] Array of tuples
[D] Invalid type
Correct Answer : List of tuples
पायथन भाषा में, निम्नलिखित में से कौन सा परिवर्तनीय के रूप में परिभाषित नहीं किया जा सकता?
In python language, which of the following cannot be defined as variable ?
[A] _val
[B] val
[C] try
[D] _try_
Correct Answer : try
निम्नलिखित कोड के लिए आउटपुट क्या होगा?
What will be output for the following code ?
import numpy as np
ary = np.array([1,2,3,5,8])
ary = ary + 1
print (ary[1])
[A] 0
[B] 1
[C] 2
[D] 3
Correct Answer : 3
निम्नलिखित कोड का परिणाम क्या है ?
What is the output of the following code ?
a = set(‘abc’)
b = set(‘cdef’)
print(a&b)
[A] {‘c’}
[B] {‘a’,’b’,’c’,’d’,’e’,’f’}
[C] {c}
[D] None of these
Correct Answer : {‘c’}
निम्नलिखित में से कौन शब्दकोश में key=”tiger” के लिए कुंजी-मान को हटा देगा?
Which of the following will delete key-value pair for key=”tiger” in dictionary ?
dic={“lion”:”wild”,”tiger”:”wild”,”cat”:”domestic”,“dog”.”domestic”}
[A] del dic[“tiger”]
[B] dic[“tiger”].delete()
[C] delete(dic.[“tiger”])
[D] del(dic.[“tiger”])
Correct Answer : del dic[“tiger”]
निम्नलिखित Python का कोड क्या है?
What is the value of the following Python code ?
>>>print(36 / 4)
[A] 9
[B] 4
[C] 9.0
[D] 4.0
Correct Answer : 9.0
डिबगिंग सॉफ्टवेयर में __________एक को ठीक करने की प्रक्रिया है।
Debugging is the process of fixing a__________ in the software.
[A] procedure
[B] function
[C] bug
[D] None of these
Correct Answer : bug
निम्नलिखित का आउटपुट क्या होगा?
What will be the output of the following ?
print(sum(1,2,3))
[A] Error
[B] 6
[C] 1
[D] 3
Correct Answer : Error
निम्नलिखित का आउटपुट क्या है?
What is the output of the following ?
n=5
while n>0:
n-=1
if n ==2:
continue
print(n)
[A] 5 4 3 1 0
[B] 4 3 1 0
[C] 4 3 2
[D] None of these
Correct Answer : 4 3 1 0
निम्नलिखित का आउटपुट क्या है?
What is the output of the following ?
print(max([1, 2, 3, 4], [4, 5, 6], [7]))
[A] [4, 5, 6]
[B] [7]
[C] [1, 2, 3, 4]
[D] 7
Correct Answer : [7]
एक एल्गोरिदम का सचित्र प्रतिनिधित्व __________ कहा जाता है।
Pictorial representation of an algorithm is called as __________.
[A] Statement
[B] Program
[C] Flow chart
[D] All the above
Correct Answer : Flow chart
पैकेज से मॉड्यूल सभी को आयात करने के लिए कौन सा कथन सही है?
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 *
निम्नलिखित का आउटपुट क्या है?
What is the output of the following ?
m = 0
while m < 5:
print(m)
m += 1
if m == 3:
break
else:
print(0)
[A] 0 1 2 0
[B] 0 1 2
[C] 0 0 1 0 2
[D] error
Correct Answer : 0 0 1 0 2
जब हम फ़ाइल को अपेंड मोड में खोलते हैं तो फ़ाइल सूचक फ़ाइल के _________ पर है।
When we open file in append mode the file pointer is at the _________ of the file.
[A] anywhere in between the file
[B] end
[C] beginning
[D] second line of the file
Correct Answer : end
निम्नलिखित अभिव्यक्ति का आउटपुट क्या होगा?
What will be the output of the following expression ?
x = 14
print(x>>2)
[A] 14
[B] 1
[C] 3
[D] 2
Correct Answer : 3
"फॉर लूप" के अंदर की सामग्री _____________ द्वारा अलग किया गया हैं:
The contents inside the “for loop” are separated by :
[A] colon
[B] comma
[C] semicolon
[D] hyphen
Correct Answer : semicolon
निम्नलिखित में से किस प्रतीक का प्रयोग किया जाता है फ्लो चार्ट में आउटपुट का प्रतिनिधित्व करें?
Which of the following symbols is used to represent output in a flow chart ?
[A] Square
[B] Circle
[C] Parallelogram
[D] Triangle
Correct Answer : Parallelogram
निम्नलिखित कोड का परिणाम क्या है ?
What is the output of the following code ?
n2=4
def s(n1):
print(n1)
n1 = n1 +2
n2=4
s(n2)
print(n2)
[A] 6 4
[B] 4 6
[C] 4 4
[D] 6 6
Correct Answer : 4 4
निम्नलिखित में से कौन सा अपरिवर्तनीय डेटा प्रकार है?
Which one of the following is immutable data type ?
[A] list
[B] set
[C] tuple
[D] dict
Correct Answer : tuple
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code ?
def func(a, b=5, c=10):
print(‘a is’, a, ‘and b is’, b, ‘and c is’, c)
func(13, 17)
func(a=2, c=4)
func(5,7,9)
[A] a is 13 and b is 15 and c is 10 a is 2 and b is 5 and c is 4 a is 5 and b is 7 and c is 9
[B] a is 13 and b is 17 and c is 10 a is 2 and b is 4 and c is 4 a is 5 and b is 9 and c is 7
[C] a is 13 and b is 17 and c is 10 a is 2 and b is 5 and c is 4 a is 5 and b is 7 and c is 9
[D] None of the above
Correct Answer : a is 13 and b is 17 and c is 10 a is 2 and b is 5 and c is 4 a is 5 and b is 7 and c is 9
निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?
What will be the output of the following code snippet ?
numbers = (4, 7, 19, 2, 89, 45, 72, 22)
sorted_numbers = sorted(numbers)
odd_numbers = [x for x in sorted_numbers if
x % 2 != 0]
print(odd_numbers)
[A] [7, 19, 45, 89]
[B] [2, 4, 22, 72]
[C] [4, 7, 19, 2, 89, 45, 72, 22]
[D] [2, 4, 7, 19, 22, 45, 72, 89]
Correct Answer : [7, 19, 45, 89]
पायथन भाषा में कोड का ब्लॉक निम्नलिखित में से किसका उपयोग a को परिभाषित करने के लिए किया जाता है?
Which of the following is used to define a block of code in Python language ?
[A] try
[B] Brackets
[C] Indentation
[D] Catch
Correct Answer : Indentation
निम्नलिखित में से कौन सा फ़ाइल की सामग्री (फ़ाइल ऑब्जेक्ट 'एफ')पूरा पढ़ा जाएगा?
Which of the following will read entire content of file (file object ‘f’) ?
[A] f.reads( )
[B] f.read( )
[C] f.read(all)
[D] f.read( * )
Correct Answer : f.read( )
फ्लो चार्ट के लिए कनेक्टर प्रतीक __________है
The connector symbol for flow chart is__________.
[A] Circle
[B] Parallelogram
[C] Diamond
[D] All the above
Correct Answer : Circle
पायथन __________ में लिखा गया है।
Python is written in __________.
[A] Java
[B] C
[C] PHP
[D] All of the above
Correct Answer : C
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code ?
d1={“abc”:5,”def”:6,”ghi”:7}
print(d1[0])
[A] abc
[B] 5
[C] {“abc”:5}
[D] Error
Correct Answer : Error
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code ?
len([“hello”,2, 4, 6])
[A] Error
[B] 6
[C] 4
[D] 3
Correct Answer : 4
Python फ़ाइल का सही एक्सटेंशन____________ है
The correct extension of the Python file is____________.
[A] .py
[B] .pyth
[C] .python
[D] None of these
Correct Answer : .py
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code ?
def display(b, n):
while n>0:
print(b, end=””)
n=n-1
display(‘z’, 3)
[A] zzz
[B] zz
[C] Infinite loop
[D] An exception is thrown
Correct Answer : zzz
निम्नलिखित कोड के लिए आउटपुट क्या होगा?
What will be output for the following code ?
import numpy as np
a = np.array( [2, 3, 4, 5] )
print(a.dtype)
[A] int 32
[B] int
[C] float
[D] None of these
Correct Answer : int 32
एक स्ट्रिंग x=”hello” दिया गया x.count('l') का आउटपुट क्या है?
Given a string x=”hello” What is the output of x.count(‘l’) ?
[A] 2
[B] 1
[C] 0
[D] none
Correct Answer : 2
एक विस्तृत प्रवाह चार्ट को __________ कहा जाता है।
A detailed flow chart is called as __________.
[A] stack
[B] macro
[C] micro
[D] union
Correct Answer : micro
असेंबली भाषा को मशीनी भाषा में को परिवर्तित करने के लिए किस अनुवादक का उपयोग किया जाता है?
Which translator is used to convert assembly language into machine language ?
[A] Compiler
[B] Interpreter
[C] Assembler
[D] None of these
Correct Answer : Assembler
निम्नलिखित का आउटपुट क्या है?
What is the output of the following ?
x=123
for i in x:
print(i)
[A] 1 2 3
[B] 123
[C] Error
[D] None of these
Correct Answer : Error
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code ?
tuple1=(5,1,7,6,2)
tuple1.pop(2)
print(tuple1)
[A] (5,1,6,2)
[B] (5,1,7,6)
[C] (5,1,7,6,2)
[D] Error
Correct Answer : Error
छद्म कोड में पदानुक्रम ___________द्वारा दिखाया जा सकता है:
Hierarchy in a pseudo-code can be shown by :
[A] Curly Braces
[B] Round Brackets
[C] Indentation
[D] Semicolon
Correct Answer : Indentation
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code ?
def power(x, y=2):
r=1
for i in range(y):
r=r*x
return r
print (power(3))
print (power(3,3))
[A] 212 32
[B] 9 27
[C] 567 98
[D] None of the above
Correct Answer : 9 27