Skip to content
Menu
O Level Mock Test
O Level Mock Test

pythontest2

/100
29

pythontest

1 / 100

Which of the following function headers is correct?

निम्नलिखित में से कौन सा फ़ंक्शन हेडर सही है?

2 / 100

Two main measures for the efficiency of an algorithm are

किसी एल्गोरिथम की दक्षता के दो मुख्य उपाय हैं

3 / 100

The output of the following python program is____.

निम्नलिखित पायथन प्रोग्राम का आउटपुट ____ है।

r=lambda q:q*2

s=lambda q:q*3

x=2

x=r(x)

x=s(x)

x=r(x)

print x

4 / 100

What will be output of this expression:

इस अभिव्यक्ति का आउटपुट क्या होगा:

'p' + 'q' if '12'.isdigit() else 'r' + 's'

5 / 100

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def  maximum(x, y):

if  x > y:

return  x

elif   x  ==  y:

return  'The numbers are equal'

else :

return   y

print(maximum(2,  3))

6 / 100

Which amongst this is not a jump statement?

इनमें से कौन सा जंप स्टेटमेंट नहीं है?

7 / 100

Find the output of the following program segments:

निम्नलिखित प्रोग्राम खंडों का आउटपुट खोजें:

country =  'INDIA'

for i in country :

print  (i, end= ' ' )

8 / 100

What will be the output of the following code?

निम्नलिखित कोड का आउटपुट क्या होगा?

x=[ 'ab' ,  'cd' ]

y=0

for  i  in  x:

x[y]=i .upper( )

y+=1

print ( x )

9 / 100

Amongst which of the following is / are true with reference to loops in Python?

पायथन में लूप के संदर्भ में निम्नलिखित में से कौन सा/से सत्य है/हैं?

10 / 100

Write the output of the following:

निम्नलिखित का आउटपुट लिखें:

print("python".join("@"))

11 / 100

The output of this Python code would be:

इस पायथन कोड का आउटपुट होगा:

>>>s='{0},{1}, and {2}'

>>>s.format('hi','great','day')

12 / 100

The word comes from the name of a Persian mathematician Abu Ja'far Mohammed ibn-i Musa al khowarizami is a called?

यह शब्द फ़ारसी गणितज्ञ अबू जाफ़र मोहम्मद इब्न-ए मूसा अल खोवारीज़ामी के नाम से आया है जिसे कहा जाता है?

13 / 100

What will be the output of the following code?

निम्नलिखित कोड का आउटपुट क्या होगा?

import numpy as np

a=np.array([[1, 2, 3, 4],[5, 6, 7, 8],[9, 10, 11, 12]])

print(a[2,2])

14 / 100

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def  foo (k) :

k[0]  =  1

q  =  [0]

foo(q)

print(q)

15 / 100

What is the return type of following function ?

निम्नलिखित फ़ंक्शन का रिटर्न प्रकार क्या है?

def func1 ():

return 'mnp', 22

16 / 100

What is the output of the following code?

निम्नलिखित कोड का परिणाम क्या है?

import numpy as np

y=np.array([[11,12,13,14],[32,33,34,35]])

print(y.ndim)

17 / 100

What will be the output of the following?

निम्नलिखित का आउटपुट क्या होगा?

import numpy as np

a=np.array([2, 3, 4, 5])

b=np.arange(4)|

print (a+b)

18 / 100

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def  increment_items (L,   increment):

i  =  0

while  i  <  len(L) : L[i] = L[i] + increment i  =  i  +  1 values  =  [1,  2,  3] print ( increment_items (values,  2)) print ( values )

19 / 100

How many numbers will be printed by the following code?

निम्नलिखित कोड से कितने नंबर प्रिंट होंगे?

def  fun(a,b):

for  x in range(a, b+1):

if  x%3==0:

print (x, end=" ")

fun(100, 120)

20 / 100

If we not see the rules of the programming language, we get?

यदि हम प्रोग्रामिंग भाषा के नियमों को नहीं देखते हैं, तो हमें क्या मिलता है?

21 / 100

What will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def   calc ( x ) :

r=2*x**2

return  r

print ( calc ( 5 ))

22 / 100

The Compexity of linear search algorithm is

रैखिक खोज एल्गोरिथ्म की जटिलता है

23 / 100

Set of statements is executed again and again based upon conditional test.

सशर्त परीक्षण के आधार पर कथनों के सेट को बार-बार निष्पादित किया जाता है।

24 / 100

The program must be able to handle unexpected situation like wrong input or no input.

प्रोग्राम को गलत इनपुट या कोई इनपुट न होने जैसी अप्रत्याशित स्थिति को संभालने में सक्षम होना चाहिए।

25 / 100

What is the output of below program?

नीचे दिए गए प्रोग्राम का आउटपुट क्या है?

def say(message, times=1):

print(message*times)

say('Hello')

say('World' ,5)

26 / 100

A sequence of instruction, in a computer language, to get the desired result is known as ____ .

वांछित परिणाम प्राप्त करने के लिए कंप्यूटर भाषा में निर्देश के अनुक्रम को ____ के रूप में जाना जाता है।

27 / 100

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def foo( i, x=[ ] ):

x.append(i)

return  x

for i in range (3):

print (foo(i))

28 / 100

Which arithmetic operators can not use with strings?

स्ट्रिंग्स के साथ कौन से अंकगणितीय ऑपरेटर का उपयोग नहीं किया जा सकता है?

29 / 100

What will be the output of the following Python code ?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

a=3

b=2

def  change ( ) :

global  b

a=4

b=5

return ( a*b )

print ( change( )*a)

30 / 100

All instruction are executed one after other.

सभी अनुदेश एक के बाद एक क्रियान्वित किये जाते हैं।

31 / 100

What will following code segment print?

निम्नलिखित कोड खंड क्या प्रिंट करेगा?

a=True

b=False

c=False

if not a or b:

print( 1 )

elif not a or not b and c :

print( 2 )

elif not a or b or not b and a :

print( 3 )

else :

print( 4 )

32 / 100

Python supports Object-Oriented style or technique of programming that encapsulates code within____ .

पायथन ऑब्जेक्ट-ओरिएंटेड शैली या प्रोग्रामिंग की तकनीक का समर्थन करता है जो कोड को ____ के भीतर समाहित करता है।

33 / 100

What does the following code print?

निम्नलिखित कोड क्या प्रिंट करता है?

x='mohan'

for i in range(len(x)):

x[ i ]. upper( )

print (x)

34 / 100

What will be output after execution of the following code?

निम्नलिखित कोड के निष्पादन के बाद आउटपुट क्या होगा?

x=13

if x>12 or x<15 and x==16: print (" Given condition matched") else: print (" Given condition did not match")

35 / 100

Set of statements is executed based upon conditional test.

कथनों का सेट सशर्त परीक्षण के आधार पर निष्पादित किया जाता है।

36 / 100

Which statement is correct about Isalnum().

इस्लनम() के बारे में कौन सा कथन सही है?

37 / 100

What will be output after execution of the following code?

निम्नलिखित कोड के निष्पादन के बाद आउटपुट क्या होगा?

a=11

b=5

if (a//b==2):

print ( 'Yes' )

else:

print ( 'No' )

38 / 100

What will be the output of the following code snippet?

निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?

square = lambda x: x  **  2

a  =  [ ]

for  i  in  range(5):

a.append(square(i))

print (a)

39 / 100

In python code, on encountering a syntax error, the ____ does not execute the program.

पायथन कोड में, सिंटैक्स त्रुटि का सामना करने पर, ____ प्रोग्राम निष्पादित नहीं करता है।

40 / 100

In a Python program, Nested if Statements denotes?

पायथन प्रोग्राम में, नेस्टेड इफ स्टेटमेंट्स को दर्शाता है?

41 / 100

What is the output of the following code?

निम्नलिखित कोड का परिणाम क्या है?

def    fun (a,  b=6):

a=a+b

print (a)

fun (5, 4)

42 / 100

Which part of the memory does the system store the parameter and local variables of a function call?

सिस्टम मेमोरी के किस भाग में फ़ंक्शन कॉल के पैरामीटर और स्थानीय वेरिएबल्स को संग्रहीत करता है?

 

43 / 100

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

X = "abcdef" while i in x:      print(i, end=" ")

44 / 100

Testing is known as :

परीक्षण को इस नाम से जाना जाता है:

45 / 100

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(3, 7)

func(25, c=24)

func(c=50, a=100)

46 / 100

How are keyboard arguments specified in the function heading?

फ़ंक्शन शीर्षक में कीबोर्ड तर्क कैसे निर्दिष्ट किए जाते हैं?

47 / 100

Users write the programs in which language?

उपयोगकर्ता प्रोग्राम किस भाषा में लिखते हैं?

48 / 100

It refers to the ability of an application to run on different plateforms with  or without minimal changes.

यह किसी एप्लिकेशन की न्यूनतम परिवर्तनों के साथ या उसके बिना विभिन्न प्लेटफ़ॉर्म पर चलने की क्षमता को संदर्भित करता है।

49 / 100

Which of the following Boolean expressions is not logically equivalent to other three?

निम्नलिखित में से कौन सा बूलियन अभिव्यक्ति तार्किक रूप से अन्य तीन के समकक्ष नहीं है?

 

50 / 100

What is the output of the following program?

निम्नलिखित प्रोग्राम का आउटपुट क्या है?

a = 2

b = '3.77'

c = -8

str1 = '{0:.4f}  {0:3d}  {2}  {1}' .format (a, b, c)

print (str1)

51 / 100

Which one of these is NOT true about recursion?

इनमें से कौन सा प्रत्यावर्तन के बारे में सत्य नहीं है?

 

52 / 100

Pseodocode is used for

सियोडोकोड का उपयोग किसके लिए किया जाता है?

53 / 100

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

import  functools

1=[1, 2, 3, 4, 5]

m=functools.reduce(lambda x, y:x  if  x>y  else y,  l)

print (m)

54 / 100

The part of a Machine level instruction, which tellsthe central processor what has to be done, is

मशीन स्तर के निर्देश का वह भाग, जो केंद्रीय प्रोसेसर को बताता है कि क्या करना है

55 / 100

What will be the output of the following code?

निम्नलिखित कोड का आउटपुट क्या होगा?

import numpy as np

a=np.array([1, 5, 4, 7, 8])

a=a+1

print(a[1])

56 / 100

What will be the output of the following code?

निम्नलिखित कोड का आउटपुट क्या होगा?

import numpy as np

print(np.maximum([2, 3, 4], [1, 5, 2]))

57 / 100

Which of the following is False regarding loops in Python?

पायथन में लूप के संबंध में निम्नलिखित में से कौन सा गलत है?

58 / 100

Algorithm when translated into a programming language is called ____ .

एल्गोरिदम को जब प्रोग्रामिंग भाषा में अनुवादित किया जाता है तो उसे ____ कहा जाता है।

59 / 100

range(3) in Python is equivalent to:

पायथन में रेंज(3) इसके बराबर है:

60 / 100

Amongst which Python library is similar to Pandas?

इनमें से कौन सी पायथन लाइब्रेरी पांडा के समान है?

61 / 100

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

from math import factorial

print (factorial (5))

62 / 100

What will be the final value of I after execution of the loop:

लूप के निष्पादन के बाद I का अंतिम मान क्या होगा:

for  I in range(10):

print( I )

63 / 100

What is the output of the following code?

निम्नलिखित कोड का परिणाम क्या है?

def disp(*arg):

for i in arg:

print( i )

disp(name="Rajat", age="20")

64 / 100

Which of the following carries out the instructions defined in the interface?

निम्नलिखित में से कौन इंटरफ़ेस में परिभाषित निर्देशों को कार्यान्वित करता है?

65 / 100

What value does the following expression evaluate to?

निम्नलिखित अभिव्यक्ति किस मूल्य का मूल्यांकन करती है?

x = 5

while x  <  10: print ( x,  end=' ' )

66 / 100

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

m=[[x,x+1,x+2] for x in range(0,3)]

print(m)

67 / 100

Which of the following statement is false about recursion:

रिकर्सन के बारे में निम्नलिखित में से कौन सा कथन गलत है:

68 / 100

Part of algorithm which is repeated for fixed number of times is classified as

एल्गोरिथम का वह भाग जिसे निश्चित संख्या में बार-बार दोहराया जाता है, को इस प्रकार वर्गीकृत किया गया है

69 / 100

What is the output of the following code?

निम्नलिखित कोड का परिणाम क्या है?

def  add (a, b):

return  a+5, b+5

result=add(3,2)

print(result)

70 / 100

What will be the output of the following?

निम्नलिखित का आउटपुट क्या होगा?

print((range(4)))

71 / 100

Which of the following is incorrect?

निम्नलिखित में से कौन सा गलत है?

72 / 100

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def  cube(x) :

return  x  *  x  *  x

x  =  cube (5)

print  (x)

73 / 100

What will be the output of the following code snippet?

निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?

i=0

while i<5 : print ( i ) i +=1 if  i==3 : break else : print ( 0 )

74 / 100

Operations to be repeated a certain number of times are done by ____ .

एक निश्चित संख्या में दोहराए जाने वाले ऑपरेशन ____ द्वारा किए जाते हैं।

75 / 100

The output of this Python code would be:

इस पायथन कोड का आउटपुट होगा:

def  find(x,  **y ):

print (type(y))

find("letters" , X= '1' , Y= '2' )

76 / 100

What will be the output of the following code?

निम्नलिखित कोड का आउटपुट क्या होगा?

import numpy as np

a=np.array([[1, 2, 3],[0, 1, 4],[11, 22, 33]])

print(a.size)

77 / 100

Observe the following code and identify what will be the outcome?

निम्नलिखित कोड का अवलोकन करें और पहचानें कि परिणाम क्या होगा?

import numpy as np

a=np.array([1,2,3,4,5,6])

print(a)

78 / 100

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def  printMax(a, b):

if  a > b:

print (a, 'is maximum' )

elif  a == b:

print (a, 'is equal to' , b)

else :

print (b, 'is maximum' )

printMax( 3, 4)

79 / 100

Which of the following defines what an object can do?

निम्नलिखित में से कौन परिभाषित करता है कि कोई वस्तु क्या कर सकती है?

80 / 100

What will be the output of the following code?

निम्नलिखित कोड का आउटपुट क्या होगा?

x  = 50

def  fun1 ( ):

x  =  25

print ( x )

fun1( )

print ( x )

81 / 100

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

for i in range (2.0) :

print ( i )

82 / 100

The function pow(x,y,z) is evaluated as:

फ़ंक्शन pow(x,y,z) का मूल्यांकन इस प्रकार किया जाता है:

83 / 100

What among the following list of operators has the highest precedence?

ऑपरेटरों की निम्नलिखित सूची में से किसकी प्राथमिकता सबसे अधिक है?

+,-,**,%,/,<<,>>,|

84 / 100

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

85 / 100

Write the output of the following code:

निम्नलिखित कोड का आउटपुट लिखें:

s="OLEVEL"

for i in range (-1, -len(s), -1):

print (s[ i ], end="$")

86 / 100

Which of the following executes the programming code line by line?

निम्नलिखित में से कौन प्रोग्रामिंग कोड को लाइन दर लाइन निष्पादित करता है?

87 / 100

What is the output of the following?

निम्नलिखित का आउटपुट क्या है?

print("Hello {0!r} and

{0!s}".format('foo','bin'))

88 / 100

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

x = "abcdef"  i = "a"  while i in x:    x = x[: -1]   print(i, end = " " )

89 / 100

NumPy arrays can be __.

NumPy सरणियाँ __ हो सकती हैं।

90 / 100

Which statements is correct about the object-oriented programming concept in Python?

पायथन में ऑब्जेक्ट-ओरिएंटेड प्रोग्रामिंग अवधारणा के बारे में कौन सा कथन सही है?

91 / 100

What will be the output of the following Python program?

निम्नलिखित पायथन प्रोग्राम का आउटपुट क्या होगा?

def  addItem(listParam) :

listParam+=[ 1 ]

mylist=[1, 2, 3, 4]

addItem(mylist)

print(len(mylist))

92 / 100

Which of the following is the output of this program?

निम्नलिखित में से कौन सा इस प्रोग्राम का आउटपुट है?

i=1

while False :

if  i%2==0:

print ( i )
i+=2

93 / 100

Correcting the problem code

समस्या कोड को ठीक करना

94 / 100

Designing the problem

समस्या को डिज़ाइन करना

95 / 100

Which of the following is the output of this program?

निम्नलिखित में से कौन सा इस प्रोग्राम का आउटपुट है?

True=False

While  True:

print (True)

break

96 / 100

To access a list which contains ten elements, which of the following uses of range() would produce a list of the desired indexes?

एक सूची तक पहुंचने के लिए जिसमें दस तत्व शामिल हैं, रेंज() का निम्नलिखित में से कौन सा उपयोग वांछित अनुक्रमितों की एक सूची तैयार करेगा?

97 / 100

What is the output of the following code?

निम्नलिखित कोड का परिणाम क्या है?

import numpy as np

a=np.array([[1, 2, 3]])

print(a.shape)

98 / 100

What will be the output after the following statements?

निम्नलिखित कथनों के बाद आउटपुट क्या होगा?

a=0

b=3

while  a+b<8 : a+=1 print (a, end=' ')

99 / 100

If  str1="Programming Language " What does str1.find("m") return?

यदि  str1='प्रोग्रामिंग भाषा ' str1.find('m') क्या लौटाती है?

100 / 100

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)

fun(x)

print( 'x is now' , x)

Your score is

LinkedIn Facebook Twitter VKontakte
0%

Categories

  • Business
  • Education
  • Life Fun
  • Technology

Follow Us

Follow us on Facebook Subscribe us on Youtube Follow us on Instagram Contact us on WhatsApp

Recent Posts

  • CCC-8
  • Here are 10 points that you can follow to protect your job from being taken over by AI:
  • What is the Future of Ai
  • Latest or Future Education Trends
  • Best career options in 2023

Categories

  • Business
  • Education
  • Life Fun
  • Technology

Archives

  • November 2024
  • April 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • June 2022
©2025 O Level Mock Test | Powered by WordPress and Superb Themes!