wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Season 2 #Spaic Python Weekly Quiz

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

Which pandas function can be used to create a data frame from a large text file?

a)

read_json

b)

read_pickle

c)

read_hdf

d)

read_csv

2.

Which among the following options can be used to create a DataFrame in Pandas?

a)

A Scalar value

b)

An ndarray

c)

A Python dict

d)

All of the above

3.

A series is a one-dimensional array which is labelled and can hold any data type.

a)

True

b)

False

4.

Data structures in Pandas can be mutated in the terms of ____ but not of _____.

a)

size, value

b)

value, size

c)

semantic,size

d)

None of the above

5.

Which of the following is prominent python “statistics and econometrics library”?

a)

Bokeh

b)

Seaborn

c)

Statsmodels

d)

None of the mentioned

6.

The ________ project builds on top of pandas and matplotlib to provide easy plotting of

a)

yhat

b)

Seaborn

c)

Vincent

d)

None of the mentioned

7.

Which of the following is used for testing for membership in the list of column names?

a)

in

b)

out

c)

elseif

d)

none of the mentioned

8.

Can the shape attribute of a NumPy array be used to change its shape?

a)

Yes

b)

No

9.

What will be the following code's output?

a)

1

b)

2

c)

5

d)

4

10.

What will be the following code's output?

a)

[[ 4 5]

[ 7 8]

[10 11]]

b)

error

c)

[[ 4 ]

[ 7 ]

[ 10 ]]

d)

[[ 4 5]

[ 7 8]]

11.

Minimum number of arguments to pass in full() function in Numpy array ?

a)

0

b)

1

c)

2

d)

3

12.

Which of these is an invalid writer function in Pandas?

a)

to_clipboard

b)

to_text

c)

to_stata

d)

to_msgpack

13.

What happens to the indexes when any operations are done to unaligned series?

a)

Total

b)

Union

c)

Intersection

d)

All of the above

14.

What relationship is best suited for employee and Person?

a)

Association

b)

Composition

c)

Inheritance

d)

None of the above

15.

What relationship is best suited for course and faculty?

a)

Association

b)

Composition

c)

Inheritance

d)

None of the above

16.

Polymorphism is when a subclass can modify the behavior of its superclass?

a)

False

b)

True

c)

Depends on the content of the class

d)

Invalid Question

17.

Which of the following statement can be used to check whether an object "obj" is an instanvce of class A or not?

a)

obj.instance(A)

b)

A.isinstance(obj)

c)

isinstace(obj , A)

d)

isinstance(A, obj)

18.

In python , what is method inside class?

a)

attribute

b)

object

c)

argument

d)

function

19.

Which of the following is correct ?

a)

5

b)

6

c)

0

d)

Error

20.

Which of the following can be used to invoke the __init__ method in B from A , Where A is a subclass of B?

a)

super().__init__()

b)

super().__init__(self)

c)

B.__init__()

d)

B.__init(self)