Boost Your Career with In-demand Skills - Start Now!
Python is one of the preferred languages by both developers and companies. Here is an interesting Python MCQ Online Test. We have 30 questions, with both theoretical and coding questions from various topics. All the best!
0 of 30 Questions completed
Questions:
Information
You have already completed the quiz before. Hence you can not start it again.
You must sign in or sign up to start the quiz.
You must first complete the following:
Quiz complete. Results are being recorded.
0 of 30 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0 )
Earned Point(s): 0 of 0 , (0 )
0 Essay(s) Pending (Possible Point(s): 0 )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Current
Review / Skip
Answered
Correct
Incorrect
Question 1 of 30
Which of the following is true about the frozen set compared to the set?
Question 2 of 30
Which of the following is not a boolean value?
Question 3 of 30
What is the default step value of the function range()?
Question 4 of 30
What is the default data type of the return value of a function?
Question 5 of 30
Which of the following is not a built-in function in Python?
Question 6 of 30
The maximum number of arguments that can be given to the zip() function is?
Question 7 of 30
Which one of eval() and exec() can take ‘a=5\nprint(“a:”,a)’ as an argument and give the appropriate result?
Question 8 of 30
What of the following is a correct match for the argument type and the syntax?
Question 9 of 30
Which of the following is the advantage of recursion?
Question 10 of 30
Which of the following is the module used for sending mail in Python?
Question 11 of 30
What is the output of the below code?
set1={1,2.3,’a’}
set2={‘h’,1.0,3,’a’}
set1.symmetric_difference(set2)
{2.3, 3, 'h'}
{1,2.3, 3,'a', 'h'}
{1,1.0,2.3, 3,'a', 'h'}
{1.0,2.3, 3, 'h'}
Question 12 of 30
Find the output of the below code?
‘PythonGeeks'[False*True+True]
Question 13 of 30
What is the output of the below code?
if(): print(“if”)
else: print(“else”)
Question 14 of 30
How many times does the below loop iterate?
a=15
while(a>0):
if(a%2):
a=a-1
else:
a=a-3
Question 15 of 30
What is the output of the below code?
seq=[1,2,3,4,5]
seq.clear()
seq
Question 16 of 30
Find the output of the below code?
s=’PythonGeeks’
p=s[0], s[-1], s[-1:-2]
‘{0}-{1}-{2}’.format(*p)
Question 17 of 30
What is the output of the below code?
if({2,2,3}>{2,1,3}):
if(True and False or False):
print(“1”)
elif(”):
print(‘2’)
else:
print(‘3’)
Question 18 of 30
Which of the following gives the output as False?
Question 19 of 30
Find the output of the below code.
Question 20 of 30
Which of the following is the correct code to create a circle of radius 50 on GUI?
canvas.create_oval(100, 150, 200, 250)
canvas.create_circle(100, 150, 200, 250)
canvas.create_circle(100, 150, 150, 200)
canvas.create_oval(100, 150, 150, 200)
Question 21 of 30
What is the output of the below code?
from itertools import zip_longest
for i in zip_longest({1.2,3.5,6.7},[‘a’,’b’,’c’],range(4)):
print(i,end=(‘ ‘))
(1.2, 'a', 0) (3.5, 'b', 1) (6.7, 'c', 2) (0, ‘’, 3)
(1.2, 'a', 0) (3.5, 'b', 1) (6.7, 'c', 2) (None, None, 3) (None, None, 4)
(1.2, 'a', 1) (3.5, 'b', 2) (6.7, 'c', 3)
(1.2, 'a', 0) (3.5, 'b', 1) (6.7, 'c', 2) (None, None, 3)
Question 22 of 30
What is the output of the code?
def func(x,y,z):
print(x*y-z)
func(x=2,z=3,y=1)
Question 23 of 30
Which of the following calls give an error for the below function?
def func(a,b,*c):
print(a,b,c)
Question 24 of 30
Find the output of the below code.
from math import *
a=16
print(eval(‘sqrt(n)’,{},))
Question 25 of 30
What is the output of the below code?
exec(‘a=10\nif(n%3):print(a*3)\nelse:print(a*20)’)
Question 26 of 30
Which of the following is the correct way to display text ‘PythonGeeks’ on the GUI?
Question 27 of 30
Find the output of the below code.
Question 28 of 30
What does the below function return?
def fun(s):
if(len(s)==1):
return s[0]
return fun(s[:-1])+s[-1]
Question 29 of 30
Which of the following is the correct way to get the root using the parser ’parser’. In XML processing?
Question 30 of 30
What is the command used to remove the lock constraint in multiprocessing?
Summary
We are at the end of the Python MCQ Online Test Quiz. Hope you enjoyed taking the quiz. Happy learning!
send me the results for the mail
python test is complited
send result. I am confuse all right whow possible
Send me the result for the mail
this quiz is good to test my python skil
send me the results for the mail