Time Left : 00 : 30 : 00

What will be the output of the following Python code?

x = [[0], [1]]
print((' '.join(list(map(str, x))),))



Correct Answer : D

What will be the output of the following Python program?

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



Correct Answer : C

What is the maximum possible length of an identifier?

Correct Answer : D

What is the maximum possible length of an identifier in Python?

Correct Answer : D

What is the answer to this expression, 22 % 3 is?

Correct Answer : B

Which one of the following is not a keyword in Python language?

Correct Answer : B

Which of the following is the truncation division operator in Python?

Correct Answer : B

What is the maximum length of a Python identifier?

Correct Answer : D

Which of the following is a feature of Python DocString?

Correct Answer : D

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

z=set('abc$de')
'a' in z

 

Correct Answer : B

What are the two main types of functions in Python?

Correct Answer : C

Which function is called when the following Python program is executed?

f = foo()
format(f)

 

Correct Answer : C

Is Python code compiled or interpreted?

Correct Answer : B

Which of the following is not a keyword?

Correct Answer : A

What is the return type of function id?

Correct Answer : A

Which of these is the definition for packages in Python?

Correct Answer : B

What will be the output of the following Python code?

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

 

Correct Answer : B

What will be the output of the following Python statement?

>>>"a"+"bc"

 

Correct Answer : B

What will be the output of the following Python code?

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

 

Correct Answer : D

Which of the following functions is a built-in function in python?

Correct Answer : B

What will be the output of the following Python code?

print('*', "abcde".center(6), '*', sep='')



Correct Answer : B

What error occurs when you execute the following Python code snippet?

apple = mango

 

Correct Answer : B

Which of the following is the use of id() function in python?

Correct Answer : B

Which of the following is used to define a block of code in Python language?

Correct Answer : A

Which of the following is an invalid statement?

Correct Answer : B

What is the order of precedence in python?

Correct Answer : D

What is the order of namespaces in which Python looks for an identifier?

Correct Answer : C

Why are local variable names beginning with an underscore discouraged?

Correct Answer : A

What will be the output of the following Python program?

def addItem(listParam):
    listParam += [1]
 
mylist = [1, 2, 3, 4]
addItem(mylist)
print(len(mylist))

 

Correct Answer : A

All keywords in Python are in _________

Correct Answer : D