Class 12 Informatics Practices Sample Paper Term 1 With Solutions Set B

Sample Papers for Class 12

Section A

Question 1. In a python dataframe,the columns
(a) have to be of same type
(b) can be of different types
(c) can be added to existing dataframes
(d) Both (b) and (c)

Answer

D

Question 2. A series in pandas has
(a) 1 axis
(b) 3 axis
(c) 2 axis
(d) 0 axis

Answer

A

Question 3. In dataframes, the column index starts from
(a) – 1
(b) 0
(c) ‘a’
(d) Columns do not have indexes

Answer

B

Question 4. With pyplot, a line chart is created using
(a) plot()
(b) line()
(c) chart()
(d) linechart()

Answer

A

Question 5. If two series of different indexes are added, the corresponding values are
(a) added
(b) elements of second series are appended at the end of first series
(c) produces an error
(d) values are concatenated

Answer

B

Question 6. The python open source library used for data analysis is
(a) random
(b) matplotlib
(c) awt
(d) pandas

Answer

D

Question 7. A series allows
(a) appending data
(b) modification of data
(c) removal of data
(d) All of these

Answer

D

Question 8. The ………… function makes a plotted chart visible.
(a) plot()
(b) makevisible()
(c) display()
(d) show()

Answer

D

Question 9. Python pandas allows sorting of data in a dataframe on
(a) one column
(b) multiple columns
(c) Both one and multiple columns
(d) indexes only

Answer

C

Question 10. The function used to change the existing order of indexes / labels is
(a) changeindex()
(b) iterate()
(c) reindex()
(d) revolve()

Answer

C

Question 11. The term DRM stands for
(a) Direct Rights Management
(b) Digital Rights Management
(c) Domain Rights Management
(d) None of these

Answer

B

Question 12. Which of the following does not refer to industrial property?
(a) Inventions
(b) Trademarks
(c) Patents
(d) Land

Answer

D

Question 13. Which of the following can be used to avoid plagiarism?
(a) Use own words and ideas
(b) Use online tools to check for plagiarism
(c) Always provide reference
(d) All of the above

Answer

D

Question 14. A series “s1” exists , the statement s1[3:3] will display
(a) 1 element
(b) 2 elements
(c) Empty set
(d) 3 elements

Answer

C

Question 15. User tracking is done through
(a) internet service providers
(b) cookies
(c) Both (a) and (b)
(d) cameras

Answer

C

Question 16. Open data means
(a) data on the web that is made available for public use without restrictions
(b) agreement of web sites with users
(c) data that is provided while buying a software
(d) trial period agreement of anti-virus softwares

Answer

A

Question 17. The extension of a comma separated values file is
(a) .txt
(b) .cvs
(c) .csv
(d) None of these

Answer

C

Question 18. “Universal Participation” is a property of which kind of software?
(a) Freewares
(b) Proprietary softwares
(c) Sharewares
(d) Open source softwares

Answer

D

Question 19. Two dataframes exist with index and a string type column each. The dataframes can be
(a) added
(b) multiplied
(c) subtracted
(d) divided

Answer

A

Question 20. Cyber forensics is also called
(a) web forensics
(b) computer forensics
(c) internet forensics
(d) net forensics

Answer

B

Question 21. Smita is confused whether to use a proprietary or an open source software for her work, the advantage(s) of open source softwares is/are
(a) usually free
(b) no discrimination
(c) Both (a) and (b)
(d) keep hidden information

Answer

C

Question 22. Adarsh received a mail saying that he has received a lottery for which he has to click on the link provided in his E-mail. What should he do?
(a) Click on the link
(b) Block the mail id as Spam
(c) Contact the sender
(d) Both (a) and (c)

Answer

B

2Question 3. A series was created as:
Numericdata=pd.Series([10,12,14,16,18,20])
To get the output as 1 using a property of the series the command will be
(a) Numericdata.series
(b) Numericdata.ndim
(c) Numericdata.length
(d) Numericdata.hasnans

Answer

B

Question 24. The default indexing in pandas is
(a) positional index
(b) sliced index
(c) labelled index
(d) valued index

Answer

A

Question 25. Multiplying a constant ‘n’ to a series
(a) replicates the elements ‘n’ times
(b) multiplies n to each of the elements
(c) produces an error
(d) raises each element to power of n

Answer

B

Section B

Question 26. Which of the statements are valid for creating the following series using the range() function?
Index    Value
A           10
B           12
C           14
D           16
(a) import pandas as pd
s1=pd.Series(range(10,16,2),index=[x for x in ‘ABCD’])
(b) import pandas as pd
s1=pd.Series(range(10,17,2),index=x [ for x in ‘ABCD’])
(c) import pandas as pd
s1=pd.Series(range(10,17,2),[x for x in ‘ABCD’])
(d) import pandas as pd
s1=pd.Series(range(10,17,2),index=[x for x in ‘ABCD’])

Answer

B

Question 27. Given a series “Fan” storing data of some types of Fan as follows:
Index      Values
0            Table Fan
1            Ceiling Fan
2            Kitchen Fan
3            Pedestrial Fan
To get the length of each of the Fan names the command will be
(a) Len(Fan)
(b) Len(‘Fan’)
(c) for fn in Fan.values:
     print(len(fn))
(d) None of these

Answer

C

Question 28. Ms. Kate has created a series “Pets” storing the names of her favourite pets as indexes and their prices as the values as follows :
Index        Value
Monkey     8000
Dog           12000
Rabbit       4000
Cat             2000
To see the names and prices of the pets whose price is >10000 the command she has to write is
(a) print(Pets[Pets>10000])
(b) print(Pets>10000)
(c) print(Pets[>10000])
(d) None of these

Answer

A

Question 29. Which of the following is not a role of social media campaign?
(a) Getting feedback from users
(b) Increasing website traffic
(c) Building E-mail marketing lists
(d) Sending comments on user posts

Answer

D

Question 30. Given below is a bar chart showing names of some elements and their atomic numbers.

Class 12 Informatics Practices Sample Paper Term 1 With Solutions Set B

The code to plot the chart and show it will be
(a) import matplotlib.pyplot
elements=[‘Neon’,‘Sulphur’,‘Calcium’,‘Hydrogen’]
plt.bar(elements,atomicnumber,color=‘orange’)
plt.show()
(b) import matplotlib.pyplot as plt
atomicnumber=[10,16,20,1]
plt.bar(elements,atomicnumber)
plt.show()
(c) import matplotlib.pyplot as plt
elements=[‘Neon’,‘Sulphur’,‘Calcium’,‘Hydrogen’]
atomicnumber=[10,16,20,1]
plt.bar(elements,atomicnumber,color=‘orange’)
plt.show()
(d) import matplotlibrary as plt
elements=[‘Neon’,‘Sulphur’,‘Calcium’,‘Hydrogen’]
atomicnumber=[10,16,20,1]
plt.barchart(elements,atomicnumber)

Answer

C

Question 31. Given below are two statements:
Statement A The attribute loc in legend() is used to specify the location of the legend.
Statement B legend(labels) is used to automatically detect legend elements.
(a) Statement A is correct.
(b) Statement B is correct.
(c) Statement A is correct, Statement B is incorrect.
(d) Statement A is incorrect, Statement B is correct.

Answer

C

Question 32. Which of the following is not a type of chart under matplotlib?
(a) Line
(b) Pie
(c) Scatter
(d) Dotted

Answer

D

Question 33. Which of the following is/are type(s) of plagiarism?
(a) Submitting someone else’s work as their own
(b) Rewriting someone else’s work
(c) Using quotations without citing the source.
(d) All of the above

Answer

D

Question 34. Given statements regarding softwares:
Statement A Window is a proprietary software.
Statement B Mozilla firefox is a free web browsing software.
Statement C Adobe photoshop is free software.
Statement D The source code of linux is not available.
Which of the above statements are correct about the software?
(a) Statement A and Statement B
(b) Statement B and Statement C
(c) Statement C and Statement D
(d) Statement B and Statement D

Answer

A

Question 35. Given the following code for a series creation:
s1=pd.Series(range(10,22,3),index=range(11,23,3))
The output of the code print(s1.tail(2)*2) will be
(a) 17 32
     20 38
(b) 34 32
     40 38
(c) 40 38
(d) 24 32

Answer

A

Question 36. Which of the following is/are sign(s) of cyber bullying in children?
(a) Sudden increased web activity.
(b) Refusal to allow to see what they are doing online.
(c) Both (a) and (b)
(d) Refusal to see their notebooks.

Answer

C

Question 37. Which of the following statements will return 3 values from a dataframe “df” whose indexes are 0,1,2,3,4,5,6,7?
(a) df.iloc[1:4]
(b) df.loc[1:3]
(c) df.tail(3)
(d) All of these

Answer

D

Question 38. The crimes for which cyber laws are not applicable.
(a) Identity theft
(b) Stealing physical property
(c) IPR infringement
(d) Phishing

Answer

B

Question 39. The attribute ……… in legend() is used to specify the location of the legend.
(a) iloc
(b) loc
(c) Both (a) and (b)
(d) None of these

Answer

B

Question 40. Given the dataframe “mdf” created as:
import pandas as pd
mdf=pd.DataFrame({‘a’:[1,2,3,4,5],‘b’:[6,6,7,8,9],‘c’:[11,12,13,14,15]})
for a in mdf[‘b’]:
if a%2==0:
print(a,end=‘ ’)
will print
(a) 6 6 8
(b) 6 7 8
(c) 6 8
(d) 8
     3   4
    12  15

Answer

A

Question 41. Which of the following is/are cyber etiquette(s)?
(a) Asking other confidential data
(b) Obeying copyright laws
(c) Including subject line in E-mail
(d) Both (b) and (c)

Answer

D

Question 42. To display the number rows in a dataframe “dft”, the command would be
(a) len(dft)
(b) dft.size
(c) dft.rows
(d) Both (b) and (c)

Answer

A

Question 43. Given two series created as:
s1=pd.Series([1,2,3],index=[0,1,‘a’])
s2=pd.Series([7,8,9],index=[0,1,‘b’])
The statement : print(s1*s2) will display
(a) 0 7.0
     1 16.0
(b) 0 7.0
     a NaN
(c) 1 16.0
     b NaN
(d) 0 7.0
     1 16.0
     a NaN
 b NaN

Answer

D

Question 44. Mrs. Graf has created a dataframe “Watch” consisting of data of watches as follows:
Index Brand Type Price
0 Casio Digital 5600
1 Rolex Analog 1200
2 Tata Smartwatch 8700
To display the rows of watches whose price is greater than 2000 the statement will be
(a) Watch[Watch[‘Price’]>2000]
(b) Watch[‘Price’]>2000
(c) ‘Price’>2000
(d) None of these

Answer

A

Question 45. Which of the following is/are e-Waste(s)?
(a) Cell phones
(b) GPS devices
(c) Laptops
(d) All of these

Answer

D

Question 46. Mr. Rajkiran a teacher has created a dataframe “School” storing the details of some
schools as follow:
Index Schoolname Location
0 APS Kolkata
1 KVS Delhi
2 AVS Assam
To get the school names only the command will be
(a) School[‘Schoolname’]
(b) School.Schoolname
(c) Both (a) and (b)
(d) School[1]

Answer

C

Question 47. A series “Rivers” is created containing data as follows:
Index      Value
0              Ganga
1              Yamuna
2               Saraswati
3              Amazon
What will be the output after execution of the code?
Rivers[0:2]=‘Indian Rivers’
print(Rivers)
(a) 0    Indian Rivers
     1    Indian Rivers
     2    Saraswati
     3    Amazon
(b) 0    Indian Rivers
     1    Indian Rivers
(c) 1    Indian Rivers
     2    Saraswati
(d) None of the above

Answer

A

Question 48. A dataframe “SocialNetworks” has following data:
Index    Society      Subscribers
0           Facebook     45
1          Twitter         78
2          Instagram    20
The output of the command SocialNetworks[‘Subscribers’]%2==0 will give:
(a) 1 False , 1 True
(b) 2 False , 2 True
(c) 0 False , 2 True
(d) 1 False , 2 True

Answer

D

Question 49. Given the statements with respect to python dictionaries:
Statement A The loc() function uses to specify the index range while extracting slices.
Statement B The iloc() function uses to specify the index range while extracting slices.
(a) Both statements are correct.
(b) Both statements are incorrect.
(c) Statement A is correct , Statement B is incorrect.
(d) Statement A is incorrect , Statement B is correct.

Answer

A

Section C

(Case Study Based Questions)

Ms. Priyanjana has written a code by which she wants to plot the following chart showing some endangered species and their number in India. She also wants to save the plot into a file . She is missing some of the statements / commands . Help her with the missing commands.

Class 12 Informatics Practices Sample Paper Term 1 With Solutions Set B

__________ matplotlib.pyplot as plt               #Blank1
Animals=[‘Tiger’,‘Leopard’,‘Deer’,‘Crocodile’]
number=[100,160,200,155]

plt._______(Animals,_______ ,color=‘red’) #Blank2 , Blank3
plt.______=2 #Blank4 To change the thickness of the bars to 2
plt.title(“Endangered Species”)
plt.___________ #Blank5 To display the chart
plt._________(“Species.jpg”) #Blank6 To save the graph

Question 50. The content of Blank1 will be
(a) imports
(b) add
(c) import
(d) include

Answer

C

Question 51. The content of Blank2 to plot the chart will be
(a) box
(b) bar
(c) graph
(d) patchgraph

Answer

B

Question 52. What should be filled in Blank3 to get the plot as shown in the figure?
(a) num
(b) number
(c) value
(d) values

Answer

B

Question 53. The Blank4 should have
(a) thickness
(b) thick
(c) width
(d) None of these

Answer

C

Question 54. Blank5 should carry the function call
(a) View(1)
(b) view(0)
(c) views()
(d) None of these

Answer

D

Question 55. To save the graph Blank6 should be filled with
(a) savegraph
(b) save
(c) savefig
(d) savepic

Answer

C