Python
Questions No: 1/50

What is the value of the following Python code?

>>>print(36 / 4)

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

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

Questions No: 4/50

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

Questions No: 5/50

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

Questions No: 6/50

What is the output of the following program:

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

Questions No: 7/50

Which can not be a variable in python
जो कि Python में वेरिएबल नहीं हो सकता

Questions No: 8/50

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

Questions No: 9/50

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

Questions No: 10/50

To start Python from the command prompt, use the command
कमांड प्रॉम्प्ट से पायथन शुरू करने के लिए, कमांड का उपयोग करें

Questions No: 11/50

What will be the output of the following Python code?

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

Questions No: 12/50

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

Questions No: 13/50

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

Questions No: 14/50

What is the output of the following code? print(not False)
निम्नलिखित कोड का परिणाम क्या है? print(not False)

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

What is the output of the following?
n=5
while n>0:
    n-=1
    if n==2:
        continue
    print(n,end=' ')

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

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

Questions No: 19/50

What is the output of the following code ?

def fun(a, b=6):
    a=a+b
    print(a)
fun(5, 4)

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

Which can contain multiple lines of text.
जिसमें टेक्स्ट की कई पंक्तियाँ हो सकती हैं।

Questions No: 22/50

____is a string literal denoted by triple quotes for providing the specifications of certain program elements.
____एक स्ट्रिंग अक्षर है जिसे कुछ प्रोग्राम एलिमेन्टो के स्पेशिफिकेशन को प्रोवाइड करने के लिए ट्रिपल कोट्स द्वारा दर्शाया जाता है।

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

Which of the following is not a features of Python?
निम्नलिखित में से कौन पायथन की विशेषता नहीं है?

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

What is the output of the following code?

count=0
while count<3:
print(count,end=" ")
count+=1

Questions No: 28/50

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

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

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

Questions No: 31/50

what is 'f' in the following statement?

f=open("Data.txt","r")

Questions No: 32/50

How many arguments a Python program can accept from the command line?
पायथन प्रोग्राम कमांड लाइन से कितने तर्क स्वीकार कर सकता है?

Questions No: 33/50

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

Questions No: 34/50

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

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

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

Questions No: 37/50

in python which function is used to read CSV file
पायथन में CSV फ़ाइल को पढ़ने के लिए किस फ़ंक्शन का उपयोग किया जाता है?

Questions No: 38/50

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

Questions No: 39/50

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

Questions No: 40/50

What will be the output of the following Python code?

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

Questions No: 41/50

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

Questions No: 42/50

What will be the output of the following Python code?

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

Questions No: 43/50

Python Programs are typed in
Python प्रोग्राम टाइप किये जाते हैं

Questions No: 44/50

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

Questions No: 45/50

Which of the following statements is used to check if a file exists in Python?
निम्नलिखित में से किस फंक्शन का उपयोग यह जांचने के लिए किया जाता है कि कोई फ़ाइल पायथन में मौजूद है या नहीं?

Questions No: 46/50

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

Questions No: 47/50

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

Questions No: 48/50

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

Questions No: 49/50

What will be the output of the following Python code?

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

Questions No: 50/50

Which of the following words is not a keyword of python language?
निम्नलिखित में से कौन सा शब्द नहीं पायथन लैंग्वेज का कीवर्ड है?