Python
Questions No: 1/50

What will be the output of the following Python code?

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

Questions No: 2/50

Each line of a text file is terminated by a special character, called the ___
टेक्स्ट फाइल की प्रत्येक पंक्ति को एक विशेष कैरेक्टर द्वारा समाप्त किया जाता है, जिसे ____ कहा जाता है।

Questions No: 3/50

What will the value of a if a=~100
यदि a=~100 है तो a का मान क्या है?

Questions No: 4/50

What will be written to the file?

f = open("test.txt", "w")
f.write("ABC")
f.write("DEF")
f.close()

Questions No: 5/50

What is the value of the following Python code?

>>>print(36 / 4)

Questions No: 6/50

What will be the result of the expression : print(10 or 0) ?
print(10 or 0 ) : का परिणाम क्या होगा?

Questions No: 7/50

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

Questions No: 8/50

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

print(not(3>4))
print(not(1&1))

Questions No: 9/50

What is the use of seek() method in files?
फाइलों में seek() फंक्शन का क्या उपयोग है?

Questions No: 10/50

Which one of the following is incorrect?
निम्नलिखित में से कौन सा गलत है?

Questions No: 11/50

Which function is used to read all the characters from file?
फ़ाइल से सभी वर्णों को पढ़ने के लिए किस फ़ंक्शन का उपयोग किया जाता है?

Questions No: 12/50

Which one of the following is the correct extension of the Python file ?
निम्नलिखित में से कौन सा पायथन फाइल का सही एक्सटेंशन है-

Questions No: 13/50

If a function doesn't have a return statement, which of the following does the function return ?
यदि किसी फंक्शन का रिटर्न स्टेटमेंट नहीं है, तो निम्न में से कौन सा फंक्शन रिटर्न होता है?

Questions No: 14/50

What does the 'r' mode signify when opening a file using open() in Python?
पायथन में ओपन() का उपयोग करके फ़ाइल खोलते समय 'r' मोड क्या दर्शाता है?

Questions No: 15/50

Which of the following error is returned by the given code ?

f = open("test.txt","w")
f.write(345)

Questions No: 16/50

what will the output of : print(5&3)
इसका आउटपुट क्या होगा: print(5&3)

Questions No: 17/50

Which function reads all lines into a list from file?
कौन सा फंक्शन फाइल से सभी लाइनों को सूची में पढ़ता है?

Questions No: 18/50

What will the following code output?

a=‘INFOMAX’ 
a=10
print(type(a))

Questions No: 19/50

Which is a valid Constant in python
जो कि पायथन में एक मान्य स्थिरांक है

Questions No: 20/50

Which of the following functions is a built-in function in pythonn
निम्न में से कौन सा फंक्शन पायथन में बिल्ट-इन फंक्शन है

Questions No: 21/50

What is the Full form of EOL?
EOL का फुल फॉर्म क्या है?

Questions No: 22/50

What does readlines() method return ?
रीडलाइन () मेथड क्या रिटर्न करता है?

Questions No: 23/50

What will be the output of the following Python code?

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

Questions No: 24/50

Which one is not the attribute of a file ?
इनमें से कौन एक फाइल की विशेषता नहीं है ?

Questions No: 25/50

The data type whose representation is known are called
वह डेटा प्रकार जिसका प्रतिनिधित्व ज्ञात हो, कहलाते हैं

Questions No: 26/50

Which of these in not a core data type in python?
इनमें से कौन एक कोर डेटा प्रकार नहीं है?

Questions No: 27/50

What happens if file opened in write mode already exists?
यदि राइट मोड में खोली गई फाइल पहले से मौजूद हो तो क्या होगा?

Questions No: 28/50

Which function returns the strings?
कौन सा फंक्शन स्ट्रिंग्स लौटाता है?

Questions No: 29/50

The function which reads one line from standards input and returns it as a string (removing the trailing newline)
वह फंक्शन जो स्टैण्डर्ड इनपुट से एक पंक्ति रीड करता है और इसे स्ट्रिंग के रूप में लौटाता है (ट्रेलिंग न्यूलाइन को हटाते हुए)

Questions No: 30/50

Python is an example of which type of programming language?
पायथन किस प्रकार की प्रोग्रामिंग भाषा का उदाहरण है?

Questions No: 31/50

Which of the following is not a valid mode to open a file?
निम्नलिखित में से कौन सा फ़ाइल खोलने के लिए वैध मोड नहीं है?

Questions No: 32/50

What will be the output of the following Python code?

x = 'abcd'
for i in range(len(x)):
    print(i)

Questions No: 33/50

which of the following will read entire content of file (file object 'f')?
निम्नलिखित में से कौन फ़ाइल (file object 'f') की संपूर्ण सामग्री को पढ़ेगा ?

Questions No: 34/50

Given a function that does not return any value, what value is shown when executed at the shell ?
एक फ़ंक्शन जो कोई मान नहीं लौटाता है ,शेल पर निष्पादित होने पर कौन सा मान दिखाया जाता है

Questions No: 35/50

The ______ mode of Python gives instant result of typed statement
पायथन का ______ मोड टाइप किए गए कथन का तुरंत परिणाम देता है

Questions No: 36/50

What will be the output of the following Python code?

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

Questions No: 37/50

Which method is used to read the entire content of a file as a string in Python?
पायथन में फ़ाइल के पूरे डाटा को स्ट्रिंग के रूप में पढ़ने के लिए किस फंक्शन का उपयोग किया जाता है?

Questions No: 38/50

____ are the arguments passed to a function in correct positional order.
सही स्थिति क्रम में किसी फंक्शन को दिए गए आर्गुमेन्ट हैं।

Questions No: 39/50

What will be the output of the following code?

f=open("demo.txt","r")
print(f.tell())

Questions No: 40/50

What will be the output of the following pseudocode, where ^ represent XOR operation ?

Integer a, b, c
set b = 4, a = 3
c =a ^ b
Print c

Questions No: 41/50

Python code can run on a variety of platforms, it means Python is a _____ language.
पायथन कोड विभिन्न प्लेटफार्मों पर चल सकता है, इसका मतलब है कि पायथन एक _____ भाषा है।

Questions No: 42/50

What is the return type of following function ?

def func1():
       return 'mnp',22
print(type(func1()))

Questions No: 43/50

Which statement will open file data.txt in append mode?
कौन सा स्टेटमेंट data.txt फाइल को एपेंड मोड में खोलेगा?

Questions No: 44/50

What is the output of the following program:

i = 0
while i < 3:
    print (i)
    i=i+1
    print (i+1)

Questions No: 45/50

Which of the following declarations is incorrect?
निम्नलिखित में से कौन सी डेक्लरेशंस गलत है?

Questions No: 46/50

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

Questions No: 47/50

Which bitwise operator represents AND?
कौन सा बिटवाइज़ ऑपरेटर AND को दर्शाता है?

Questions No: 48/50

Which statement will return one line from a file (file object is f) ?
कौन सा स्टेटमेंट फ़ाइल (file object is 'f) से एक पंक्ति प्रस्तुत करेगा |

Questions No: 49/50

What will be the output of the following Python code?

x = ['ab', 'cd']  
for i in x:      
    x.append(i.upper())  
print(x)

Questions No: 50/50

What will be the output after the following statements?

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