Python Programming Quiz


Play this Python quiz that will help you to excel in C++ certification exams, placements etc. This Python programming quiz consist of 10 questions that you need to solve in 10 minutes. We’ve specially designed this quiz so that you can quickly acquaint to the pattern of questions you can be asked in placement drives, certification exams etc. This Python programming test enables you to assess your knowledge of Python programming.

Take the Free Practice Test



Python MCQs

Practice Python MCQ Questions, which will help you to understand Python programming related concepts and also helps you to prepare for placements, technical rounds, interviews, competitive exams etc.

Python Quiz

Try Free Python Quiz, to start a quiz you need to login first, after login you will get start quiz button and then by clicking on that you can start quiz. You will get 10 Minutes to answer all questions.

Python Quiz

1. The ________ statement is a null operation.

break
exit
return
pass

2. What will the below Python code do?

set1={2,3}
set2={3,2}
set3={2,1}
if(set1==set2):
print("yes")
else:
print("no")
if(set1==set3):
print("yes")
else:
print("no")

Yes, No
No, No
Yes, Yes
"==" is not supported for set in Python

3. Which of the following function headers is correct?

def fun(a = 2, b = 3, c)
def fun(a = 2, b, c = 3)
def fun(a, b = 2, c = 3)
def fun(a, b, c = 3, d)

4. If return statement is not used inside the function, the function will return:

None
0
Null
Arbitary value

5. What is the extension of python file?

.p
.py
.python
None of the above

6. Which operator is used to calculate power of x raise to y.

x^y
x*y
x**y
None of the above

7. What is the output of the following code : print 5//2

2
2.5
2.0
Error

8. Which one of the following is the correct way of calling a function?

function_name()
call function_name()
ret function_name()
function function_name()

9. Which of the following is not a relational opeartor in Python?

>=
<=
=
!=

10. Which of the following is correct with respect to OOP concept in Python?

Objects are real world entities while classes are not real.
Classes are real world entities while objects are not real.
Both objects and classes are real world entities.
Both object and classes are not real.

Results