Subscribe Us

Responsive Advertisement

Advertisement

python most imp mcqs set 4

Python mcqs most important set 4

 


1. The ........provides pictorial representation of given problem. दी गई समस्या का सचित्र रिप्रेजेन्टेशन करता है।

 

A. Algorithm एल्गोरिदम

B. Flowchart फ्लोचॉर्ट

C. Pseudocode शूडोकोड

D. All of these इनमें से सभी

 

2. is a procedure or step by step process for solving a problem. किसी समस्या को हल करने के लिए एक स्टेप बाई स्टेप प्रक्रिया है।

 

A. Algorithm एल्गोरिदम

B. Flowchart फ्लोचॉर्ट

C. Pseudocode शूडोकोड

D. All of these इनमें से सभी

 

3. The symbol is used at the beginning of a flow chart. सिम्बल का उपयोग फ्लोचार्ट की शुरुआत में किया जाता है।

 

A. Oval or Pill Shape ओवल या पिल शेप

B. Rectangle आयत

C. Diamond डॉयमण्ड

D. None of these इनमें से कोई नहीं

 

4. What will be the datatype of the var in the below code snippet? नीचे दिए गए कोड स्निपेट में var का डेटाटाइप क्या होगा?

 var = 10

 print(type (var))

 var "Hello"

print(type (var))

 

A. str and int

B. int and int

C. int and str

D. str and str

 

5. What is the output of the following code: निम्नलिखित कोड का आउटपुट क्या है:

L=['a','b','c','d']

 print "".join [1]

 

A. Error

B. None

C. abcd

D. ['a','b','c','d']

 

6. np.eye() is used for creating: np.eye() का उपयोग क्रियेट करने के लिए होता है:

 

A. Identity Matrix पहचान मैट्रिक्स

B. Upper triangle Matrix ऊपरी त्रिकोण मैट्रिक्स

C. Lower Triangle Matrix निचली त्रिकोण मैट्रिक्स

D. None of the above उपर्युक्त में से कोई नहीं

 

7. What will be the output of the following code snippet? निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?

 

def solve(a, b):

    return b if a==0 else solve(b % a, a)

print (solve(20, 50))

 

A. 20

B. 50

C. 10

D. Error

 

8. What is the output of the following program निम्नलिखित कोड का आउटपुट क्या है 1-0

 

i=0     

  while i<3:     

    print (i)      

    i+=1       

 else:          

        print (i+1)

 

A. 01230

B. 0124

C 0120

D. None of above इनमें से कोई नहीं

 

9. Debugging is used to: डिबगिंग का सपयोग किया जाता है:

 

A. Find errors from the program प्रोग्राम में से एरर का पता लगाने के लिए

B. Check the functionality of the program प्रोग्राम की कार्यक्षमता जाँच करने के लिए

C. Black box testing ब्लैक बॉक्त टेस्टिंग

D. All of the above उपर्युक्त सभी

 

10. The......... function reads a line entered on a console by an input device such as a keyboard and convert it into a string and returns it. फंक्शन एक इनपुट डिवाइस जैसे कि एक कीबोर्ड द्वारा दर्ज की गई लाइन को रीड करता है और इसे एक स्ट्रिंग में परिवर्तित करता है और इसे रिटर्न करता है।

 

A. raw_input

B. input()

C. eval

D. accep

 

11. In python, Valid identifier is पायथन में वैलिस आइडेंटिफायर है

 

A. 1abc

B. $12a

C. _xy1

D. @python

 

 

12. What will be the output of the following Python code snippet if x=1?- निम्नलिखित पायथन कोड snippet का आउटपुट क्या होगा यदि x=1?

x<<2

 

A. 8

B. 4

C. 2

D. None of the above. इनमें से कोई नहीं

 

13. What will be the output of the following Python code? निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

 

 

i = 0

while i < 3:                                                           

 print(i)

i+ = +1

else: print(0)

A. 01230

B. 012

C. 0120

D None of the above.इनमें से कोई नहीं

 

14. What will be the output of the following Python code? निम्नलिखित पाक्थन कोड का आउटपुट क्या होगा?

 

x=50

def func(x):

     print('x is', x)

     x=2

     print('Changed localx to', x)

func(x)

print('x is now", х)

 

A. x is now 100                                                       

 B. x is now 20

C. x is now 50

D. None of the above इनमें से कोई भी नहीं

 

15. Which of the following is the datatype possible in python? पायथन में निम्नलिखित में से कौन सा डेटाटाइप संभव है?

 

A. int

B. list

C. dictionary

D. All of the above उपर्युक्त सभी

 

16. Empty list in python is made by? पायथन में एम्पटी लिस्ट किसके द्वारा बनाई जाती 8?

 

A. l=0

B. I=list()

C. Both of the above उपरोक्त दोनों

D. None of these इनमें से कोई नहीं

 

17. Which one is the type of algorithm: एल्गोरिदम का टाइप कौन सा है?

 

A. Flowchart फ्लोचार्ट

B. Pseudo

C. Greedy ग्रिडी

D. Connector कमेक्टर

 

18. How we can convert the Numpy array to the list in python? हम पायथन में Numpy ऐरे को सूची में कैसे बदल सकते है?

 

A. list(array)

B. list.array

C. array.list

D. None of these इनमें से कोई नहीं

 

19. Which of the following keyword is used to access the numpy module in python? पायथन में संख्यात्मक मॉड्यूल का उपयोग करने के लिए निम्न में से किस कीवर्ड का उपयोग किया जाता है?

 

A. form फॉर्म

B. access एक्रोज

C. Import इंपोर्ट

D. None of these इनमें से कोई नहीं

 

20. What is the use of the zeros() function in Numpy array in python? पायथन में Numpy ऐरे में शून्य फंक्शन का उपयोग क्या है?

 

A. To make a Matrix with all element 0 सभी एलिमेन्टो के साथ एक मैट्रिक्स बनाने के लिए

B. To make a Matrix with all diagonal element सभी डॉयगोनल एलीमेन्टी के साथ एक मैट्रिक्स बनाने के लिए

C. To make a Matrix with first Row 0 पहली रो में 0 के साथ एक मैट्रिक्स बनाने के लिए

D. None of these इनमें से कोई नहीं

 

21. What is the correct syntax of remove() a file? remove() फाइल का सही वर्तमान सिंटैक्स क्या है?

 

A. remove((), file name)).                                                  

B. remove(new_file_name,

current file name.)

C. remove(file_name)

D. All of the above उपर्युक्त सभी

 

22. See the following statement. निम्नलिखित स्टेटमेन्ट देखें।

Z=["x":0,"y":1].                                                 

 Which of the following is the correct statement. निम्नलिखित में से कौन सा सही कथन है

 

A. dictionary z is created

B. x and y are the keys of dictionary z

C. O and 1 are the values of dictionary z

D. All of the above उपर्युक्त सभी

 

23. What will be the output of the following code? निम्नलिखित कोड का आउटपुट क्या होगा? print(print(print("OLEVEL")))

 

A. OLEVEL None None

B. None None OLEVEL

C. None OLEVEL None

D. OLEVEL

 

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

 

A. ['ab','ed']

B. ['AB', 'CD']

C. ['ab','ed', 'AB', 'CD']

D. Error

 

25. Which of the following is the use of function in python?निम्नलिखित में से कौन पायथन में फंक्शन का उपयोग करता है?

 

Import numpy as np     

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

b=пр.array([8,3,4,2,1])                                  

 c=a+b                                                                     

c=c*a                                                                    

 print (c[2])

 

A. 21

B. 22

C. 20

D. None of the above इनमें से कोई नहीं

 

26. What will be the output of the following code? निम्नलिखित कोड का आउटपुट क्या होगा?

 

i=1

while 1:

if i%3==0: break

print(i)                                                                    

 i+=1

 

A. 123

B. 1

C. 12

D. 0

 

27. Which of the following is not a valid namespace? निम्नलिखित में से कौन एक वैध नेमस्पेस नहीं है

 

A. Global namespace ग्लोबल नेमस्पेस

B. Public namespace पब्लिक नेमस्पेस

C. Built-in namespace बिल्ट-ईन नेमस्पेस

D. Local namespace लोकल नेमस्पेसं

 

28. What will be the output of the following code? निम्नलिखित कोड का आउटपुट क्या होगा?      

 x = 50

def fun1():

     x = 25

     print(x)

 fun1()

print(x) 

 

A 25 50

B. Name Error                                                           

C. 50 25                                                                     

D. None of these - कोई नहीं

 

29. What will be the output of the following Python code- निम्नलिखित पायथन कोड का आउटपुट क्या होगा

 

a,b=5,2

print(a//b)                                                  

 A. 2.5

B. 2.0

C. 2 (floor division)

 D. Error           

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

 

A. 20

B. 60

C 80

D. None of these इनमें से कोई नहीं

 

31. Which of the following is an invalid statement? निम्नलिखित में से कौन सा एक इनवैलिड कथन है?

 

A. abc =1,000,000

B. a b c =1000 2000 3000

C. a,b,c =1000, 2000, 3000

 

D. a_b_c=1,000,000

 

32. What you can use to convert from a string to a list of character. आप एक स्ट्रिंग से कैरेक्टर की लिस्ट में बदलने के लिए क्या उपयोग कर सकते हैं।

 

A. list

B. str()

C. chr()

D. None of these इनमें से कोई नहीं A

 

33. What will be the output of the following Python code - निम्नलिखित पायथन कोड का आउटपुट क्या होगा-

 

a = [1, 2]

print(a* 3)

 

A. Error

B. [1.2]

C. [1,2,1,2]

D. [1,2,1,2,1,2]

 

34. Which keyword is used to remove individual items or the entire dictionary itself.अलग-अलग आइटम या पूरी डिक्शनरी को हटाने के लिए किस कीवर्ड का उपयोग किया जाता है।

 

A. del

 

B. remove

C. removeAll

D. None of these इनमें से कोई नहीं

 

35. Which one of these is floor division? इनमें से कौन सा फ्लोर डिवीजन है?

 

A./

B. //

C. %

D. None of the mentioned उल्लिखित कोई नहीं

 

36.........creates an uninitialized array of specified shape and dtype. निर्दिष्ट शेप और dtype का एक अनइनीशिलाइज्ड ऐरे बनाता है।

 

A. full

B. empty

C. init

D. None of these इनमें से कोई नहीं

 

37. To which of the following the "in" operator can be used to check if an item is in it? निम्नलिखित में से किसके लिए "in" ऑपरेटर का उपयोग यह जांचने के लिए किया जा सकता है कि कोई आइटम उसमें है या नहीं?

 

A. Lists

 

B. Dictionary

C. Set

D. All of the mentioned उल्लिखित सभी

 

38. What will be the output of the following Python code? निम्नलिखित पायथन कोड का आउटपुट क्या होगा                                                

names1 = [Amir', 'Bala', 'Chales']

if amir in names1:

     print(1)

else:

    print(2)

A. 1                                                                               

 B. 2

C. both of the above उपर्युक्त दोनों

D. None of these इनमें से कोई नहीं

 

39. Which of the following is the correct output of this program? निम्नलिखित प्रोग्राम का सही आउटपुट क्या है?

d={0:'a',1:'b',2:'c'}

for i in d:

   print(i)

 

A a b c

B. 0 1 2

C. 0 a 1 b 2 c

D. 1b 2c

 

 

40. Method is used to display entire contents of the file, फाइल के संपूर्ण कंटेंट को प्रदर्शित करने के लिए मेथड का उपयोग किया जाता है।

 

A. readlines()

B. read()

C. Both a & b. a और के दोनों

D. None of the above. इनमें से कोई भी नही

 

41. Which statement is used to jumps back to the top of the loop for the next iteration. अगले इंटरेशन के लिए लूप के शीर्ष पर वापस जाने के लिए किस स्टेटमेन्ट का उपयोग किया जाता है।

 

A. continue-कटिन्यू

B. break-बेक

C. pass पास

D. None of these इनमें से कोई नहीं

 

42. Which of the following function stacks 1D arrays as columns Into a 2D array? निम्न में से कौन सा फंक्शन 1 की ऐरे को कॉलम के रूप में 2 डी ऐरे में जोड़ता है?

 

A. row _stack

B. com _stack

C. column _stack

D. None of the above इनमें से कोई नहीं

 

43. What will be the output of the following Python code? निम्नलिखित पायथन कोड का आउटपुट क्या होगा

list1=[1,2,3,4]

list2=(5,6,7,8]

 print(len(list1 + list2))

 

A. 2

B.4.

C.5

D.8

 

 

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

 

A. 3

B. 4

 

C. 10

D. None

 

45. In order to store values in terms of key and value we use what core data type. "की" और वैल्यू के संदर्भ में वैल्यू को संग्रहीत करने के लिए हम किस मुख्य डेटा प्रकार का उपयोग करते हैं।

 

A. list

B. tuple

C. class

D. dictionary

 

46. Which of the following expression is correct. निम्नलिखित में से कौन सा एक्सप्रेशन सही है।

 

A. 10-(5*5)=-15

B. -7*(10/2)=-35.0

C. 21%4 = 1.     

D. All of the above उपर्युक्त सभी

 

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

A. None [3.4.5]

B. None [1.2.3]

C. [3.4.5] [1,2,3]

D. [3.4.5] None

 

48. Suppose list1 is [4, 2, 2, 4, 5, 2, 1, 0], Whích of the following is the correct syntax for slicing operation? मान लीजिए लिस्ट (4. 2. 2. 4. 5. 2. 1, 0] है. स्लाइसिंग अंगरेशन के लिए निम्नलिखित में से कौन सा सिंटेक्स सही है?

 

A print(list1 [0])

B. print(list1[:2])

C. print(list1[::2])

D. all of the mentioned उल्लिखित सभी

 

49. Select all options that print. उन सभी विकल्पों का चयन करें जो प्रिन्ट करते है।

 

hello-how-are-you

 

A. print('hello', 'how', 'are', 'you')

B. print('hello', 'how', 'are',' you'+'-'*4)

 

C. print('hello-'+'how-are-you')

D. print('hello'+'-'+'how'+'-'+ 'are' + 'you')

 

50. Is Python code compiled or interpreted? क्या पायथन कोल कम्पाइल या इन्टरप्रिंट किया जाता

 

A. Python code is both compiled and interpreted. पायथन कोड कम्पाइल और इंटरप्रेट दोनों होता है।                                                                                    B. Python code is neither compiled nor Interpreted  पायथन कोड नहीं कंपाइल है ही इंटरप्रेट होता है।

C. Python code is only compiled पायथन कोड केवल कंपाइल होता है।

D. Python code is only interpreted पायथन कोड केवल इंटरप्रेट होता है।

 

51. Python supports the creation of anonymous Functions at runtime, using a construct called पायथन रनटाइन पर anonymous फंक्शनों के निर्माण को सपोर्ट करता है...... का उपयोग करते हुर।

 

A. pi

B. anonymous. 

C. lambda

D. none of the mentioned उल्लिखित कोई नहीं

 

52. What does pip stand for python? पायथन के लिए pip का क्या अर्थ है?

 

A unlimited length. असीमित लंबाई

B. all private members must have leading and trailing underscores. सभी प्राइवेट मैम्बरों के पास अग्रणी और अनुगामी अंडरस्कोर होना चाहिए

C. Preferred Installer Program. पसंदीदा इंस्टालर प्रोग्राम

D. none of the mentioned. इनमें से कोई नहीं

 

53. What are the values of the following Python expressions? निम्नलिखित पायथन एक्सप्रेशनों की वैल्यू क्या है?

 

2**(3**2)      

(2**3)**2

2**3**2

 

A. 512,64,512  

 B. 512,512,512

C. 64,512.64

D. 64,64,64

 

54. Which of these is the definition for packages in Python? इनमें से कौन सी पायथन में पैकेजेस की डेफिनेशन?

 

A. A set of main modules. मुख्य गौडधून का एक सेंट

B. A folder of python modules पायथन मॉड्यूल का एक फोल्डर

C. A number of files containing Python definitions and statements. अनेक फाइले जिनमें पायथन डेफिनेशन और स्टेटमेन्ट शामिल है                     

D. A set of programs making use of Python modules. पायधन मॉड्यूल का उपयोग करने वाले प्रोग्रामों का एक सेंट है

 

55. What is the order of namespaces in which Python looks for an identifier?नेमस्पेस का क्रम क्या है जिसमें पायथन एक आइडेन्टिफॉयर की खोज करता है?

A. Python first searches the built-in namespace, then the global namespace and finally the local namespace. पायथन पहले बिल्ट-इन नेमस्पेस, फिर ग्लोबल नेमस्पेस और अंत में लोकल नेमस्पेस की खोज करता है

B. Python first searches the built-in namespace, then the local namespace and finally the global namespace पायथन पहले बिल्ट-इन नेमस्पेस, फिर लोकल नेमस्पेस और अंत में ग्लोबल नेमस्पेस की खोज करता है

C. Python first searches the local namespace, then the global namespace and finally the built-in namespace पायथन पहले लोकल नेमस्पेस, फिर ग्लोबल नेमस्पेस और अंत में बिल्ट-इन नेमस्पेस की खोज करता है

D. Python first searches the global namespace, then the local namespace and finally the built-in namespace पायथन पहले ग्लोबल नेमस्पेस, फिर लोकल नेमस्पेस और अंत में बिल्ट-इन नेमस्पेस की खोज करता है

 

56. What will be the output of the following Python code? निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

 

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

 print (i)

 

A. 4 3 2 1

B. Error

C. 1 2 3 4

D. None of the mentioned उल्लिखित कोई नहीं

 

 

57. What will be the output of the following code snippet? निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?

 

print (2*3 + (5+6)*(1+1))

 

A. 129

B. 8

C. 121

D. None

58. What will be the output of the following code snippet? निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?

 

a = [1, 2, 3]

a = tuple (a)

a[0] = 2

print(a)

 

A. [2,2,3]

Β. (2,2,3)

C. (1,2,3)

D. Error

 

59. Which of the following concepts is not a part of Python?निम्नलिखित में से कौन सी अवधारणा पायथन का हिस्सा नहीं है?

 

A. Pointers पॉइंटर

B. Loops लूप्स

C. Dynamic Typing डॉयनामिक टाइपिंग

D. All of the above उपरोक्त सभी

 

60. The output of this Python code would be: इस पायथन कोड का आउटपुट होगाः

 

def find(x, **y):

     print(type(y))

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

 

A. String - स्ट्रिंग

B. <class 'dict'>

C. Tuple टपल

D. An exception is thrown एक एक्सेप्शन थ्रो कर दिया गया है

 

61. In Python, the primary use of the tell method is that: पायथन में, tell) मेथड का प्राथमिक उपयोग यह है किः

 

A. within the file, it tells the end position फाइल के भीतर, यह अंतिम स्थिति बताता है।

B. within the file, it tells the current position. फाइल के भीतर, यह वर्तमान स्थिति बताता है।

C. it tells us if the file is opened. यह हमें बताता है कि फाइल खोली गई है या नहीं।

D. none of the above. उपरोक्त में से कोई नहीं।

 

62. The output of this Python code would be: इस पायथन कोड का आउटपुट होगाः

>>> x={1:"X",2:"Y",3:"Z"}                                       

>>> del x

 

A. the del method does not exist for dictionary. डिक्शनरी के लिए del मेथेड मौजूद नहीं है।

B. the del would delete the values present in dictionary. del डिक्शनरी में मौजूद मानों को हटा देगा

C. the del would delete the entire dictionary. del पूरे डिक्शनरी को हटा देगा

D. the del would delete all the keys in dictionary. del डिक्शनरी की सभी कुंजियों को हटा देगा

 

63. The output of this Python code would be: इस पायथन कोड का आउटपुट होगाः

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

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

 

A. 'hi, great, and day'

B. 'hi great and day'

C. 'hi, great, day'

D. Error

 

64. Which one of these is NOT true about recursion? इनमें से कौन सा रिकर्सन के बारे में सत्य नहीं है?

 

A. We can replace a recursive function by a non-recursive function. हम एक रिकर्सिव फंक्शन को एक नॉन-रिकर्सिव फंक्शन द्वारा प्रतिस्थापित कर सकते हैं।

B. The memory space taken by the recursive functions is more than that of non-recursive function. रिकर्सिव फंक्शनो द्वारा लिया गया मेमोरी स्पेस नॉन-रिकर्सिव फंक्शन की तुलना में अधिक है।

C. Running a recursive function is faster as compared to function. a non-recursive नॉन-रिकर्सिव फंक्शन की तुलना में रिकर्सिव फंक्शन को रन करना तेज़ होता है।

D. The process of recursion makes it easier for users to understand a program. रिकर्सन की प्रक्रिया उपयोगकर्ताओं के लिए प्रोग्राम को समझना आसान बनाती है

 

65. What will be the output of the following code snippet? निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?

 

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

sum = 0

for ele in a:

    sum += ele

print(sum)

 

A. 15

B. 0

C. 20

D. None of these इनमें से कोई नहीं

 

66. The output of this Python code would be: इस पायथन कोड का आउटपुट होगाः >>>print("mno. PQR".capitalize())

 

A. Mno. Pqr

B. Mno. pqr

C. MNO. PQR

D. mno. pqr

 

67. Which function removes a set's first and the last element from a list? कौन सा फंक्शन किसी सूची से सेट के पहले और अंतिम एलिमेन्ट को हटा देता है?

 

A. pop पॉप

B. remove रिमूव

C. dispose डिस्पोज

D. None of these इनमें से कोई नहीं

 

 

68. Which of these functions can NOT be defined under the sys module? इनमें से कौन सा फंक्शन sys मॉड्यूल के अन्तर्गत डिफाइन्ड नहीं किया जा सकता है?

 

A. sys.argv

B. sys.readline

C. sys.path

D. sys.platform

 

69. Which of the following types of loops are not supported in Python?निम्नलिखित में से किस प्रकार के लूप पायथन में सपोर्ट नहीं करता हैं?

 

A. for

B. While

C. do-while

D. None of these इनमें से कोई नहीं

 

70. Which of the following is correct in respect of advantages of functions निम्नलिखित में से कौन सा फंक्शंस के लाभों के संबंध में सही है?

 

A. Decomposing complex problems into simpler pieces कॉम्प्लेक्स समस्याओं को सरल टुकडों मे विभाजित करना।

B. Reducing duplication of code कोड का दोहराव कम करना

C. both A and B A तथा B दोनों

D. None of the above. उपर्युक्त में से कोई नहीं

 

71. Correct syntax of file.writelines is File-writelines() का सही सिंटैक्स है?

 

A. file.writelines(sequence)

B. fileObject.writelines()

C. fileObject.writelines(sequence)

D. none of the mentioned उल्लिखित कोई नहीं

 

72. What will be the output of the following code snippet? निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?

 

count = 0

while(True):

    if count % 3== 0:

          print(count, end = "")

   if(count > 15):

         break;

   count += 1

 

A. 0 1 2 .....1 5

B. infinite Loop

C. 0 3 6 9 12 15

D. None of the above उपरोक्त में से कोई नहीं

 

73. Suppose list1 is [1, 5, 9], what is sum(list1)? मान लीजिए कि लिस्ट है [1, 5, 9], sum (list1) क्या है?

 

A. 15

 

B. 14

C. 5

D. None of the above इनमें से कोई नहीं

 

74. Which of the following is the proper syntax to check if a particular element is present in a list? लिस्ट में कोई विशेष एलिमेन्ट मौजूद है या नहीं, यह जांचने के लिए निम्नलिखित में से कौन सा उचित सिन्टैक्स है?

 

A. if ele in list

B. if not ele not in list

C. Both of the above उपर्युक्त दोनों

D. None of these इनमें से कोई नहीं

 

75. What will be the output of the following code snippet? निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?                                                 

 Day = ["Sunday", "Monday", "Tuesday", "Wednesday

print(Day[-3:-1])

 

A. ['Sunday', 'Monday']

B. ['Monday', 'Tuesday']

C. ['Tuesday', 'Wednesday']

D. None of these इनमें से कोई नहीं

 

76. PyPI stands for _ PyPI का मतलब है

 

A. Python Package Index. पायथन पैकेज इंडेक्स

 

B. Python package Installer पायथन पैकेज इंस्टालर

C. Both A & B A तथा B दोनों

D. None of the above. उपरोक्त में से कोई नही

 

77. What will be the output of the following code snippet? निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?

Day ["Sunday", "Monday", "Tuesday", "Wednesday"]; del Day [2] print (Day)

 

A. ['Sunday', 'Monday','Wednesday']

B. ['Sunday', 'Monday', 'Tuesday']

C. ['Monday', 'Tuesday', 'Wednesday']

D. None of these इनमें से कोई नहीं

 

78. Which of the following software translates source code into object code? निम्नलिखित सॉफ्टवेयर में से कौन सा ऑब्जेक्ट कोड में सोर्स कोड का अनुवाद करता है?

 

A. Compiler कम्पाइलर

B. Interpreter इंटरप्रेटर

C. Assembler असेंबलर.

D. None कोई नहीं

 

79. What will be the output of the following code snippet? निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?

 

dictl('first': 'sunday', 'second': 'monday')

dict2 (1: 3, 2: 4]

dict1.update(dict2)                                   

 print(dict1)

 

A. {'first':'sunday', 'second':'monday'}

B. {1:3,2:4}

C. {'first': 'sunday', 'second': 'monday', 1:3, 2:4}

D. None of the above उपर्युक्त कोई नहीं

 

80. Which of the following cannot be a variable?निम्नलिखित में से कौन सा वैरियेबल नहीं हो सकता है?

 

A.init

B. in

C. it

D. on

 

81. What will be the output of the following code snippet? निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?

 

word = "Python Programming"

n = len(word)

word1 = word.upper()

word2 = word.lower()

 converted_word =" "

 for i in range(n):

     if i % 2 == 0:

            converted_word += word2[i]

      else:

           converted_word += word1[i]

print(converted_word)

 

A. Python Programming

B. pYtHoN PrOgRaMmInG

C. python programming

D. PYTHON PROGRAMMING

 

82. The hierarchy of operations is denoted as. आपरेशन के पदानुक्रम को........ के रूप में दर्शाया गया है

 

I) +,-

II) Power

III) *,/

IV) \, MOD

 

A. I, II, III, IV

B. II, IV, III, I

C. IV, I, III, II

D. II, III, IV, I

 

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

 

A. [1, 4, 9, 16]

B. [0,1,2,3,4]

C. [0, 1, 4, 9, 16]

D. [1,2,3,4,5]

 

84. Which one of the following has the highest precedence in the expression? - निम्नलिखित में से किसकी एक्सप्रेशन में सर्वोच्च प्राथमिकता है?

 

A. Exponential घातीय

B. Parentheses कोष्ठक

C. Multiplication गुणन

D. None of the above इनमें से कोई नहीं

 

85. To add a new element to a list we use which Python command? लिस्ट में एक नया आइटम जोड़ने के लिए हम किस पायथन कमांड का उपयोग करते हैं?

 

A. list1.addEnd(5)

B. list1.addLast(5)

C. list1.append(5)

D. list1.add(5)

 

86. What error occurs when you execute the following python code snippet? जब आप निम्न पायथन कोड स्निपेट निष्पादित करते हैं तो क्या एरर होती है?

 

Apple=mango

 

A. NameError

B. ValueError

C. TypeError

D. SyntaxError

 

87. What will be the output of the following Python code? निम्नलिखित पायथन कोड का आउटपुट क्या होगा?                                               

 >>>e="hello india"

>>>print("%s"%e[4:7])

 

A. o i

B. h i

C. in

D. None कोई नहीं

 

88. Which of the following are valid escape sequences in Python? निम्नलिखित में से कौन से पायथन में वैध एस्केप सिक्वेन्स हैं?

 

A. \n

C. \\

 

B. \t

D. All of the above उपर्युक्त सभी

 

89. Function of a compiler is to एक कंपाइलर का फंक्शन है

 

A. put to gether the file and functions that are required by the program प्रोगाम द्वारा आवश्यक फाइल और फक्शन को एक साथ रखे।

B. translate the instructions in to a form suitable for execution by the program प्रोगाम द्वारा एक्जिक्यूसन के लिए उपयुक्त फॉर्म में निर्देशों का अनुवाद करें

C. load the executable code in to the memory and execute them एक्जिक्यूटेबल कोड को मेमोरी में लोड करें और उन्हें एक्जिक्यूट करें

D. allow the user to type the program यूजर को प्रोग्राम टाइप करने की अनुमति देता है

 

90. Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is the value of list1.count(5)? मान लीजिए लिस्ट 1 [3, 4, 5, 20, 5, 25, 1, 3], है, list1.count(5) की क्या वैल्यू है।

 

A. 0

B. 4

C. 1

D. 2

 

91. Which of the following is not valid Python identifiers? निम्नलिखित में से कौन वैध पायथन आइडेंटिफायर नहीं है?

 

A. email

B. ca$h

 

C. marks10

D. Python2Shar

 

92. To remove string "hello" from list1, we use which command? लिस्ट 1 से स्ट्रिंग 'हैलो" को हटाने के लिए, हम किस कमांड का उपयोग करते हैं?

 

A. list1.remove("hello")

B. list1.remove(hello)

C. list1.removeAll("hello")

D. list1.removeOne("hello")

 

93. Which of the following refers to mathematical function? निम्नलिखित में से कौन गणितीय फंक्शन को संदर्भित करता है?

 

A. sqrt

C. add

B.rhombus

D.Sub

 

94. Suppose list1 is [3, 4, 5, 20, 5], what is list1.index(5)? मान लीजिए list1 [3, 4, 5, 20, 5] list1.index (5) क्या है?

 

A. 0

B. 1

C. 4

 

 D. 2

 

95. To insert 7 to the forth position in list1, we use which command? लिस्ट 1 में चौथे स्थान पर 7 इन्सर्ट करने के लिए, हम किस कमांड का उपयोग करते हैं?

 

A. list1.insert(4, 7)

B. list1.insert(3, 7)

C. list1.add(7, 4)

D. list1.append(7, 3)

 

96. What will be the output of the following Python code? निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

 

>>>list1 = [11, 2, 23]

>>>list2 = [11, 2, 2]

>>>list1 < list2

A. True

B. False

C. Error

D. None of the above उपरोक्त में कोई नहीं

 

97. Which one of the following is not a python's predefined data type? निम्नलिखित में से कौन सा एक पायथन का पूर्वनिर्धारित डेटा टाइप नहीं है

 

A. Class - क्लास

 

B. List - लिस्ट

C. Dictionary - डिक्शनरी

D. Tuple – ट्यूपल

 

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

 

Α. 23-3 3.3

B. 34-33

C. 23-33

D. 23-3-3.3

 

99. The action performed by a...... structure must eventually cause the loop to terminate. एक ..स्ट्रक्चर द्वारा किए गए एक्शन को अंततः लूप को समाप्त करने का कारण बनना चाहिए।

 

A. sequence सिक्वेन्स

B. case केस

C. repetition रिपीटिशन

 

D. All of above उपर्युक्त सभी

 

100. What is the output when we execute list("hello")? जब हम list("hello") निष्पादित करते हैं तो आउटपुट क्या है?

 

A. ['llo']

B. ['hello']

C. ['h', 'e', 'l', 'l', 'o']

D. None of the above इनमें से कोई नहीं

Post a Comment

1 Comments

 python most imp  mcqs set 5