Explore Online Courses
Free Courses
Hire from us
Become an Instructor
Reviews
All Courses
Submit
Submit
Take the Free Python Practice Test
Instructions:
FREE test and can be attempted multiple times.
60 Minutes
30 Multiple Choice Questions
Fill in the Details to Get Started
Select your preference
Self-learning and knowledge validation
Completed a course & revising
Just curious
By providing your contact details, you agree to our
Terms of Use
&
Privacy Policy
Welcome to your Python for Data Science Quiz
Which of the following data types is not supported in python?
Numbers
String
List
Slice
What is the output of the following code? * print(type(lambda:None))
Which of the following is correct about dictionaries in python?
Python's dictionaries are kind of hash table type.
They work like associative arrays or hashes found in Perl and consist of key-value pairs.
A dictionary key can be almost any Python type, but are usually numbers or strings. Values, on the other hand, can be any arbitrary Python object.
All of the above.
In a Python program, a control structure:
Manages the input and output of control characters
Dictates what happens before the program starts and after it terminates
Defines program-specific data structures
Directs the order of execution of the statements in the program
What signifies the end of a statement block or suite in Python?
}
A line that is indented less than the previous line
A comment
end
Which of the function among will return 4 on the set s = {3, 4, 1, 2}?
Sum(s)
Len(s)
Max(s)
Both B and C
What gets printed? print(type(2/3))
What is the output of the following code? * print(type([2,4]))
What gets printed? p='qw' q=56 print(p+q)
qw qw
qw 56
Error
56
List in Python can hold elements of same type only. True or False? *
True
False
Which of the following is required to create a new instance of the class?
A constructor
A class
A value-returning method
A None method
What relationship is best suited for Employee and Person?
association
composition
inheritance
None of the above
Which of the following statements can be used to check, whether an object “obj” is an instance of class A or not?
obj.isinstance(A)
A.isinstance(obj)
isinstance(obj, A)
isinstance(A, obj)
Which of the following represents a template, blueprint, or contract that defines objects of the same type?
A class
An object
A method
A data field
Which of the following keywords mark the beginning of the class definition?
def
return
class
All of the above
NumPy is takes a longer execution time than a Python List
True
False
How many dimensions can a NumPy array have?
1
2
8
None of the Above
What is the function to check whether two arrays are equal?
concatenate
compare
equal
none of the above
What is the code to create a 3-dimensional array with random values?
import numpy as np np.random.random((3,3))
import numpy as np np.random.random(3,3)
import numpy as np np.rand.random((3,3))
import numpy as np np.rand.rand((3,3))
In pandas, Index values must be?
unique
hashable
Both A and B
None of the above
Which function from the options given below can read the dataset from a large text file?
read_json
read_pickle
read_hdf
read_csv
Which of the following is correct Features of DataFrame?
Potentially columns are of different types
Can Perform Arithmetic operations on rows and columns
Labeled axes (rows and columns)
All of the above
Which of the following is true?
If data is an ndarray, index must be the same length as data.
Series is a one-dimensional labeled array capable of holding any data type.
Both A and B
None of the above
Pandas key data structure is called?
Keyframe
DataFrame
Statistics
Econometrics
An image could be converted into a NumPy array.
True
False
How can you create your own color palette if you have the color codes stored in mypalette
sns.plot(sns.color_palette(mypalette))
sns.palplot(sns.palette(mypalette))
sns.palplot(sns.color(mypalette))
sns.palplot(sns.color_palette(mypalette))
Seaborn is built on top of matplotlib with default built-in themes
True
False
Which function should be used to display a plotted graph?
.display()
.print()
.show()
none of the above
If you want to show a distribution of data, which plot would choose from the following
Bar plot
Scatter plot
Pie chart
Area plot
Time is Up!