Class 12 Informatics Practices Sample Paper Term 1 Set B

Class 12 Sample Papers

Section A

Question 1. While creating a series, the number of values
(a) should be same as number of indexes
(b) can be more than the number of indexes
(c) can be less than the number of indexes
(d) Both (b) and (c)

Answer

A

Question 2. The feature(s) that Pandas supports is/are
(a) storing of data
(b) reshaping of data
(c) Both (a) and (b)
(d) None of these

Answer

C

Question 3. The “T” property can be used on
(a) series
(b) dataframe
(c) Both (a) and (b)
(d) invalid parameter

Answer

C

Question 4. A series can be entirely removed by the method
(a) clear()
(b) recycle()
(c) remove()
(d) None of these

Answer

D

Question 5. A series has by default
(a) positive indices
(b) both positive and negative indexes
(c) only user defined indexes
(d) Series does not have index

Answer

A

Question 6. Jack wanted to create a data structure that would store the Name,Stream and Marks of his classmates , which data structure he should use?
(a) Stack
(b) Series
(c) Dataframe
(d) Any of these

Answer

C

Question 7. Which of the following statement(s) is true about markers of a chart?
(a) Any character can be used as marker
(b) There are specific characters
(c) Only digits can be used
(d) None of the above

Answer

B

Question 8. The parameter that can be used with plot() function to change chart type is :
(a) type
(b) kind
(c) charttype
(d) chartkind

Answer

B

Question 9. Which of the following method is not used with chart?
(a) xticks()
(b) yticks()
(c) title()
(d) chartheading()

Answer

D

Question 10. Charts can be saved as
(a) jpg files
(b) png files
(c) Both (a) and (b)
(d) docx files

Answer

c

Question 11. Use of electronic means to perform business transactions are related to
(a) e-Commerce
(b) e-Business
(c) e-Shopping
(d) All of these

Answer

D

Question 12. Snigdha found her image attached to an unknown person and published in a social networking site. What should she do?
(a) Complain the cyber crime cell
(b) Ignore it
(c) Upload more pictures of herself
(d) Try to contact the source

Answer

A

Question 13. Sunaina’s computer system was not working due to a problem in the CPU, what should she do with it?
(a) Dispose the entire set and buy a new one
(b) Keeping the usable components dispose the unused parts to an e-Waste recycler
(c) Dispose the system casually anywhere
(d) Give it to her sister for play

Answer

B

Question 14. Which of the following is not a parameter of Series() function?
(a) dtype
(b) index
(c) Data in the form of list
(d) type

Answer

D

Question 15. Kavita wanted to use an operating system to which she could make further development, what kind of operating system software she should use?
(a) Open source
(b) Proprietary
(c) FOSS
(d) Both (a) and (c)

Answer

D

Question 16. Which among the following is not an OSS License?
(a) Apache
(b) GPL
(c) MS
(d) CC

Answer

c

Question 17. Rajshri was trying to access a dataframe that was misspelled , what error she would get?
(a) KeyError
(b) NameError
(c) IndexError
(d) None of these

Answer

B

Question 18. How are proprietary softwares better than open source softwares?
(a) Better performance
(b) Modifiable
(c) Exclusive support and service
(d) None of these

Answer

C

Question 19. Which of the following cannot be used to access data from a dataframe?
(a) loc()
(b) iloc()
(c) head()
(d) getdata()

Answer

D

Question 20. Ronita found that her mailbox was flooding with mails from an unidentified source,what is this called?
(a) Spamming
(b) Flooding
(c) Phishing
(d) None of these

Answer

A

Question 21. What kind of problems can occur as a health hazard of using technology?
(a) Vision problems
(b) Muscle problems
(c) Obesity related problems
(d) All of these

Answer

D

Question 22. Selling of a software illegally for temporary use as on rent basis is called
(a) renting
(b) softlifting
(c) downloading
(d) counterfeiting

Answer

A

Question 23. Which of the statement does not extract a subset of a series “s1”?
(a) s1.iloc[1:5]
(b) s1.loc[‘a’:‘e’]
(c) s1[2:4]
(d) s1.slice(1:6)

Answer

D

Question 24. The to_csv() function writes data to
(a) Mydocuments folder
(b) Folder specified by user
(c) Python folder
(d) Scripts folder

Answer

B

Question 25. A dataframe “tvdf” has 3 rows and 3 columns , the statement “tvdf.size” will return
(a) 27
(b) 9
(c) 6
(d) size is not a property of dataframe object

Answer

B

Section B

Question 26. A Series “vote” is created as follows :
vote=pd.Series([“WB”,“Bihar”,“Haryana”],index=[‘W’,‘B’,‘H’])
The statement print(vote.head(2) ) will produce :
(a) W WB
(b) B Bihar
(c) H Haryana
(d) W WB
     B Bihar

Answer

D

Question 27. Given below is a code , identify the error in it.
import pandas as p
Toys=p.Series([22,44,66,88,99])
The property to get the number of bytes occupied by the series is
(a) T
(b) nbytes
(c) shape
(d) index

Answer

B

Question 28. Series s1 were created by ‘Sunita’ , a Teacher as follows :
import pandas as pd
s1=pd. Series([1,2,3],index=[3,4,5])
Now she wants to create another series s2 with values [ 9,10,11] and indexes same as s1.
The statement would be
(a) s2=pd.Series([9,10,11], index=s1.index)
(b) s2=pd.Series([9,10,11], s2.index)
(c) s2(s1)
(d) Both (a) and (b)

Answer

A

Question 29. Intentionally kept traces of activities done over the web are called
(a) passive digital footprints
(b) data prints
(c) digital traceback
(d) active digital footprints

Answer

D

Question 30. Given the following plot showing the rainfall analysis in “Bombay” in 3 years.
The data of rainfall and years is as follows :
rainfall=[200,150,300]
yrs=[2010,2015,2020]

Class 12 Informatics Practices Sample Paper Term 1 Set B

The code for the above plot and to show it should be :
(a) import matplotlib.pyplot as p
rainfall=[200,150,300]
yrs=[2010,2015,2020]
plt.plotline(yrs,rainfall)
plt.show()
(b) import matplotlib.pyplot as plt
rainfall=[200,150,300]
yrs=[2010,2015,2020]
plt.plot(yrs,rainfall)
(c) import matplotlib.pyplot as plt
rainfall=[200,150,300]
plt.plot(yrs,rainfall)
plt.show()
(d) import matplotlib.pyplot as plt
rainfall=[200,150,300]
yrs=[2010,2015,2020]
plt.plot(yrs,rainfall)
plt.show()

Answer

D

Question 31. Given below are two statements :
Statement A Histograms are used to describe distributions.
Statement B To specify the intervals in x-axis, the property used is “interval”.
(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.

Answer

A

Question 32. What happens, if the show() function is not used in a chart plotting code?
(a) The chart is not plotted
(b) An error is generated
(c) Chart is plotted but not displayed
(d) Chart is plotted , shown but with improper data

Answer

C

Question 33. Firewalls are
(a) softwares that destroy viruses
(b) commercial softwares
(c) utilities that filter the entry of malwares
(d) cleaner softwares

Answer

C

Question 34. Given the statements regarding Internet use :
Statement A We can freely comment on anything.
Statement B Age and gender should not be asked.
Statement C Bulk E-mail attachments cannot be send to people.
Statement D We can try to get access to other’s E-mails.
Which of the statements justify proper use of Internet?
(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

B

Question 35. Given the following code where a series “Empgrade” is created carrying the Grade as
index and salary as values .
Index            Values
“Exec”           125000
“Officer’’        90000
“Clerk”           75000
The output of the code Empgrade.iloc[1:10] will be
(a) “Officer”     90000
(b) “Officer “    90000
     “Clerk”       75000
(c) Error in code
(d) Empty set

Answer

B

Question 36. The activities to be done, if someone has mistakenly responded to a phishing attack.
(a) Change the passwords
(b) Contact the fraud department of the institution
(c) Ignore it
(d) Both (a) and (b)

Answer

D

Question 37. A dataframe carries student data as follows :
collegedf=pd.DataFrame({‘Name’:[‘Jack’,‘Priya’,‘Subodh’],‘Maths’:[45,89,98],‘IP’
:[89,78,66]})
The number of columns and rows in the dataframe is
(a) 3,4
(b) 3,3
(c) 1,3
(d) None of these

Answer

B

Question 38. Ways to prevent identity theft are
(a) use strong and unique password
(b) avoid posting confidential information online
(c) do not post personal information on social media
(d) All of the above

Answer

D

Question 39. What is the difference between pop() and drop() functions?
(a) pop() removes permanently, but drop() removes temporarily.
(b) No difference
(c) drop() function does not exist.
(d) pop() is used to remove a row , but drop() removes a column.

Answer

A

Question 40. Given the series s1 and s2 as follows :
s1
Index    Value
a            2
b            3
c            4
s            2
Index    Value
3            9
4            10
5            11
The statement print(s1+s2) will display
(a) Index      Value
    a              NaN
    b              NaN
    c               NaN
(b) 3             NaN
     4             NaN
     5             NaN
(c) a3           29
     b4           310
     c5            411
(d) None of the above

Answer

D

Question 41. Which of the following come under cyber crime?
(a) Theft of a new laptop
(b) Access of a bank account in unauthorised way
(c) Unauthenticated modification of a company’s data online
(d) Both (b) and (c)

Answer

D

Question 42. The command to make an empty dataframe “df1” is
(a) df1=Empty
(b) df1=[]
(c) df1=blank
(d) df.clear()

Answer

B

Question 43. Given a dataframe “Marksdf” storing the following :
Index    Name       Maths      Physics
0           Anil             67          89
1           Anirban      23          96
2           Souvik        100        45
To print the marks in Physics that are >65, the code would be
(a) for a in Marksdf [‘Physics’]:
if a>65:
print(a)
(b) for a in range(Marksdf.length):
if a>65:
print(a)
(c) a=0
while a<Marksdf.‘Physics’.values:
if a>65:
print(a)
(d) None of the above

Answer

A

Question 44. Ankita created a dataframe “Student” storing data of students as follows :
     Name      Maths    IP
0   Jack         45        89
1   Priya        89        78
2   Subodh    98         66
The output of the command : Student [‘Maths’]<56 will display
(a) 0 True
     1 False
     2 False
(b) 0 True
(c) 1 False
     2 False
(d) Error in code

Answer

A

Question 45. Which among the following cannot be a source of phishing?
(a) A financial institution
(b) A chain store
(c) A school
(d) Both (b) and (c)

Answer

D

Question 46. Predict output of the following code:
s1=pd.Series([20,40,60,80])
s1=s1%3
s2=s1.head(3)
print(s2)
(a) 0 2
     1 1
     2 0
(b) 0 1
     2 2
(c) 2 2
(d) 1 1
     2 0

Answer

A

Question 47. With respect to the dataframe “Bank”:
Index   BankName     Type
0          SBI                 Govt
1          Axis                Private
2          PNB                Govt
3          CBI                 Govt
What will be the output of the code?
m=‘Pr’
for a in Bank[‘Type’]:
if m in a:
print(a)
(a) Govt
(b) Private
(c) 1
(d) Empty

Answer

B

Question 48. Given a dataframe “Eye”
Index    Patient        Eye Power
0          Mr. Rakesh      2.5
1          Ms. Sita          1.2
2          Ms. Julie          1.0
The output of the command print(Eye[2:10]) will be
(a) Error
(b) 2 Ms. Julie 1.0
(c) Empty set
(d) 0 Mr. Rakesh 2.5

Answer

B

Question 49. Given the statements with respect to Python Pandas:
Statement A In Python Pandas, all functions start with uppercase alphabets.
Statement B All function calls must end by a semicolon (;).
(a) Both statements are correct.
(b) Both statements are incorrect.
(c) Statement A is correct, but Statement B is incorrect.
(d) Statement A is incorrect, but Statement B is correct.

Answer

B

Section C

(Case Study Based Questions)

Ms. Jennifer Christiano wants to create a dataframe “Football” and perform some operations with it . She wants to assign a new set of indices , reindex the data and then sort the data .
She wrote the code but is missing some keywords/statements . Help her to write the code.
Football
Index     Player          Club               Charges
0           Ronaldo       AC Milan              9.6
1           Pele             Real Madrid         10.5
2           Maradona    Royal Argentina    19.5
(Assume pandas is imported as pd)

Question 50. The statement to create the dataframe will be :
(a) Football=pd.Dataframe(‘Player’:[‘Ronaldo’,‘Pele’,‘Maradona’],‘Club’:
[‘AC Milan’,‘Real Madrid’,‘Royal Argentina’],‘Charges’:[9.6,10.5,19.5])
(b) Football=pd.DataFrame({‘Player’:[‘Ronaldo’,‘Pele’,‘Maradona’],‘Club’:
[‘AC Milan’,‘Real Madrid’,‘Royal Argentina’],‘Charges’:[9.6,10.5,19.5]})
(c) Football= DataFrame{‘Player’:[‘Ronaldo’,‘Pele’,‘Maradona’],‘Club’:
[‘AC Milan’,‘Real Madrid’,‘Royal Argentina’],‘Charges’:[9.6,10.5,19.5]}
(d) Football= DataFrame(‘Player’:[‘Ronaldo’,‘Pele’,‘Maradona’],‘Club’:
[‘AC Milan’,‘Real Madrid’,‘Royal Argentina’],‘Charges’:[9.6,10.5,19.5])

Answer

B

Question 51. The shape of the dictionary is given by
(a) Football.dim
(b) Football.size
(c) Shape(Football)
(d) None of these

Answer

D

Question 52. To set the index as ‘R’,’P’ and ‘M’ respectively for the three rows, the command she should write is
(a) Football= Football.re_index([‘R’,‘P’,‘M’])
(b) Football= Football.index([‘R’,‘P’,‘M’])
(c) Football=Football.reindex([‘R’,‘P’,‘M’])
(d) Football.newindex(‘R’,‘P’,‘M’)

Answer

C

Question 53. To make all the charges to 11.9, the statement would be
(a) Football.‘Charges’=11.9
(b) Football(‘Charges’)=11.9
(c) Football[‘Charges’]=11.9
(d) None of these

Answer

C

Question 54. The output of the statement : Football[‘Charges’]/2 will be
(a) 0 4.0
     1 5.0
     2 9.0
(b) 0 40
     1 50
     2 90
(c) 0 4.80
     1 5.25
     2 9.75
(d) Error

Answer

C

Question 55. What will be the output of the command Football.size?
(a) 10
(b) 9
(c) 12
(d) 15

Answer

B