Here is an amazing Python Online Quiz with Answers. It will help you to practice and revise to make your basics strong in Python. 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
Is Python code compiled or interpreted?
-
Question 2 of 30
Which of the following returns the elements common to both sets?
-
Question 3 of 30
Which of the following extra properties is associated with the DefaultDict over Dictionaries?
-
Question 4 of 30
What is a package in Python?
-
Question 5 of 30
What is the maximum number of argument a zip() function take and what is the output?
-
Question 6 of 30
Which of the following is the command used to run the GUI till the user closes it manually ?
-
Question 7 of 30
Which of the following sequences checks for decimal digits in the re module?
-
Question 8 of 30
Which function overloads the != operator?
-
Question 9 of 30
Which of the functions is used to get the range of values from specified starting to the specified ending value?
-
Question 10 of 30
What is the use of the waitkey(0) in opencv?
-
Question 11 of 30
Which of the following is a function to reverse a list named list1?
-
Question 12 of 30
- What is the output of the below code?
list1=[‘a’,’b’,’y’,’o’]
list2=list(range(5))
list1[list2.index(1)]
|
-
Question 13 of 30
- Find the output of the below code?
-
Question 14 of 30
- What is the output of the below code?
var=”123 456″
print(var.find(7))
|
-
Question 15 of 30
Which of the following is the correct way to change the data type of one of the columns clm to int in the data frame df?
-
Question 16 of 30
- What is the output of the following code?
dic1={1:’a’,2:’t’,3:’t’}
dic2={1:’r’,4:’o’}
dic1.update(dic2)
dic1
{1: ‘r’, 2: ‘t’, 3: ‘t’, 4: ‘o’}
|
-
Question 17 of 30
- What is the output of the below code?
l = (i for i in range(5))
for i in l:
print(i,end=”)
for i in l:
print(i,end=”)
|
-
Question 18 of 30
Which of the following gives an error?
-
Question 19 of 30
-
- What is the output of the below code?
i=1
for i not in range(3):
print(i,end=’ ‘)
|
-
Question 20 of 30
Which of the following is the correct command to select all the rows that have the cl1 values less than 3 from the table tb?
-
Question 21 of 30
- Find the output of the below code.
i = 3
while i >0:
print (i,end=”)
i -= 1
else:
print (0)
|
-
Question 22 of 30
- What is the output of the below code?
y=lambda x: x**2 if x%2 else x**3
y(5)
|
-
Question 23 of 30
- What is the error returned on running the below code?
-
Question 24 of 30
- What is the output of the below code?
list(zip(‘abcd’,[1,2,3],[1.2,9.4,0]))
|
-
-
-
-
-
Question 25 of 30
Which of the following is the correct way to find the determinant of a given matrix ‘A’.
-
Question 26 of 30
- What is the output of the below function?
def func():
global x
x=5
print(x)
x=2
func()
print(x)
|
-
Question 27 of 30
- What is the output of the below code?
-
Question 28 of 30
Which of the following selects 3rd,4th and 5th rows from the dtaframe df?
-
Question 29 of 30
Which of the commands add a breakpoint at line 3 in the program?
-
Question 30 of 30
- What is the output of the below code?
def func(x):
if(x<=0):
return 0
return 1+func(x-2)
func(11)
|
Summary
Congratulations! You have successfully completed the Python Online Quiz with Answers. Hope you enjoyed taking the quiz. Happy learning!