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. Which of the following is correct?

class A:
def __init__(self):
self.count=5
self.count=count+1
a=A()
print(a.count)

5
6
0
Error

2. Which character stand for Starts with in regex?

&
^
$
#

3. ___________ are the arguments passed to a function in correct positional order.

Required arguments
Keyword arguments
Default arguments
Variable-length arguments

4. What will be the output of the following code

 a = 1
b = ++a
print(b is a)

True
False
Error
None of the above

5. Which of the following operations cannot be done on string str1, where str1="LETSFINDCOURSE."?

str1+="Learning made easy"
str1[1]="a"
print(str1[1])
str1[0:4]

6. Python is Object Oriented Programming Language.

True
False
Neither true nor false
None of the above

7. Which of the following is True regarding lists in Python?

Lists are immutable.
Size of the lists must be specified before its initialization
Elements of lists are stored in contagious memory location.
size(list1) command is used to find the size of lists.

8. Which of the following statements is false?

A non-private method in a superclass can be overridden
A derived class is a subset of superclass
The value of a private variable in the superclass can be changed in the subclass
When invoking the constructor from a subclass, the constructor of superclass is automatically invoked

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

str1="012"
num1=2
num2=0
for i in range(4):
num1+=2
for j in range(len(str1)):
num2=num2+num1
num3=num2%int(str1)
print(num3)

7
Infinite Loop
0
Error

10. A variable that is defined inside a method and belongs only to the current instance of a class is known as?

Inheritance 
Instance variable
Function overloading
Instantiation 

Results