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. Lambda is a function in python?

True
False
Lambda is a function in python but user can not use it.
None of the above

2. How is a function declared in Python?

def function function_name():
declare function function_name():
def function_name():
declare function_name():

3. How to copy one list to another in python?

l1[] = l2[]
l1[] = l2
l1[] = l2[:]
l1 = l2

4. Which of the following is not used as loop in Python?

for loop
while loop
do-while loop
None of the above

5. The child's __init__() function overrides the inheritance of the parent's __init__() function.

TRUE
FALSE
Can be true or false
Can not say

6. Where is function defined?

Module
class
Another Function
All of the above

7. Which inheritance is a blend of more than one type of inheritance?

single inheritance
Hybrid inheritance
Multiple inheritance
Multilevel inheritance

8. Suppose B is a subclass of A, to invoke the __init__ method in A from B, what is the line of code you should write?

A.__init__(self)
B.__init__(self)
A.__init__(B)
B.__init__(A)

9. In Regex, s stands for?

Returns a match where the string DOES NOT contain digits
Returns a match where the string DOES NOT contain a white space character
Returns a match where the string contains a white space character
Returns a match if the specified characters are at the end of the string

10. When does the else statement written after loop executes?

When break statement is executed in the loop
When loop condition becomes false
Else statement is always executed
None of the above

Results