You are on page 1of 30

Ch1.

Python Pandas Series


1. Which of the following are modules/libraries in Python?
a. NumPy
b. Pandas
c. Matplotlib
d. All of the above

2. NumPy stands for ____


a. Number Python
b. Numerical Python
c. Numbers in Python
d. None of the above

3. Which of the following libraries allows to manipulate, transform and visualize data
easily and efficiently.
a. Pandas
b. NumPy
c. Matplotlib
d. All of the above

4. PANDAS stands for _____________


a. Panel Data Analysis
b. Panel Data analyst
c. Panel Data
d. Panel Dashboard

5. __________ is an important library used for analyzing data.


a. Math
b. Random
c. Pandas
d. None of the above

6. Important data structure of pandas is/are ___________


a. Series
b. Data Frame
c. Both of the above
d. None of the above

7. Which of the following library in Python is used for plotting graphs and visualization.
a. Pandas
b. NumPy
c. Matplotlib
d. None of the above

8. Pandas Series can have _________________ data types


a. float
b. integer
c. String
d. All of the above
9. _________ is used when data is in Tabular Format.
a. NumPy
b. Pandas
c. Matplotlib
d. All of the above

10. Which of the following command is used to install pandas?


a. pip install pandas
b. install pandas
c. pip pandas
d. None of the above

11. A __________ is a collection of data values and operations that can be applied to that
data.
a. Data Structure
b. Data Frame
c. Table
d. None of the above

12. A _______________ is a one-dimensional array.


a. Data Frame
b. Series
c. Both of the above
d. None of the above

13. Which of the following statement is wrong?


a. We can create Series from Dictionary in Python.
b. Keys of dictionary become index of the series.
c. Order of indexes created from Keys may not be in the same order as typed in
dictionary.
d. All are correct

14. A Series by default have numeric data labels starting from ______________.
a. 3
b. 2
c. 1
d. 0

15. The data label associated with a particular value of Series is called
its ______________
a. Data value
b. Index
c. Value
d. None of the above
16. Which of the following module is to be imported to create Series?
a. NumPy
b. Pandas
c. Matplotlib
d. None of the above
17. Which of the following function/method help to create Series?
a. series( )
b. Series( )
c. createSeries( )
d. None of the above

18. Write the output of the following :


import pandas as pd
series1 = pd.Series([10,20,30])
print(series1)
a.
Output:
0 10
1 20
2 30
dtype: int64
b.
Output:
10
20
30
dtype: int64
c.
Output:
0
1
2
dtype: int64
d. None of the above

19. When you print/display any series then the left most column is showing
_________ value.
a. Index
b. Data
c. Value
d. None of the above

20. How many values will be there in array1, if given code is not returning any error?
>>> series4 = pd.Series(array1, index = [“Jan”, “Feb”, “Mar”, “Apr”])
a. 1
b. 2
c. 3
d. 4

21. Which of the following statement will create an empty series named “S1”?
a. S1 = pd.Series(None)
b. S1 = pd.Series( )
c. Both of the above
d. None of the above
22. How many elements will be there in the series named “S1”?
>>> S1 = pd.Series(range(5))

>>> print(S1)
a. 5
b. 4
c. 6
d. None of the above

23. When we create a series from dictionary then the keys of dictionary
become ________________
a. Index of the series
b. Value of the series
c. Caption of the series
d. None of the series

24. Write the output of the following :


>>> S1=pd.Series(14, index = ['a', 'b', 'c'])
>>> print(S1)
a.
a 14
b 14
c 14
dtype: int64
b.
a 14
dtype: int64
c. Error
d. None of the above

25. Write the output of the following:


>>> S1=pd.Series(14, 7, index = ['a', 'b', 'c'])
>>> print(S1)
a.
a 14
b7
c7
dtype: int64
b.
a 14
b7
dtype: int64
c. Error
d. None of the above

26. Write the output of the following :


>>> S1=pd.Series([14, 7, 9] ,index = range(1, 8, 3))
>>> print(S1)
a.
14 1
7 4
9 7
dtype: int64
b.
1 14
47
79
dtype: int64
c. Error
d. None of the above

27. Which of the following code will generate the following output?
Jan 31
Feb 28
Mar 31
dtype: int64
a.
import pandas as pd
S1 = pd.Series(data = [31,28,31], index=["Jan","Feb","Mar"])
print(S1)
b.
import pandas as pd
S1 = pd.Series([31,28,31], index=["Jan","Feb","Mar"])
print(S1)
c. Both of the above
d. None of the above

28. Write the output of the following:


import pandas as pd
S1 = pd.Series(data = range(31, 2, -6), index = [x for x in "aeiou" ])
print(S1)
a.
a 31
e 25
i 19
o 13
u7
dtype: int64
b.
a 31
e 25
i 19
o 13
dtype: int64
c. Error
d. None of the above

29. What type of error is returned by following code?


import pandas as pd
S1 = pd.Series(data = (31, 2, -6), index = [7, 9, 3, 2])
print(S1)
a. SyntaxError
b. IndexError
c. ValueError
d. None of the above

30. Write the output of the following :


import pandas as pd
S1 = pd.Series(data = 2*(31, 2, -6))
print(S1)
a.
0 31
12
2 -6
dtype: int64
b.
0 31
12
2 -6
3 31
42
dtype: int64
c.
0 31
12
2 -6
3 31
dtype: int64
d.
0 31
12
2 -6
3 31
42
5 -6
dtype: int64

31. We can imagine a Pandas Series as a ______________ in a spreadsheet


a. Column
b. Cell
c. Table
d. None of the above

32. We can assign user-defined labels to the index of the series?(T/F)


a. True
b. False

33. Write the output of the following :


import pandas as pd
series2 = pd.Series([“Kavi”,”Shyam”,”Ravi”], index=[3,5,1])
print(series2 > “S”)
a.
3 False
5 False
1 False
dtype: bool
b.
3 False
5 True
1 False
dtype: bool
c.
3 True
5 True
1 True
dtype: bool
d. None of the above

34. Which of the following statement is correct for importing pandas in python?
a. import pandas
b. import pandas as pd
c. import pandas as pds
d. All of the above

35. What type of error is returned by following statement?


import pandas as pnd
pnd.Series([1,2,3,4], index = [‘a’,’b’,’c’])
a. SyntaxError
b. IndexError
c. ValueError
d. None of the above

36. Which attribute is used to give user defined labels in Series?


a. index
b. data
c. values
d. None of the above

37. Fill in the blank to get the ouput as 3


import pandas as pnd
S1=pnd.Series([1,2,3,4], index = ['a','b','c','d'])
print(S1[___________])
a. ‘c’
b. 2
c. c
d. All of the above

38. Write the statement to get NewDelhi as output using positional index.
import pandas as pd
S1 = pd.Series(['NewDelhi', 'WashingtonDC', 'London', 'Paris'],
index=['India', 'USA', 'UK', 'France'])
a. print(S1[0])
b. print(S1[‘India’])
c. Both of the above
d. print(S1.India)

39. We can access elements in Series by using ________ index and ____________index.
a. Numeric, labelled
b. Positional, Naming
c. Positional, labelled
d. None of the above

40. Write the output of the following :


import pandas as pd
S1 = pd.Series(['NewDelhi', 'WashingtonDC', 'London', 'Paris'],
index=['India', 'USA', 'UK', 'France'])
print(S1['India', 'UK'])
a.
India NewDelhi
UK London
dtype: object
b.
India NewDelhi
UK Washington
dtype: object
c. Error
d. None of the above

41. Which of the following statement will print Series ‘S1’ in reverse order?
a. print(S1[: : 1]
b. print(S1[: : -1]
c. print(S1[-1: : 1]
d. print(S1.reverse( ))

42. How many values will be modified by last statement of given code ?
import pandas as pd
S1 = pd.Series(['NewDelhi', 'WashingtonDC', 'London', 'Paris'],
index=['A', 'B', 'C', 'D'])
S1['A' : 'C'] = 'ND'
a. 1
b. 2
c. 3
d. 4

43. How many values will be modified by last statement of given code ?
import pandas as pd
S1 = pd.Series(['NewDelhi', 'WashingtonDC', 'London', 'Paris'],
index=['A', 'B', 'C', 'D'])
S1[1 : 3] = 'ND'
a. 1
b. 2
c. 3
d. 4

44. Which of the following property/attribute assign name to the Series?


a. name
b. index.name
c. size
d. Series.name

45. S1.values will return all the values of Series ‘S1’ in _________
a. Tuple
b. Dictionary
c. List
d. String

46. Which of the following property/attribute return total number of values in Series ‘S1’?
a. size
b. values
c. index
d. None of the above

47. Which of the following attributes returns True if there is no value in Series?
a. index
b. size
c. empty
d. values

48. Which of the following attributes returns all the values of Series?
a. size
b. index
c. name
d. values

49. Write the output of the following code:


import pandas as pd
S1=pd.Series()
print(pd.Series().empty)
a. True
b. False
c. Error
d. None of the above

50. Write the output of the following code :


import pandas as pd
S1=pd.Series([1,2,3,4])
S2=pd.Series([7,8])
S3=S1+S2
print(S3.size)
a. 2
b. 4
c. 6
d. Error

Ch2. Python Pandas Data Frames

1. In Pandas _______________ is used to store data in multiple columns.


a. Series
b. DataFrame
c. Both of the above
d. None of the above

2. A _______________ is a two-dimensional labelled data structure .


a. DataFrame
b. Series
c. List
d. None of the above
3. _____________ data Structure has both a row and column index.
a. List
b. Series
c. DataFrame
d. None of the above

4. Which library is to be imported for creating DataFrame?


a. Python
b. DataFrame
c. Pandas
d. Random

5. Which of the following function is used to create DataFrame?


a. DataFrame( )
b. NewFrame( )
c. CreateDataFrame( )
d. None of the Above

6. The following code create a dataframe named ‘D1’ with _______________ columns.
import pandas as pd
D1 = pd.DataFrame([1,2,3] )
1
2
3
4
7. We can create DataFrame from _____
a. Numpy arrays
b. List of Dictionaries
c. Dictionary of Lists
d. All of the above

8. Which of the following is used to give user defined column index in DataFrame?
a. index
b. column
c. columns
d. colindex

9. The following code create a dataframe named ‘D1’ with ___________ columns.
import pandas as pd
LoD = [{‘a’:10, ‘b’:20}, {‘a’:5, ‘b’:10, ‘c’:20}]
D1 = pd.DataFrame(LoD)

a. 1
b. 2
c. 3
d. 4

10. The following code create a dataframe named ‘D1’ with ______ rows.
import pandas as pd
LoD = [{'a':10, 'b':20}, {'a':5, 'b':10, 'c':20}]
D1 = pd.DataFrame(LoD)
a. 0
b. 1
c. 2
d. 3

11. When we create DataFrame from List of Dictionaries, then dictionary keys will
become ____________
a. Column labels
b. Row labels
c. Both of the above
d. None of the above

12. When we create DataFrame from List of Dictionaries, then number of columns in
DataFrame is equal to the _______
a. maximum number of keys in first dictionary of the list
b. maximum number of different keys in all dictionaries of the list
c. maximum number of dictionaries in the list
d. None of the above
13. When we create DataFrame from List of Dictionaries, then number of rows in
DataFrame is equal to the ____________
a. maximum number of keys in first dictionary of the list
b. maximum number of keys in any dictionary of the list
c. number of dictionaries in the list
d. None of the above

14. In given code dataframe ‘D1’ has ________ rows and _______ columns.
import pandas as pd
LoD = [{‘a’:10, ‘b’:20}, {‘a’:5, ‘b’:10, ‘c’:20},{‘a’:7, ‘d’:10, ‘e’:20}]
D1 = pd.DataFrame(LoD)

a. 3, 3
b. 3, 4
c. 3, 5
d. None of the above

15. When we create DataFrame from Dictionary of List then Keys becomes the
_____________
a. Row Labels
b. Column Labels
c. Both of the above
d. None of the above

16. When we create DataFrame from Dictionary of List then List becomes the
________________
a. Row Labels
b. Column Labels
c. Values of rows
d. None of the above

17. In given code dataframe ‘D1’ has _____ rows and ______ columns.
import pandas as pd
LoD = {“Name” : [“Amit”, “Anil”,”Ravi”], “RollNo” : [1,2,3]}
D1 = pd.DataFrame(LoD)

a. 3, 3
b. 3, 2
c. 2, 3
d. None of the above

18. DataFrame created from single Series has ____ column.


a. 1
b. 2
c. n (Where n is the number of elements in the Series)
d. None of the above
19. In given code dataframe ‘D1’ has _____ rows and _____ columns.
import pandas as pd
S1 = pd.Series([1, 2, 3, 4], index = ['a', 'b','c','d'])
S2 = pd.Series([11, 22, 33, 44], index = ['a', 'bb','c','dd'])
D1 = pd.DataFrame([S1,S2])
a. 2, 4
b. 4, 6
c. 4, 4
d. 2, 6

20. In DataFrame, by default new column added as the _____________ column


a. First (Left Side)
b. Second
c. Last (Right Side)
d. Random

21. We can add a new row to a DataFrame using the _____________ method
a. rloc[ ]
b. iloc[ ]
c. loc[ ]
d. None of the above

22. D1[ : ] = 77 , will set __________ values of a Data Frame ‘D1’ to 77.
a. Only First Row
b. Only First Column
c. All
d. None of the above

23. In the following statement, if column ‘Rollno’ already exists in the DataFrame ‘D1’
then the assignment statement will _____________
D1['Rollno'] = [1,2,3] #There are only three rows in DataFrame D1'
a. Return error
b. Replace the already existing values.
c. Add new column
d. None of the above

24. In the following statement, if column ‘Rollno’ already exists in the DataFrame ‘D1’
then the assignment statement will __________
D1['Rollno'] = [1, 2] #There are only three rows in DataFrame D1'
a. Return error
b. Replace the already existing values.
c. Add new column
d. None of the above
25. Q26. In the following statement, if column ‘Rollno’ already exists in the DataFrame
‘D1’ then the assignment statement will __________
D1['Rollno'] = 11
a. Return error
b. Change all values of column Roll numbers to 11
c. Add new column
d. None of the above

26. DF1.loc[ ] method is used to ______ # DF1 is a DataFrame


a. Add new row in a DataFrame ‘DF1’
b. To change the data values of a row to a particular value
c. Both of the above
d. None of the above

27. Which method is used to delete row or column in DataFrame?


a. delete( )
b. del( )
c. drop( )
d. None of the above

28. To delete a row, the parameter axis of function drop( ) is assigned the value
______________
a. 0
b. 1
c. 2
d. 3

29. To delete a column, the parameter axis of function drop( ) is assigned the value
_____________
a. 0
b. 1
c. 2
d. 3

30. The following statement will _________


df = df.drop(['Name', 'Class', 'Rollno'], axis = 1) #df is a DataFrame object
a. delete three columns having labels ‘Name’, ‘Class’ and ‘Rollno’
b. delete three rows having labels ‘Name’, ‘Class’ and ‘Rollno’
c. delete any three columns
d. return error

31. If the DataFrame has more than one row with the same label, then DataFrame.drop( )
method will delete _____
a. first matching row from it.
b. all the matching rows from it
c. last matching row from it.
d. Return Error
32. Write the code to remove duplicate row labelled as ‘R1’ from DataFrame ‘DF1’
a. DF1 = DF1.drop(‘R1’, axis = 0)
b. DF1 = DF1.drop(‘R1’, axis = 1)
c. DF1 = DF1.del(‘R1’, axis = 0)
d. DF1 = DF1.del(‘R1’, axis = 1)

33. Which method is used to change the labels of rows and columns in DataFrame?
a. change( )
b. rename( )
c. replace( )
d. None of the above
34. The parameter axis=’index’ of rename( ) function is used to specify that the ________
a. row and column label is to be changed
b. column label is to be changed
c. row label is to be changed
d. None of the above

35. What will happen if in the rename( ) function we pass only a value for a row label that
does not exist?
a. it returns an error.
b. matching row label will not change .
c. the existing row label will left as it is.
d. None of the above

36. What value should be given to axis parameter of rename function to alter column
name?
a. column
b. columns
c. index
d. None of the above
37. The following statement is __________
>>> DF=DF.rename({‘Maths’:’Sub1′,‘Science’:’Sub2′}, axis=’index’) #DF is a
DataFrame

a. altering the row labels


b. altering the column labels
c. altering the row and column labels (both)
d. Error

38. Write a statement to delete column labelled as ‘R1’ of DataFrame ‘DF’..


a. DF= DF.drop(‘R1’, axis=0)
b. DF= DF.del(‘R1’, axis=0)
c. DF= DF.drop(‘R1’, axis=0, row = ‘duplicate’)
d. None of the above

39. Which of the following parameter is used to specify row or column in rename
function of DataFrame?
a. rowindex
b. colindex
c. Both of the above
40. Which of the following are ways of indexing to access Data elements in a DataFrame?
a. Label based indexing
b. Boolean Indexing
c. All of the above
d. None of the above

41. DataFrame.loc[ ] is an important method that is used for ____________ with


DataFrames
a. Label based indexing
b. Boolean based indexing
c. Both of the above
d. None of the above
42. The following statement will return the column as a _______
>>> DF.loc[: , 'Name'] #DF is a DataFrame object
a. DataFrame
b. Series
c. List
d. Tuple

43. The following two statement will return _______________


>>> DF.loc[:,'Name'] #DF is a DataFrame object
>>> DF['Name'] #DF is a DataFrame object
a. Same Output
b. Name column of DataFrame DF
c. Both of the above
d. Different Output
44. The following statement will display ________ rows of DataFrame ‘DF’
print(df.loc[[True, False,True]])

a. 1
b. 2
c. 3
d. 4

45. We can use the ______ method to merge two DataFrames


a. merge( )
b. join( )
c. append( )
d. drop( )

46. What we are doing in the following statement?


dF1=dF1.append(dF2) #dF1 and dF2 are DataFrame object
a. We are appending dF1 in dF2
b. We are appending dF2 in dF1
c. We are creating Series from DataFrame
d. None of the above

47. ______________ parameter is used in append( ) function of DataFrame to get the


column labels in sorted order.
a. sorted
b. sorter
c. sort
d. None of the above

48. ________ parameter of append( ) method may be set to True when we want to raise
an error if the row labels are duplicate.
a. verify_integrity

b. verifyintegrity
c. verify.integrity
d. None of the above

49. The ________________parameter of append() method in DataFrame may be set to


True, when we do not want to use row index labels.
a. ignore_index_val
b. ignore_index_value
c. ignore_index
d. None of the above

50. The append() method of DataFrame can also be used to append ____________to a
DataFrame
a. Series
b. Dictionary
c. Both of the above
d. None of the above

Ch3:Data Visualization
1. __________________ means graphical or pictorial representation of the data using
graph, chart, etc.
a. Data visualization
b. Visual Data
c. Matplot
d. None of the above

2. Which of the following library to be imported for creating chart in python?


a. Matplotlib
b. Pandas
c. Math
d. Random
3. Which module of matplotlib library is required for plotting of graph?
a. plot
b. matplot
c. pyplot
d. None of the above

4. Which of the following command is correct to install matplotlib?


a. pip install matplot
b. pipe install matplotlib
c. pip install matplotlib
d. None of the above

5. _____________ function of the pyplot module is used to create a figure/chart/plot.


a. show( )
b. ploting( )
c. plot( )
d. plots( )

6. A figure/chart contains ______


a. Plotting area
b. Legend
c. Axis labels
d. All of the above

7. ______________ function is used to display figure/chart.


a. showing( )
b. show( )
c. display( )
d. screen( )

8. To plot x versus y, we can write ________________ #plt is an alias for


matplotlib.pyplot
a. plt.plot(y, x)
b. plt.plot(x)
c. plt.plot(x,y)
d. None of the above

9. Values which are displayed on x-axis is called ___________


a. y ticks
b. x ticks
c. xy ticks
d. None of the above

10. Values which are displayed on y-axis is called ________________


a. y ticks
b. x ticks
c. xy ticks
d. None of the above
11. plot(a, b) is provided with two parameters, which indicates values
for _______________
a. x-axis and y-axis, respectively
b. y-axis and x-axis, respectively
c. x-axis only
d. None of the above

12. By default plot() function plots a ________________


a. Histogram
b. Bar graph
c. Line chart
d. Pie chart

13. Which of the following function is used to save the figure/chart?


a. save( )
b. savefigure( )
c. savefig( )
d. None of the above

14. Name of the figure is passed to the ________________ function as parameter.


a. plot( )
b. show( )
c. savefig( )
d. None of the above

15. Which of the following pyplot function is used to plot histogram.


a. histogram( )
b. histo( )
c. histochart( )
d. hist( )

16. Which of the following pyplot function is used to plot pie chart.
a. pie( )
b. piechart( )
c. circle( )
d. oval( )

17. Which of the following pyplot function is used to plot bar graph.
a. bargraph( )
b. bar( )
c. barchart( )
d. oval( )

18. Which of the following pyplot function is used to set the label for the x-axis.
a. xlabeled( )
b. xlabel( )
c. x_axis_label( )
d. None of the above

19. Which of the following pyplot function is used to set the values on the x-axis.
a. xticks( )
b. xlabel( )
c. xvalues( )
d. None of the above

20. Which of the following pyplot function is used to set a title for the chart.
a. Title( )
b. c_title( )
c. title( )
d. None of the above

21. To show the grid lines in plot, we can write _______________ #plt is an alias of
matplotlib.pyplot
a. plt.grid( )
b. plt.grid(True)
c. Both of the above
d. None of the above

22. ___________ is any symbol that represents a data value in a line chart.
a. marker
b. mark
c. marks
d. None of the above

23. ‘marker’ is an attribute of ____________ function.


a. show( )
b. plot( )
c. display( )
d. None of the above

24. Write a statement to display “Amount” as x-axis label. (consider plt as an alias name
of matplotlib.pyplot)
a. plt.label(“Amount”)
b. plt.xlabel(“Amount”)
c. plt.xlabel(Amount)
d. None of the above

25. Write a statement to “use * as marker” . (consider plt as an alias name of


matplotlib.pyplot)
a. plt.plot(h, w, marker = “*”) #h and w are data representing x axis and y axis
b. plt.plot(h, w, mark = “*”) #h and w are data representing x axis and y axis
c. plt.marker(“*”)
d. None of the above

26. Series and DataFrame have their own __________ function.


a. show( )
b. plot( )
c. both of the above
d. none of the above
27. If we have a Series type object (let’s say ‘s1’ ) we can call the plot method by
writing _____________
a. s1.plot( )
b. plot(s1)
c. s1.plot(s1)
d. None of the above

28. Which attribute of plot( ) function help to specify the type of chart?
a. type
b. kind
c. kinds
d. types

29. Statement to plot a line chart for data stored in a DataFrame ‘df’ is _____
a. df.plot(line)
b. plot(df, line)
c. df.plot(kind = “line”)
d. None of the above

30. Attribute/parameter to set marker size is _____


a. marker size
b. sizeofmarker
c. markersize
d. None of the above

31. A _____________ plot is a graph that shows the frequency of data along a number
line.
a. line
b. box
c. histogram
d. bargraph

32. Which attribute of plot( ) function is used to set the width of line in line plot?
a. widthline
b. linewidth
c. widthofline
d. none of the above

33. Which attribute of plot( ) function is used to set the style of line in line plot?
a. linestyle
b. styleline
c. styleofline
d. none of the above

34. Which attribute of plot( ) function is used to set the edge color of bar in bar chart?
a. bordercolor
b. colorofedge
c. edgecolor
d. none of the above
35. Which attribute of plot( ) function is used to set the different color of bars in bar
chart?
a. color
b. barcolor
c. colorbar
d. none of the above

36. ____________ are column-charts, where each column represents a range of values,
and the height of a column corresponds to how many values are in that range.
a. Bar graph
b. Histograms
c. Line chart
d. pie chart

37. Which parameter of plot( ) function help to set the values of bins in Histogram?
a. bin
b. bins
c. binvalue
d. none of the above

38. Which attribute is used to change the border color of each hist in histogram?
a. border color
b. colorofborder
c. edgecolor
d. none of the above

39. Which attribute is used to fill each hist with pattern in histogram?
a. pattern
b. fill
c. hatch
d. color

40. What is the default value of fill property in plot( ) function of creating histogram?
a. True
b. False
c. Green
d. Black

41. Fill in the blank in the given code, if we want to plot a line chart for values of list ‘a’
vs values of list ‘b’.
a = [1, 2, 3, 4, 5]
b = [10, 20, 30, 40, 50]
import matplotlib.pyplot as plt
plt.plot __________
a. (a, b)
b. (b, a)
c. [a, b]
d. None of the above
42. Which of the following is used to design 2D charts/graphs/figures?
a. matplotlib.pythonplot
b. matplotlib.pyplot
c. matplot.pyplot
d. none of the above

43. The following code will create __________ .


import matplotlib.pyplot as pl
a = [1,2,3,4,5]
b = [10, 20, 30, 40, 50]
c = [5, 10, 15, 20, 25]
pl.plot(a,b)
pl.plot(a,c)
pl.show()
a. line chart
b. bargraph
c. histogram
d. None of the above

44. The following code will show ___________ lines in the figure/chart.
import matplotlib.pyplot as pl
a = [1,2,3,4,5]
b = [10, 20, 30, 40, 50]
c = [5, 10, 15, 20, 25]
pl.plot(a,b)
pl.plot(a,c)
pl.show()
a. 1
b. 2
c. 3
d. 4

45. The following statement will create line plot of __________ color.
pl.plot(a, b, ‘g’) #a and b are list
a. black
b. yellow
c. green
d. magenta

46. Which of the following chart can not be created by using matplotlib.pyplot ?
a. Box
b. Stats
c. Pie
d. Line

47. Which of the following function is used to plot a line chart?


a. line( )
b. linechart( )
c. plot( )
d. plotter( )

48. Which function is used to display the legend in plot?


a. legend
b. Legend
c. legends
d. All of the above

49. Which of the following function will create bar chart?


a. bar( )
b. barh( )
c. Both of the above
d. None of the above

50. The following code will create _______


pl.plot(a) #a is a list and pl is an alias of matplotlib.pyplot
a. line chart with no values on x axis
b. line chart with no values on y axis
c. line chart with values on both the axis
d. None of the above

Chapter 4: Societal Impacts


1. _______________ are the records and traces that we left behind as we use Internet.
a. Digital Footprints
b. Data Protection
c. Plagiarism
d. Digital Data

2. Q2. Digital footprints are also known as _____________


a. Digital data
b. Plagiarism
c. Digital tattoos
d. Digital print

3. Digital footprints are stored _______


a. Temporarily (for few days)
b. Permanently
c. for 7 days only
d. for 3 days

4. Whenever we surf the Internet using smartphones we leave a trail of data reflecting the
activities performed by us online, which is our ___________
a. Digital footprint

b. Digital activities

c. Online handprint
d. Internet activities

5. There are _________ kinds of Digital footprints.


a. 1
b. 2
c. 3
d. 4
6. Which of the following is type of Digital Footprints?
a. Active digital footprints
b. Passive digital footprints
c. Both of the above
d. None of the above
7. The digital data trail we leave online unintentionally is called _____
a. Active digital footprints
b. Passive digital footprints
c. Current digital footprints
d. None of the above
8. The digital data trail we leave online intentionally is called _____
a. Active digital footprints
b. Passive digital footprints
c. Current digital footprints
d. None of the above

9. Which of the following activity is an example of leaving Active digital footprints?


a. Surfing internet
b. Visiting a website
c. Sending an email to friend
d. None of the above
10. Our digital footprint can be created by _______
a. visiting any website
b. sending email
c. posting online
d. All of the above
11. Our digital footprints are stored in local web browser in the form of ________
a. browsing history
b. cookies
c. passwords
d. All of the above
12. Our digital foot prints are stored in ________
a. Local web browser
b. Servers where the applications are hosted
c. Both of the above
d. None of the above
13. Digital footprints can be used to ________
a. Trace the user’s location
b. Trace the user’s digital activity
c. know the digital personality of user.
d. All of the above
14. Anyone who uses digital technology along with Internet is a ____
a. Digital citizen
b. Netizen
c. Both of the above
d. None of the above
15. In this era of digital society, we can do ______________
a. Online Shopping
b. Online Banking
c. Online Education
d. All of the above
16. Which of the following are Net Etiquette?
a. Be Ethical
b. Be Respectful
c. Be Responsible
d. All of the above

17. Being a responsible digital citizen, we should ______


a. not use copyrighted materials
b. avoid cyber bullying
c. respect privacy of others
d. All of the above
18. Online posting of rumours, giving threats online, posting the victim’s personal
information, comments aimed to publicly ridicule a victim is termed as __________
a. Cyber bullying
b. Cyber crime
c. Cyber insult
d. All of the above
19. _______ is a person who deliberately sows discord on the Internet by starting quarrels or
upsetting people, by posting inflammatory or off topic messages in an online community.
a. Netizen
b. Digital Citizen
c. Internet troll
d. None of the above
20. Digital communication includes ________
a. Email
b. Texting
c. Instant messaging
d. All of the above
21. Communication etiquette include to _____
a. be polite with others
b. be credible
c. be precise
d. All of the above
22. Which of the following is example of Social media?
a. Facebook
b. Twitter
c. Instagram
d. All of the above
23. Which of the following is not an example of Social media platform?
a. Facebook
b. Pinterest
c. Google+
d. Social channel

24. ________ are websites or applications that enable users to participate by creating and
sharing content with others in the community.
a. Social media
b. Social channel
c. Social networking
d. None of the above
25. A responsible netizen must abide by ____________
a. net etiquettes
b. communication etiquettes
c. social media etiquettes
d. All of the above
26. In social media platform, we can share _____________
a. images
b. text
c. videos
d. All of the above

27. To be a responsible netizen, we should ___________


a. Choose password wisely
b. think before upload anything online.
c. change our password frequently.
d. All of the above

28. Data that can cause substantial harm, embarrassment, inconvenience and unfairness to an
individual, if breached or compromised, is called _______________
a. Sensitive data
b. Important data
c. security data
d. None of the above
29. Example of sensitive data is ___________
a. Name of a person
b. Credit card detail of a person
c. Date of birth of a person
d. None of the above

30. IPR stands for ______________


a. Indian Property Right
b. Intellectual Property Right
c. Intelligent Property Right
d. Intellectual Property Resource

31. Code of the software will be protected by _____________


a. copyright
b. patent
c. registered trademark
d. None of the above
32. Functional expression of the idea/invention will be protected by ________
a. copyright
b. patent
c. registered trademark
d. None of the above
33. The name and logo of the software will be protected by ___________
a. copyright
b. patent
c. registered trademark
d. None of the above

34. Intellectual Property is legally protected through ____


a. copyright
b. patent
c. registered trademark
d. All of the above

35. The ____________ include right to copy (reproduce) a work, right to distribute copies of
the work to the public, and right to publicly display or perform the work.
a. Copyright
b. Patent
c. Createright
d. None of the above
36. A ______________ provide an exclusive right to prevent others from using, selling, or
distributing the protected invention
a. copyright
b. trademark
c. patent
d. All of the above
37. A patent protects an invention for ___________ years, after which it can be freely used.
a. 10
b. 20
c. 30
d. 40
38. _____________ includes any visual symbol, word, name, design, slogan, label, etc., that
distinguishes the brand from other brands.
a. Trademark
b. Patent
c. Copyright
d. None of the above
39. EULA stands for _____________
a. End User Leave Agreement
b. End User License Aim
c. End User License Agreement
d. None of the above
40. _________________covers all clauses of software purchase, viz., how many copies can
be installed, whether source is available, whether it can be modified and redistributed and
so on.
a. EULA
b. EULE
c. AULA
d. AULI

41. ___________ means using other’s work and not giving adequate citation for use.
a. Plagiarism
b. Licensing
c. Copyright
d. None of the above

42. A ____________ is a type of contract between the creator of an original work permitting
someone to use their work, generally for some price.
a. Agreement
b. License
c. Patent
d. Copyright

43. Presenting someone else’s idea or work as one’s own idea or work is called ________
a. Plagiarism
b. Copyright infringement
c. Patent infringement
d. None of the above

44. Ravi copy some contents from Internet, but do not mention the source or the original
creator. This is an act of ______
a. Plagiarism
b. Copyright Infringement
c. Trademark Infringement
d. Licence Infringement
45. _____________ means unauthorized use of other’s trademark on products and services.
a. Copyright Infringement
b. Trademark Infringement
c. Plagiarism
d. Patent
46. GPL stands for ___________
a. General Public License
b. GNU General Private License
c. GNU General Public License
d. GNU Public License

47. Which of the following is popular category of public licenses?


a. GPL
b. CC
c. Both of the above
d. None of the above
48. CC (in reference to public license) stands for _____
a. Creative Commons
b. Carbon copy
c. Creative Comments
d. Creative Culture

49. GPL is primarily designed for providing public license to a ______


a. software
b. websites
c. literature
d. music
50. FOSS stands for __________
a. For open source software
b. Free and open set software
c. Free and open source software
d. None of the above

You might also like