Python
Questions No: 1/50

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

Questions No: 2/50

What is the return type of following function ?

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

Questions No: 3/50

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

Questions No: 4/50

What is the output of the following?

x=123
for i in x:
    print(i)

Questions No: 5/50

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

Questions No: 6/50

Python uses a/an _______ to convert source code
सोर्स कोड को परिवर्तित करने के लिए पायथन _______ का उपयोग करता है

Questions No: 7/50

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

Questions No: 8/50

What will be the output of the following Python code ?

def display(b,n):
    while n>0:
        print(b,end='')
        n=n-1
display('z',3)

Questions No: 9/50

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

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

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

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

Questions No: 12/50

How is a code block indicated in Python?
पायथन में कोड ब्लॉक को कैसे दर्शाया जाता है?

Questions No: 13/50

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

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

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

Questions No: 16/50

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

Questions No: 17/50

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

Questions No: 18/50

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

Questions No: 19/50

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

Questions No: 20/50

What will be the output of the following Python code?

def foo():
    total += 1
    return total
total = 0
print(foo())

Questions No: 21/50

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

Questions No: 22/50

What keyword is used in Python to raise exceptions?
एक्सेप्शन उत्पन्न करने के लिए पायथन में किस कीवर्ड का उपयोग किया जाता है?

Questions No: 23/50

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

Questions No: 24/50

What is mean by 'rb' mode when working with binary file in python
पायथन में बाइनरी फ़ाइल के साथ काम करते समय 'rb' मोड का क्या अर्थ है?

Questions No: 25/50

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

Questions No: 26/50

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

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

Questions No: 27/50

Is Python case sensitive when dealing with identifiers?
क्या पहचानकर्ताओं के साथ व्यवहार करते समय पायथन केस सेंसिटिव है?

Questions No: 28/50

What will be the output of the following Python code?

def foo(x):
    x = ['def', 'abc']
    return id(x)
q = ['abc', 'def']
print(id(q) == foo(q))

Questions No: 29/50

What will be the output of the following Python code?

def foo():
    return total + 1
total = 0
print(foo())

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

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

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

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

Questions No: 34/50

How can you write data to a file in Python?
आप पायथन में किसी फ़ाइल में डेटा कैसे लिख सकते हैं?

Questions No: 35/50

What will be the output of the following Python code?

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

Questions No: 36/50

The contents inside the "for loop" are separated by?
लूप के अंदर की सामग्री को _____ द्वारा अलग किया जाती है?

Questions No: 37/50

What will the following code output?

x=0
if x:
print("True")
else:
print("False")

Questions No: 38/50

What will be the output of the following Python code?

i = 1
while False:
    if i%2 == 0:
        break
    print(i)
    i += 2

Questions No: 39/50

How many keywords are there in python 3.7?
पायथन 3.7 में कितने कीवर्ड होते है?

Questions No: 40/50

Hierarchy in a pseudo-code can be shown by:
सूड़ो-कोड में पदानुक्रम को द्वारा दिखाया जा सकता है|

Questions No: 41/50

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

Questions No: 42/50

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

Questions No: 43/50

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

Questions No: 44/50

Python is ________ Programming Language
पायथन एक _____ प्रोग्रामिंग है

Questions No: 45/50

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

Questions No: 46/50

Which of the following is an escape sequence for a new line character
निम्नलिखित में से कौन सा एक नए लाइन कैरेक्टर के लिए एस्केप सीक्वेंस कैरेक्टर है

Questions No: 47/50

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

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

What is the output of the following code ?

def disp(*arg):
    for i in arg:
        print(i)
disp(name="Rajat", age="20")

Questions No: 50/50

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