Python
Questions No: 1/50

Which of the following is the correct way to write multiple lines to a file in Python?
पायथन में किसी फ़ाइल में एक से अधिक पंक्तियाँ लिखने का सही तरीका निम्नलिखित में से कौन सा है?

Questions No: 2/50

Which keyword allows modification of a global variable inside a function?
Function के अंदर global variable को modify करने के लिए कौन-सा keyword उपयोग होता है?

Questions No: 3/50

Which of the following data types is not supported in python?
पायथन में निम्नलिखित में से कौन सा डेटा टाइप सपोर्ट नहीं करता है।

Questions No: 4/50

What will be the output?

def fun(a, b=5):
    print(a+b)
fun(10, 20)

Questions No: 5/50

The syntax used to rename a file :
फ़ाइल का नाम बदलने के लिए प्रयुक्त सिंटैक्स:

Questions No: 6/50

Which denotes file binary mode?
फ़ाइल बाइनरी मोड को कौन दर्शाता है?

Questions No: 7/50

Which function tells the current file position?
कौन सा फ़ंक्शन फ़ाइल की वर्तमान स्थिति बताता है?

Questions No: 8/50

What will be the output of the following Python code?

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

Questions No: 9/50

What will be the output of the following Python code?

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

Questions No: 10/50

What will be the result of the expression: 15 and 10?
व्यंजक 15 और 10 का परिणाम क्या होगा?

Questions No: 11/50

Which file mode creates a new file but raises an error if it exists?
File mode में यदि file मौजूद नहीं है लेकिन पढ़ने से पहले create करनी है, तो कौन-सा mode उपयोग होगा?

Questions No: 12/50

What will be the output of the following Python code?

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

Questions No: 13/50

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

Questions No: 14/50

Which is Special type of literal in Python
जो पाइथन में विशेष प्रकार का शाब्दिक है

Questions No: 15/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: 16/50

What is the output of the following code?

x = 50
def func (x):
    x = 2
func (x)
print ('x is now', x)

Questions No: 17/50

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

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

Questions No: 18/50

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

Questions No: 19/50

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

Questions No: 20/50

What is the default mode for files in Python?
पायथन में फ़ाइलों के लिए डिफ़ॉल्ट मोड क्या है?

Questions No: 21/50

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

Questions No: 22/50

which is a correct way to open a file in python
पायथन में फ़ाइल खोलने के लिए किस फ़ंक्शन का उपयोग किया जाता है?

Questions No: 23/50

If the else statement is used with a while loop, the else statement is executed when the condition becomes _____ .
यदि else स्टेटमेंट का प्रयोग 'व्हाइल' लूप के साथ किया जाता है, तो else स्टेटमेंट तब निष्पादित होता है जब कंडीशन हो जाती है।

Questions No: 24/50

How many keywords are there in Python 3.0 version?
Python 3.0 संस्करण में कितने कीवर्ड हैं?

Questions No: 25/50

What is the output of following code?

x = 1
y = 2
z = 3
print(x < y < z == True)

Questions No: 26/50

Which of the following is incorrect regarding variables in Python?
पायथन में वेरिएबल्स के संबंध में निम्नलिखित में से कौन सा गलत है?

Questions No: 27/50

Which of the following is not a logical operator?
निम्नलिखित में से कौन एक लॉजिकल ऑपरेटर नहीं है?

Questions No: 28/50

What is the output of following?

for i in range(5):
    if i == 3:
        continue
    print(i, end=" ")

Questions No: 29/50

Can we write if / else into one line in python?
क्या हम पाइथन में एक लाइन में if / else लिख सकते हैं?

Questions No: 30/50

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

Questions No: 31/50

Which of the following options can be used to read the first line of a text file data.txt?
टेक्स्ट फाइल data.txt की पहली लाइन को पढ़ने के लिए निम्न में से कौन सा विकल्प इस्तेमाल किया जा सकता है?

Questions No: 32/50

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

Questions No: 33/50

Which of the following is an invalid mode?
निम्न में से कौन सा अमान्य मोड है?

Questions No: 34/50

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

Questions No: 35/50

What will be printed?

i = 0

while i < 3:
    i += 1
    if i == 2:
        continue
    print(i, end=" ")
else:
    print("END")

Questions No: 36/50

How many keywords present in the python programming language?
पायथन प्रोग्रामिंग भाषा में कितने कीवर्ड मौजूद हैं?

Questions No: 37/50

What will be the output of following?

Y=[2,5J,6]
Y.sort()

Questions No: 38/50

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

Questions No: 39/50

What will be the output?

f = open("test.txt", "w")
f.write("Python")
f.seek(0)
print(f.read())

Questions No: 40/50

Which of the following is NOT a valid type of argument in Python?
निम्नलिखित में से कौन सा पाइथन में मान्य तर्क प्रकार नहीं है?

Questions No: 41/50

What will be the output of the following expression ?

x =4
print(x<<2)

Questions No: 42/50

Work of tell() method in file processing is
फाइल प्रोसेसिंग में tell() फंक्शन का कार्य है

Questions No: 43/50

The syntax of seek() is: file_object.seek(offset [, reference_point]) What does the reference_point indicate?
seek () का सिंटैक्स है: file_object.seek(offset [, Reference_point]) रेफरेंस_पॉइंट क्या दर्शाता है?

Questions No: 44/50

A Function used for writing data in the binary format :
बाइनरी फॉर्मेट में डेटा लिखने के लिए उपयोग किया जाने वाला एक फंक्शन:

Questions No: 45/50

What is the pickling?
पिकलिंग क्या है?

Questions No: 46/50

Which statement will move file pointer 10 bytes backward from current position.
कौन सा स्टेटमेंट फाइल पॉइंटर को वर्तमान स्थिति से 10 बाइट पीछे ले जाएगा ।

Questions No: 47/50

What will be the output of the following Python code?

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

Questions No: 48/50

What is the return type of function id?
फ़ंक्शन आईडी का रिटर्न प्रकार क्या है?

Questions No: 49/50

What will be the output after the following statements?

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

Questions No: 50/50

What is unpickling?
अनपिकलिंग क्या है