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

Programming and Problem Solving through Python (M3 R5)

/100
130

1 / 100

How many keyword arguments can be passed to a function in a single function call?

एक फ़ंक्शन कॉल में किसी फ़ंक्शन में कितने कीवर्ड तर्क पारित किए जा सकते हैं?

2 / 100

What will be the value of the following Python expression?

4 + 3 % 5

3 / 100

Which of the following is true about top-down design process?

टॉप-डाउन डिज़ाइन प्रक्रिया के बारे में निम्नलिखित में से कौन सा सत्य है?

4 / 100

What will be the output of the following Python code snippet?

for i in [1, 2, 3, 4][::-1]:
    print (i)

5 / 100

What will be the output of the following Python code snippet?

z=set('abc$de')
'a' in z

6 / 100

What will be the output of the following Python code?

l=[1, 0, 2, 0, 'hello', '', []]
list(filter(bool, l))

7 / 100

What will be the output of the following Python expression?

round(4.5676,2)?

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

गोल(4.5676,2)?

8 / 100

Which of the following is the use of id() function in python?

पायथन में id() फ़ंक्शन का उपयोग निम्न में से किसमें किया जाता है?

9 / 100

Which type of Programming does Python support?

10 / 100

Which of the following is the use of id() function in python?

11 / 100

Which of these is false about a package?

पैकेज के बारे में इनमें से कौन सा गलत है?

12 / 100

Where is function defined?

फ़ंक्शन कहां परिभाषित किया गया है?

13 / 100

Which function is called when the following Python program is executed?

f = foo()
format(f)

14 / 100

Which keyword is used for function?

Function के लिए कौन सा कीवर्ड प्रयोग किया जाता है?

15 / 100

Is Python code compiled or interpreted?

16 / 100

What is the length of sys.argv?

Sys.argv की लंबाई कितनी है?

17 / 100

Does Lambda contains return statements?

क्या लैम्ब्डा में रिटर्न स्टेटमेंट शामिल हैं?

18 / 100

Which of the following is not a valid namespace?

निम्नलिखित में से कौन सा वैध नामस्थान नहीं है?

19 / 100

What is the order of precedence in python?

20 / 100

What will be the output of the following Python expression if x=56.236?

print("%.2f"%x)

21 / 100

Where are the arguments received from the command line stored?

कमांड लाइन से प्राप्त तर्क कहाँ संग्रहीत हैं?

22 / 100

Which of the following is not a core data type in Python programming?

23 / 100

Which of the following is false about “from-import” form of import?

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

24 / 100

Which of these is false about recursion?

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

25 / 100

The following python program can work with ____ parameters.

def f(x):
    def f1(*args, **kwargs):
           print("Sanfoundry")
           return x(*args, **kwargs)
    return f1

26 / 100

What arithmetic operators cannot be used with strings in Python?

27 / 100

Which of the following is the use of id() function in python?

28 / 100

Which of the following is the use of function in python?

पायथन में निम्नलिखित में से किस फ़ंक्शन का उपयोग होता है?

29 / 100

Which of the following character is used to give single-line comments in Python?

30 / 100

Who developed Python Programming Language?

31 / 100

Which of the following refers to mathematical function?

निम्नलिखित में से कौन सा गणितीय फ़ंक्शन को संदर्भित करता है?

32 / 100

Which module in the python standard library parses options received from the command line?

पायथन मानक लाइब्रेरी में कौन सा मॉड्यूल कमांड लाइन से प्राप्त विकल्पों को पार्स करता है?

33 / 100

Which of the following is used to define a block of code in Python language?

34 / 100

Which of the following is the correct extension of the Python file?

35 / 100

What will be the output of the following Python code?

i = 1
while True:
    if i%3 == 0:
        break
    print(i)
 
    i + = 1

36 / 100

Which are the advantages of functions in python?

पायथन में फ़ंक्शंस के क्या फायदे हैं?

37 / 100

What is the maximum possible length of an identifier in Python?

38 / 100

Which of these is the definition for packages in Python?

क्या पायथन कोड संकलित या व्याख्यायित है?

39 / 100

What is returned by math.ceil(3.4)?

Math.ceil(3.4) द्वारा क्या लौटाया जाता है?

40 / 100

Which of the following functions can help us to find the version of python that we are currently working on?

41 / 100

What will be the output of the following Python statement?

  1. >>>"a"+"bc"

42 / 100

Which of the following is true for variable names in Python?

43 / 100

What is called when a function is defined inside a class?

जब किसी फ़ंक्शन को किसी क्लास के अंदर परिभाषित किया जाता है तो उसे क्या कहा जाता है?

44 / 100

What does pip stand for python?

45 / 100

Which keyword is used for function in Python language?

46 / 100

In top-down design every module is broken into same number of submodules.

टॉप-डाउन डिज़ाइन में प्रत्येक मॉड्यूल को समान संख्या में सबमॉड्यूल में विभाजित किया गया है।

47 / 100

Which of the following statements is used to create an empty set in Python?

48 / 100

What is output of print(math.pow(3, 2))?

49 / 100

What will be the output of the following Python expression?

round(4.576)

50 / 100

The function complex(‘2-3j’) is valid but the function complex(‘2 – 3j’) is invalid.

फ़ंक्शन कॉम्प्लेक्स ('2-3j') मान्य है लेकिन फ़ंक्शन कॉम्प्लेक्स ('2 - 3j') अमान्य है।

51 / 100

Is Python case sensitive when dealing with identifiers?

52 / 100

Which of the following isn’t true about main modules?

मुख्य मॉड्यूल के बारे में निम्नलिखित में से कौन सा सत्य नहीं है?

53 / 100

What will be the output of the following Python expression?

round(4.576)

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

गोल(4.576)


54 / 100

Which of the following is a Python tuple?

55 / 100

What will be the output of the following Python function?

min(max(False,-3,-4), 2,7)

56 / 100

Which of the following is a feature of Python DocString?

57 / 100

What will be the output of the following Python code snippet if x=1?

x<<2

58 / 100

What are the two main types of functions in Python?

59 / 100

How are required arguments specified in the function heading?

फ़ंक्शन शीर्षक में आवश्यक तर्क कैसे निर्दिष्ट किए जाते हैं?

60 / 100

The function divmod(a,b), where both ‘a’ and ‘b’ are integers is evaluated as:

फ़ंक्शन divmod(a,b), जहां 'a' और 'b' दोनों पूर्णांक हैं, का मूल्यांकन इस प्रकार किया जाता है:

61 / 100

Which of these is the definition for packages in Python?

62 / 100

What will be the output of the following Python function?

any([2>8, 4>2, 1>2])

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

कोई([2>8, 4>2, 1>2])


63 / 100

All keywords in Python are in _________

64 / 100

What is output of print(math.pow(3, 2))?

65 / 100

What are the two main types of functions?

दो मुख्य प्रकार के कार्य क्या हैं?

66 / 100

What is a variable defined inside a function referred to as?

किसी फ़ंक्शन के अंदर परिभाषित वेरिएबल को क्या कहा जाता है?

67 / 100

What is the order of namespaces in which Python looks for an identifier?

68 / 100

Which of the following functions does not necessarily accept only iterables as arguments?

निम्नलिखित में से कौन सा फ़ंक्शन आवश्यक रूप से केवल पुनरावर्तनीय को तर्क के रूप में स्वीकार नहीं करता है?

69 / 100

Which of the following functions is a built-in function in python?

निम्नलिखित में से कौन सा फ़ंक्शन पायथन में एक अंतर्निहित फ़ंक्शन है?

70 / 100

Which one of the following is not a keyword in Python language?

71 / 100

How are keyword arguments specified in the function heading?

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

72 / 100

Which of the following is false about “import modulename” form of import?

आयात के "आयात मॉड्यूलनाम" रूप के बारे में निम्नलिखित में से कौन सा गलत है?

73 / 100

How are default arguments specified in the function heading?

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

74 / 100

What happens if a local variable exists with the same name as the global variable you want to access?

यदि कोई स्थानीय चर उस वैश्विक चर के समान नाम के साथ मौजूद है जिसे आप एक्सेस करना चाहते हैं तो क्या होगा?

75 / 100

What will be the output of the following Python function?

all([2,4,0,6])

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

सभी([2,4,0,6])


76 / 100

To add a new element to a list we use which Python command?

77 / 100

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

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

78 / 100

What is a variable defined outside a function referred to as?

किसी फ़ंक्शन के बाहर परिभाषित वेरिएबल को क्या कहा जाता है?

79 / 100

Which is the most appropriate definition for recursion?

पुनरावर्तन के लिए सबसे उपयुक्त परिभाषा कौन सी है?

80 / 100

Python supports the creation of anonymous functions at runtime, using a construct called __________

81 / 100

What is the type of sys.argv?

Sys.argv का प्रकार क्या है?

82 / 100

Which of the following functions is a built-in function in python?

83 / 100

What will be the output of the following Python function?

len(["hello",2, 4, 6])

84 / 100

Python supports the creation of anonymous functions at runtime, using a construct called __________

पायथन __________ नामक निर्माण का उपयोग करके रनटाइम पर अज्ञात कार्यों के निर्माण का समर्थन करता है

85 / 100

What will be the output of the following Python code?

print('*', "abcde".center(6), '*', sep='')

86 / 100

Which of the following is the truncation division operator in Python?

87 / 100

What are the values of the following Python expressions?

 2**(3**2)
 (2**3)**2
 2**3**2

88 / 100

What is the type of each element in sys.argv?

Sys.argv में प्रत्येक तत्व का प्रकार क्या है?

89 / 100

If a function doesn’t have a return statement, which of the following does the function return?

यदि किसी फ़ंक्शन में रिटर्न स्टेटमेंट नहीं है, तो निम्न में से कौन सा फ़ंक्शन रिटर्न करता है?

 

90 / 100

What will be the output of the following Python code?

x = [[0], [1]]
print((' '.join(list(map(str, x))),))

91 / 100

What is the base case in the Merge Sort algorithm when it is solved recursively?

मर्ज सॉर्ट एल्गोरिथ्म में आधार मामला क्या है जब इसे पुनरावर्ती रूप से हल किया जाता है?

92 / 100

Only problems that are recursively defined can be solved using recursion.

केवल पुनरावर्ती रूप से परिभाषित समस्याओं को ही पुनरावर्तन का उपयोग करके हल किया जा सकता है।

93 / 100

What is the value stored in sys.argv[0]?

Sys.argv[0] में संग्रहीत मान क्या है?

94 / 100

Which one of the following is the use of function in python?

95 / 100

Which module in the python standard library parses options received from the command line?

96 / 100

All modular designs are because of a top-down design process.

सभी मॉड्यूलर डिज़ाइन टॉप-डाउन डिज़ाइन प्रक्रिया के कारण होते हैं।

97 / 100

How are variable length arguments specified in the function heading?

फ़ंक्शन शीर्षक में परिवर्तनीय लंबाई तर्क कैसे निर्दिष्ट किए जाते हैं?

98 / 100

What will be the output of the following Python code?

print("Hello {0[0]} and {0[1]}".format(('foo', 'bin')))

99 / 100

Is Python code compiled or interpreted?

क्या पायथन कोड संकलित या व्याख्यायित है?

100 / 100

What is the output of the function complex()?

फ़ंक्शन कॉम्प्लेक्स() का आउटपुट क्या है?

Your score is

LinkedIn Facebook Twitter VKontakte
0%

/100
39

1 / 100

Which of the following is the same as list(map(lambda x: x**-1, [1, 2, 3]))?

2 / 100

What will be the output of the following Python expression?

4^12

3 / 100

What is the value of the following expression?

8/4/2, 8/(4/2)

4 / 100

The expression shown below results in an error.

print("-%5d0",989)

5 / 100

Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.pop(1)?

6 / 100

Which of the following is a Python tuple?

7 / 100

The one’s complement of 110010101 is:

8 / 100

Which of the following is an invalid statement?

9 / 100

What will be the output of the following Python code?

l=list('HELLO')
'first={0[0]}, third={0[2]}'.format(l)

10 / 100

What will be the output of the following Python expression if X = -122?

print("-%06d"%x)

11 / 100

Which of the following is invalid?

12 / 100

To shuffle the list(say list1) what function do we use?

13 / 100

What will be the output of the following Python code snippet?

print('ab cd-ef'.title())

14 / 100

Which of the following operators has its associativity from right to left?

15 / 100

What will be the output of the following Python code snippet?

print('abcd'.translate({97: 98, 98: 99, 99: 100}))

16 / 100

hat will be the output of the following Python code?

  1. d = {"john":40, "peter":45}
  2. d["john"]

17 / 100

What will be the output of the following Python code snippet?

print([i+j for i in "abc" for j in "def"])

18 / 100

Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.reverse()?

19 / 100

Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.extend([34, 5])?

20 / 100

What will be the output of the following Python expression if the value of x is 34?

print(“%f”%x)

21 / 100

What is the maximum possible length of an identifier?

22 / 100

What will be the output of the following Python code?

  1. >>>t = (1, 2)
  2. >>>2 * t

23 / 100

What will be the output of the following Python code snippet?

X=”hi”
print(“05d”%X)

24 / 100

Which of the following formatting options can be used in order to add ‘n’ blank spaces after a given string ‘S’?

25 / 100

What will be the output of the following Python code snippet?

x = [i**+1 for i in range(3)]; print(x);

26 / 100

Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.pop()?

27 / 100

Suppose list1 is [1, 5, 9], what is sum(list1)?

28 / 100

Bitwise _________ gives 1 if either of the bits is 1 and 0 when both of the bits are 1.

29 / 100

What will be the output of the following Python code snippet?

print('abcd'.translate({'a': '1', 'b': '2', 'c': '3', 'd': '4'}))

30 / 100

The value of the expressions 4/(3*(2-1)) and 4/3*(2-1) is the same.

31 / 100

What will be the output of the following Python code?

'{0:f}, {1:2f}, {2:05.2f}'.format(1.23456, 1.23456, 1.23456)

32 / 100

The output of the two codes shown below is the same.

i. bin((2**16)-1)
ii. '{}'.format(bin((2**16)-1))

33 / 100

What will be the output of the following Python code?

  1. >>>t = (1, 2, 4, 3, 8, 9)
  2. >>>[t[i] for i in range(0, len(t), 2)]

34 / 100

Which of the following is not a complex number?

35 / 100

What will be the output of the following Python code?

'{a}{b}{a}'.format(a='hello', b='world')

36 / 100

What will be the output of the following Python expression if X=345?

print(“%06d”%X)

37 / 100

What does 3 ^ 4 evaluate to?

38 / 100

What is the value of the following expression?

2+4.00, 2**4.0

39 / 100

What are the values of the following Python expressions?

 2**(3**2)
 (2**3)**2
 2**3**2

40 / 100

What will be the output of the following Python code snippet?

X=”san-foundry”
print(“%56s”,X)

41 / 100

Which of the following is incorrect?

42 / 100

All keywords in Python are in _________

43 / 100

Which of the following cannot be a variable?

44 / 100

What will be the output of the following Python code snippet?

print('ab'.zfill(5))

45 / 100

What will be the output of the following Python code snippet?

print('abcd'.translate('a'.maketrans('abc', 'bcd')))

46 / 100

Which of the following is an invalid variable?

47 / 100

What is the result of cmp(3, 1)?

48 / 100

What will be the output of the following Python code snippet?

print('+99'.zfill(5))

49 / 100

What will be the output of the following Python code?

  1. >>>t=(1,2,4,3)
  2. >>>t[1:-1]

50 / 100

Suppose listExample is [‘h’,’e’,’l’,’l’,’o’], what is len(listExample)?

51 / 100

Which of the following is incorrect?

52 / 100

Suppose list1 is [4, 2, 2, 4, 5, 2, 1, 0], Which of the following is correct syntax for slicing operation?

53 / 100

Which of the following commands will create a list?

54 / 100

What will be the output of the following Python code snippet?

print('ab cd ef'.title())

55 / 100

Which of the following is not a keyword?

56 / 100

Why are local variable names beginning with an underscore discouraged?

57 / 100

What will be the output of the following Python code?

  1. >>>list("a#b#c#d".split('#'))

58 / 100

What will be the output of the following Python code?

'%s' %((1.23,),)

59 / 100

Is Python case sensitive when dealing with identifiers?

60 / 100

What will be the output of the following Python code?

hex(255), int('FF', 16), 0xFF

61 / 100

What is the result of round(0.5) – round(-0.5)?

62 / 100

The formatting method {1:<10} represents the ___________ positional argument, _________ justified in a 10 character wide field.

63 / 100

What will be the value of the following Python expression?

 bin(10-2)+bin(12^4)

64 / 100

What will be the output of the following Python code if a=10 and b =20?

a=10
b=20
a=a^b
b=a^b
a=a^b
print(a,b)

65 / 100

Which of the following is true for variable names in Python?

66 / 100

What will be the output of the following two codes?

i. '{0}'.format(4.56)
ii. '{0}'.format([4.56,])

67 / 100

What does ~4 evaluate to?

68 / 100

What will be the output of the following Python code?

'The {} side {1} {2}'.format('bright', 'of', 'life')

69 / 100

What will be the output of the following Python code?

  1. >>>"Welcome to Python".split()

70 / 100

What is the value of the following expression?

float(22//3+3/3)

71 / 100

What will be the output of the following Python code?

 D=dict(p='san', q='foundry')
'{p}{q}'.format(**D)

72 / 100

What will be the output of the following Python code?

l=list('HELLO')
p=l[0], l[-1], l[1:3]
'a={0}, b={1}, c={2}'.format(*p)

73 / 100

What will be the output of the following Python code snippet?

print('Ab!2'.swapcase())

74 / 100

What will be the output of the following Python code snippet?

print('ab\ncd\nef'.splitlines())

75 / 100

What will be the output of the following Python code snippet?

k = [print(i) for i in my_string if i not in "aeiou"]

76 / 100

What will be the output of the following Python expression?

~100?

a) 101
b) -101
c) 100
d) -100

77 / 100

What does ~~~~~~5 evaluate to?

78 / 100

What is the output when we execute list(“hello”)?

79 / 100

Any odd number on being AND-ed with ________ always gives 1. Hint: Any even number on being AND-ed with this value always gives 0.

80 / 100

Evaluate the expression given below if A = 16 and B = 15.

A % B // A

81 / 100

What will be the output of the following Python code snippet?

print('abcdefcdghcd'.split('cd', 2))

82 / 100

What will be the output of the following Python expression if x=22.19?

print("%5.2f"%x)

83 / 100

What is the type of inf?

84 / 100

Suppose list1 is [2, 33, 222, 14, 25], What is list1[:-1]?

85 / 100

Which of the following is the truncation division operator?

86 / 100

What will be the value of x in the following Python expression?

x = int(43.55+2/2)

87 / 100

Which of the following expressions can be used to multiply a given number ‘a’ by 4?

88 / 100

What will be the output of the following Python expression if x=56.236?

print("%.2f"%x)

89 / 100

What is the two’s complement of -44?

90 / 100

Suppose t = (1, 2, 4, 3), which of the following is incorrect?

91 / 100

Suppose list1 is [2, 33, 222, 14, 25], What is list1[-1]?

92 / 100

What is the output of print(k) in the following Python code snippet?

k = [print(i) for i in my_string if i not in "aeiou"]
print(k)

93 / 100

It is not possible for the two’s complement value to be equal to the original value in any case.

94 / 100

What will be the value of the following Python expression?

4 + 3 % 5

95 / 100

What is the output of print 0.1 + 0.2 == 0.3?

96 / 100

Suppose list1 is [3, 5, 25, 1, 3], what is min(list1)?

97 / 100

What will be the output of the following Python expression if x=456?

print("%-06d"%x)

98 / 100

Suppose list1 is [2445,133,12454,123], what is max(list1)?

99 / 100

What will be the output of the following Python code snippet?

print([i.lower() for i in "HELLO"])

100 / 100

What will be the output of the following Python code?

'%.2f%s' % (1.2345, 99)

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!