wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

2021 Sample Paper 5 (TERM1)

Total questions: 55

Worksheet time: 55mins

Name
Class
Date
1.

A two-dimensional labelled data structure that is an ordered collection of columns to

store heterogeneous data is called

a)

Series

b)

Numpy Array

c)

DataFrame

d)

Panel

2.

To check whether a series is empty or not, the attribute used is

a)

empty

b)

blank

c)

isnull

d)

isblank

3.

To delete a dataframe column using drop() method , the minimum number of parameters required is

a)

1

b)

2

c)

3

d)

4

4.

The pop() method can be used for :

a)

Series

b)

DataFrame

c)

Both Series and DataFrame

d)

None of the above

5.

The axis parameter of the drop method while using it for dropping a column of a dataframe is :

a)

Compulsory

b)

Optional

c)

Compulsory only for deleting 1st column

d)

Compulsory only for deleting last column.

6.

A series S1 is created as :

import pandas as p

s1=p.Series([1,2,3,4])

print(s1.hasnans)

will show :

a)

True

b)

False

c)

1

d)

None

7.

Piya wanted to change the value of index 3 of a series s1 to 100, the statement will be :

a)

s1.3=100

b)

s1(3)=100

c)

s1[3]=100

d)

None

8.

Rajan wanted to see all the values of a series school , which command(s) will do it :

a)

school[0:]

b)

school[:]

c)

school.all

d)

Both school[0:] and school[:]

9.

The statement to create a series :

s1=pd.Series([1,2,3,4],index=[-4,-3,-2,-1]) is :

a)

Is perfectly correct.

b)

Negative indexes cannot be given for integer values.

c)

Negative indexes can be given only for String values.

d)

Negative indexes can be specified by a tuple only.

10.
a)

MathematicsMathematics

b)

Mathematics Mathematics

ComputerScienceComputerScience

c)

ComputerScienceComputerScience

d)

ComputerScienceComputerScience

ComputerScienceComputerScience

11.

dfrange=pd.DataFrame({‘Roll’:range(1,10,2),‘Marks’:range(1,10,2)})

The statement : print(df.size) will return :

a)

8

b)

9

c)

10

d)

11

12.

A series “Pseries” is created with the values [1.6,numpy.NaN,8.9,10.5]

The output of the statement :

Pseries.hasnans

a)

True

b)

False

c)

Nan

d)

Null

13.

A dataframe “frm” exists . The statement frm+2 will:

a)

Update the dataframe permanently

b)

Will add 2 to each value of the first column and display only

c)

Will add 2 to each value of the dataframe and display , but no updation in the dataframe.

d)

None of the above

14.
a)

Faculty.index

b)

Faculty.size

c)

Faculty.length

d)

Faculty.values

15.

Read the statements given below and identify the right option about Boolean indexing.

Statement A - In boolean indexing, boolean vectors can be used to reshape the data.

Statement B - DataFrame using Boolean indexes as True and False.

a)

Statement A is correct.

b)

Statement B is correct.

c)

Statement A is correct but statement B is incorrect

d)

Statement A is incorrect but statement B is correct

16.

matplotlib allows you to create

a)

Maps

b)

Chart

c)

Table

d)

Infographics

17.

A bar chart can have

a)

same color in all bars

b)

different colors in different bars

c)

only white color

d)

bar chart cannot be created using matplotlib

18.

pyplot belongs to :

a)

matplotlib library

b)

Pandas library

c)

Numpy library

d)

None of these

19.

The “figure” parameter of plot function is used to

a)

change line color

b)

change line style

c)

change line thickness

d)

the parameter does not exist

20.

The color code ‘k’ represents ………… color.

a)

Blue

b)

Green

c)

Black

d)

Red

21.

A figure/chart contains ………… .

a)

Plotting Area

b)

Legend

c)

Axis Labels

d)

All of the above

22.

Value / Tick marks on y-axis line are called

a)

ylabel

b)

yvalues

c)

yticks

d)

ynums

23.

A statement to display “Student Names” as x-axis title is :

a)

plt.xtitle=“Student Names”

b)

xlabel=“Student Names”

c)

plt.xlabel(“Student Names”)

d)

None of the above

24.

The ………… attribute of bar chart specifies the width of the bars.

a)

size

b)

width

c)

thickness

d)

None of these

25.

The parameter that changes the marker style in a line chart is

a)

style

b)

marker

c)

mark

d)

object

26.

Riya wanted to change the width of the line in her line chart , the property that she should use

a)

linewidth

b)

width

c)

changewidth

d)

None of these

27.

Which parameter changes the line style of a line chart?

a)

linestyle

b)

style

c)

type

d)

linetype

28.

Statement A - Matplotlib plots can be saved file using matpolt().

Statement B - File name for saving a graph can be a full path, that also include a

particular file extension if desired.

a)

Statement A is correct.

b)

Statement B is correct

c)

Statement A is correct but Statement B is incorrect.

d)

Statement A is incorrect but Statement B is correct.

29.

Any information created by us that exists in digital form is called

a)

Digital footprint

b)

Cyber print

c)

Internet print

d)

Web finger print

30.

A fraudulent process that extracts money from an ignorant person is called

a)

Spamming

b)

Phishing

c)

Bullying

d)

None of these

31.

The term Intellectual property rights cover

a)

Trademark

b)

Copyright

c)

Patents

d)

All of these

32.

Using someone’s Twitter handle to post something will be termed as

a)

Fraud

b)

Identity theft

c)

Online stealing

d)

Phishing

33.

In FOSS, source code is hidden from

a)

All users

b)

Purchaser

c)

Only the vendor

d)

In FOSS source code is not hidden.

34.

Which of the following are medium of cyber trolling?

a)

Facebook

b)

Twitter

c)

You tube video comments

d)

All of these

35.

Mr. Raghavendra found that after posting some images in social media , some people were writing negative messages. This is an instance of

a)

Phishing

b)

Trolling

c)

Hacking

d)

Spamming

36.

Which of the following are health disorders caused by overuse of technology?

a)

DNA damage

b)

Lung cancer

c)

Damage to heart liver and spleen

d)

All of the above

37.

Which of the following are not ways of data protection?

a)

Using password

b)

Using User IDs

c)

Using encryption techniques

d)

None of these

38.

Anil never writes a subject line in his mails . This is an instance of :

a)

Spamming

b)

Phishing

c)

Non obeying of E-mail etiquettes

d)

Trolling

39.

Sneha found that her picture posted in a social networking site has been merged with an unknown person and published. What should she do?

a)

Ignore the instance

b)

Report it to the cyber crime cell

c)

Try to delete the posts

d)

Enjoy the instance.

40.

Which among the following are good preventive measures against health hazards of technology use?

a)

Periodic walks between long usage of devices

b)

Using screen guards

c)

No overuse of technology

d)

All of the above

41.

Jack is a good programmer and wants to contribute to the features of one of the softwares , that he uses. What kind of software he can contribute to?

a)

Proprietary software

b)

Free software

c)

Open source software

d)

Shareware

42.

Which among the following is not a possible activity of a virus?

a)

Deleting data files

b)

Sending bulk mails

c)

Deleting system files

d)

None of these

43.

Statement A - Cyber crime involves the use of computer and network in attacking

computers and networks as well.

Statement B - Cyber bullying is an act of cyber law.

a)

Statement A is correct.

b)

Statement B is correct.

c)

Statement A is correct but Statement B is incorrect.

d)

Statement B is correct but Statement A is incorrect.

44.

Choose the right code from the following for Statement 1.

a)

pd

b)

df

c)

data

d)

p

45.

Choose the right code from the following for the Statement 2.

a)

Dataframe

b)

DataFrame

c)

Series

d)

Dictionary

46.

Choose the correct statement/method for the required output:

(5,3)

a)

df.index

b)

df.shape()

c)

df.shape

d)

df.size

47.

He wants to print the details of ‘‘January’’ month along with the number of passengers, identify

the correct statement.

Month Passengers

0 Jan 25

2 Jan 35

a)

df.loc[[‘Month’,‘Passengers’]][df[‘Month’]==‘Jan’]

b)

df[[‘Month’,‘Passengers’]][df[‘Month’]==‘Jan’]

c)

df.iloc[[‘Month’,‘Passengers’]][df[‘Month’]==‘Jan’]

d)

df([‘Month’,‘Passengers’])[df[‘Month’]==‘Jan’]

48.

Identify the correct statement to change the index.

a)

df.index[]=[“Air India”,“Indigo,“Spicejet”,“Jet”,“Emirates”]

b)

df.index[“Air India”,“Indigo”,“Spicejet”,“Jet”,“Emirates”]

c)

df.index=[“Air India”,“Indigo”,“Spicejet”,“Jet”,“Emirates”]

d)

df.index()=[“Air India”,“Indigo”,“Spicejet”,“Jet”,“Emirates”]

49.

Choose the right code from the following for Statement 1.

a)

matplotlib as plt

b)

pyplot as plt

c)

matplotlib.pyplot as plt

d)

matplotlib.plt as pyplot

50.

Identify the name of the function that should be used in Statement 2 to plot the above graph.

a)

line()

b)

bar()

c)

hist()

d)

barh()

51.

Choose the correct option for the Statement 3.

a)

title(“Rating’’)

b)

ytitle(‘‘Rating’’)

c)

ylabel(‘‘Rating’’)

d)

yaxis(‘‘Rating’’)

52.

Choose the right function/method from the following for the Statement 4.

a)

display()

b)

print()

c)

bar()

d)

show()

53.

In case Mr. Sharma wants to change the above plot to the any other shape, which statement should he change?

a)

Statement1

b)

Statement2

c)

Statement3

d)

Statement4

54.

What does inplace=True parameter represents ?

a)

to update changes in a new copy

b)

to update changes in original copy

c)

will not effect the original copy

d)

none of the above

55.

What parameter is used to change the color of marker in a line chart ?

a)

markercolor

b)

color

c)

markerfacecolor

d)

marker color can't be changed