Python
Questions No: 1/50

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

Questions No: 2/50

Which of the following is not a keyword ?
निम्नलिखित में से कौन सा कीवर्ड नहीं है?

Questions No: 3/50

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

Questions No: 4/50

Which of the following functions is used to open a file in Python?
पायथन में फ़ाइल खोलने के लिए निम्नलिखित में से किस फ़ंक्शन का उपयोग किया जाता है?

Questions No: 5/50

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

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

Which of the following error is returned when we try to open a file in write mode which does not exist?
जब हम किसी ऐसी फ़ाइल को राइट मोड में खोलने की प्रयास करते हैं जो मौजूद नहीं है तो निम्न में से कौन सी एरर दिखाई देती है

Questions No: 8/50

How can assertions be disabled in Python?
पायथन में अभिकथनों को कैसे अक्षम किया जा सकता है?

Questions No: 9/50

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

Questions No: 10/50

What will be the output of the following code?

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

Questions No: 11/50

What will be the output of the following Python code?

for i in range(5):
    if i == 5:
        break
    else:
        print(i)
else:
    print("Here")

Questions No: 12/50

What will be the output of the following code ?

f=open("demo.txt","w+")
f.write("Welcome to python")
f.seek(5)
a=f.read(5)
print(a)

Questions No: 13/50

What will be the output of : infile.read(2)
निम्नलिखित कोड का आउटपुट क्या होगा? infile.read(2)

Questions No: 14/50

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

Questions No: 15/50

What is full form of CSV?
सीएसवी का फुल फॉर्म क्या है?

Questions No: 16/50

What will be the output of the following Python code?

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

Questions No: 17/50

Which of the following is used to define a block of code in Python language ?
पायथन लैंग्वेज में कोड के ब्लॉक को परिभाषित करने के लिए निम्न में से किसका प्रयोग किया जाता है?

Questions No: 18/50

What is the output of the following code?

def s(n1):
    print(n1)
    n1=n1+2
n2=4
s(n2)
print(n2)

Questions No: 19/50

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

Questions No: 20/50

Given a string x="hello" What is the output of x.count('l')?
एक स्ट्रिंग x = "hello " को देखते हुए x.count ('1') का आउटपुट क्या है?

Questions No: 21/50

Which mode creates a new file if the file does not exist?
यदि फ़ाइल मौजूद नहीं है तो कौन सा मोड एक नई फाइल बनाता है?

Questions No: 22/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: 23/50

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

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

Questions No: 24/50

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

Questions No: 25/50

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

Questions No: 26/50

Identify the correct function call to read first 5 character of the file from the beginning
शुरुआत से फ़ाइल के पहले 5 अक्षर को पढ़ने के लिए सही फ़ंक्शन कॉल की पहचान करें

Questions No: 27/50

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

Questions No: 28/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: 29/50

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

Questions No: 30/50

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

Questions No: 31/50

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

Questions No: 32/50

What will the following code output?

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

Questions No: 33/50

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

Questions No: 34/50

What will be the output of the following Python code?

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

Questions No: 35/50

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

Questions No: 36/50

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

Questions No: 37/50

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

Questions No: 38/50

Which of the following is not a relational opeartor in Python?
निम्नलिखित में से कौन पायथन में एक रिलेशनल ऑपरेटर नहीं है?

Questions No: 39/50

______ are additional readable information to clarify the statement in python.
______ पायथन में कथन को स्पष्ट करने के लिए अतिरिक्त पठनीय जानकारी है।

Questions No: 40/50

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

Questions No: 41/50

What will be the output after following statements?

x = 2
if x < 5:
     print(x)
else:
    pass

Questions No: 42/50

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

Questions No: 43/50

In which language is Python written?
पायथन किस भाषा में लिखा गया है?

Questions No: 44/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: 45/50

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

Questions No: 46/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: 47/50

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

Questions No: 48/50

What will the following code output? print(2 << 2)
निम्नलिखित कोड आउटपुट क्या होगा? print(2 << 2)

Questions No: 49/50

When we open file in append mode the file pointer is at the ______ of the file.
जब हम अपेंड मोड में फाइल खोलते हैं तो फाइल पॉइंटर फाइल के _____ पर होता है।

Questions No: 50/50

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