This is the Python Quiz with Questions and Answers. We will be covering different topics in Python. This will help you to test your knowledge on various topics in Python. Let’s start!!!!
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
In multiprocessing, different processes are handled
Question 2 of 30
Which of the following is not correct about multithreading?
Question 3 of 30
Which of the following is a microframework in Python?
Question 4 of 30
The task of executing or running other programs in Python by creating a new process is called?
Question 5 of 30
Which of the following is the correct way to create a thread for a function named ‘fun’?
Question 6 of 30
Which of the following is true about the Django module?
Question 7 of 30
Which of the following is not the HTTP method in flask?
Question 8 of 30
Which of the following can be the elements of a data frame?
Question 9 of 30
Which of the following is not true about Common Gateway Interface, CGI?
Question 10 of 30
Which of the following functions gives a boolean value True if atleast one of the values in the given sequence is not zero/empty?
Question 11 of 30
What is the output of the below code?
Question 12 of 30
What does the below code return where ‘df’ is the data frame and ‘clmn’ is one of the columns in the dataframe?
print(df[[‘clmn’]])
Question 13 of 30
Find the output of the below code?
Question 14 of 30
What is the output of the below code?
import numpy as np
np.linspace(1,6,6)
array([1, 2, 3, 4, 5, 6])
array([1. , 2.25, 3.5 , 4.75, 6. ])
array([1., 2., 3., 4., 5., 6.])
array([1., 1.83333333, 2.66666667, 3.5, 4.33333333, 5.16666667, 6. ])
Question 15 of 30
Which of the following is incorrect file handling mode?
Question 16 of 30
Which of the following return the first 5 rows of a data frame ‘df’ in pandas?
Question 17 of 30
What is the output of the below code?
def func(n):
if(n==0):
return 1
if(n%2):
return 2
return 1*func(n-1)
func(5)
Question 18 of 30
Which of the following is the correct way to search for a keyword using pip?
Question 19 of 30
What is the output of the below code?
n=1
eval(‘if(n==0):print(“Number is 0”)’)
Question 20 of 30
Which of the following commands lists all the packages using pip?
Question 21 of 30
Find the output of the below code.
def prod(x=1,y):
return x*y
prod(6)
Question 22 of 30
What is the output of the below code?
for i in ‘python'[::-1]:
print(i,end=’’)
Question 23 of 30
Which of the following returns the version of a package in Python?
Question 24 of 30
What is the output of the below code?
Question 25 of 30
Given a string s=’PythonGeeks’ which of the following operations give an error?
Question 26 of 30
What is the output of the below code?
~~~~~~~7
Question 27 of 30
Find the output of the below code.
[int(i) for i in range(5) if i%2]
Question 28 of 30
Which of the following adds elements at the end of the tuple?
Question 29 of 30
What is the output of the below code?
divmod(18,5)
Question 30 of 30
Find the output of the following code.
import re
patrn=re.compile(‘[ab]’)
print(patrn.findall(“abcd123”))
Summary
We are at the end of the Python Quiz with Questions and Answers. Hope the quiz made you recall the Python topics. Happy learning!
Lets try