Professional Documents
Culture Documents
Screenshot 2021-12-20 at 6.27.38 PM
Screenshot 2021-12-20 at 6.27.38 PM
Screenshot 2021-12-20 at 6.27.38 PM
SAMPLE PAPER 3
INFORMATICS PRACTICES
A Highly Simulated Practice Questions Paper
for CBSE Class XII (Term I) Examination
Instructions
1. This question paper is divided into three sections.
2. Section - A contains 25 questions (1-25). Attempt any 20 questions.
3. Section - B contains 24 questions (26-49). Attempt any 20 questions.
4. Section - C contains 6 case study based questions (50-55). Attempt any 5 questions.
5. Each question carries 0.77 mark.
6. There is no negative marking.
Maximum Marks : 35
Roll No. Time allowed : 90 min
Section A
This section consists of 25 questions (1 to 25). Attempt any 20 questions from this section. Choose the best
possible option.
12. Nisha wanted a software for her official documentation work, but she does not want to
pay for it. Which type of software she should procure?
(a) Closed software (b) Free software
(c) Commercial software (d) Proprietary software
13. John was using an antivirus software for free for a month , one morning he found the
software stopped working saying that it needs to be bought. What category of software does
it belong to?
(a) Proprietary software (b) Free software
(c) Freeware software (d) Shareware software
14. The minimum number of parameters required by the Series() function to create a
non-empty series is
(a) 1 (b) 0 (c) 3 (d) 4
15. Which of the following are not the health hazards of technology?
(a) Musculoskeletal problems (b) Vision problems
(c) Heart problems (d) Sleeplessness
16. Robert is confused between the terms FOSS and OSS, the statement that clarifies it is.
(a) FOSS is OSS that is free.
(b) FOSS is not open source , but OSS is open source.
(c) FOSS is to be bought , but OSS is not paid.
(d) FOSS is limited period use , but OSS is free for unlimited period.
17. The tail() function without any parameters extracts ……… number of rows from end of
a series.
(a) 1 (b) 2 (c) 5 (d) 0
18. Which of the following acts are not done by cyber criminals?
(a) Report vulnerability in any system (b) Mass attack using trojans
(c) Email spoofing and spamming (d) Unauthorised account access
19. The statement used to change the name of the index of a Series “s” is
(a) s.name=newname (b) s.index.name=”newname”
(c) s.indexname=”newname” (d) s.index_name=”newname”
20. Albert found that while logging to his E-mail account , the password was coming
automatically , what is responsible for this?
(a) Trojans (b) Viruses
(c) Cookies (d) Password manager
21. The least dangerous type of malware is
(a) worm (b) spyware (c) spamming (d) virus
22. Which one of the following is not a netiquette?
(a) Cyber bullying (b) Don’t troll people in web forums
(c) Respecting others privacy (d) Do not trust others when you are new
24. The property that is used to check whether a series is empty or not.
(a) nbytes (b) empty
(c) none (d) null
25. Which property of a dataframe performs a transpose of a dataframe?
(a) shape (b) T
(c) len (d) ndim
Section B
This section consists of 24 questions (26 to 49). Attempt any 20 questions.
3
What will be the output of the code?
(a) Name Age Score
First Player Ram 26 85
Second Player Shyam 24 63
Third Player Sita 22 55
Fourth Player Laxman 23 74
(b) Name Age Score
First Player Ram 26 85
Second Player Shyam 24 63
(c) Age Score
First Player 26 85
Second Player 24 63
Third Player 22 55
Fourth Player 23 74
(d) The code will produce an error
41. Debarati was feeling health related problems for few days as she uses the digital
gadgets excessively, which preventive measures would relax her
(a) talking to her friends
(b) having a balanced diet
(c) perform physical exercises regularly and apply water to her eyes periodically
(d) None of the above
42. The keyword that includes a module in Python is
(a) imports (b) include (c) add (d) import
43. Given the Series waterseries prepared as:
waterdict={‘Plain’:20,‘Sweet’:50,‘Distilled’:100}
waterseries=p.Series(waterdict)
print(waterseries)
Output
Plain 20
Sweet 50
Distilled 100
The statement to give the following output is
Distilled 100
Plain 20
(a) waterseries[: : 1] (b) waterseries[: : 2]
(c) waterseries[: : 0] (d) waterseries[: :]
44. Rama created a Series storing the names and prices of icecreams as follows :
import pandas as pd
icecream=pd.Series([150,200,300],index=[‘Blackberry’,‘Blachforest’,‘Butter’])
She wants to display the icecream prices increased by 30 , a statement to do so is
(a) import pandas as pd (b) import pandas as pd
icecream+30 icecream=[30]
(c) import pandas as pd (d) None of these
icecream[price]=price+30
45. Which of the following is not affected by computer viruses?
(a) Hard disk (b) Network system (c) SMPS (d) Pen drives
46. Given a dataframe ‘Roomdf’
Index Rno Rtype Tariff
0 123 AC 3000
1 124 General 1000
2 125 Deluxe 4500
The command that displays the third row is
(a) Roomdf.iloc[2:] (b) Roomdf.loc[2:] (c) Roomdf[2:] (d) All of these
47. A Series ‘s’ is created as :
0 11
1 22
2 33
3 44
4 55
What will be the output of print(s[ 3: : 1 ])?
(a) 2 33 (b) 1 22 (c) 2 33 (d) Error in code
1 22 0 11 0 11
0 11
48. Given a dataframe “Proddf” carrying the following data of products:
Index Prodid Pname Qty
0 1 Tea 25
1 2 Coffee 40
2 3 Snacks 50
The statement to display only the ‘Qty’ of all products is
(a) Proddf[,:,“Qty”] (b) Proddf[“Qty”]
(c) Proddf[“Qty”,:] (d) Proddf[:,“Qty”]
49. Given statements about a series.
Statement A The values property prints the list of values from a Series.
Statement B It also prints the data type of the values.
(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.
Section C
(Case Study Based Questions)
This section consists of 6 questions (50 to 55). Attempt any 5 questions.
Mr. Krishnamurthy, who is a new user of Python Pandas , has created the following
series “Electrical” carrying names of electrical appliances as values and their wattage
as the index. He wants to perform certain operations on the series . You are supposed
to help him in writing the commands.
Electrical
Index Name
12W LED
200W Fan
1000W Electric Iron
1200W Rice Cooker
50. He created another series “Electrical1” storing?
Index Name
12W Bulb
200W Induction
What will be the output of Electrical + Electrical1?
(a) Index Name (b) Index Name
12W LEDBulb 12W LEDBulb
200W FanInduction 200W FanInduction
1000W NaN 1000W Electric Iron
1200W NaN 1200W Rice Cooker
(c) Index Name (d) None of these
12W LEDBulb
200W FanInduction
1000W Electric Iron
51. He wants to display only the first two rows of “Electrical” , the statement that he
should write is
(a) Electrical[0:3] (b) Electrical[0:2]
(c) Electrical.loc[“12W”:”200W”] (d) Both (b) and (c)
52. The dimension of the series “Electrical” is given by
(a) Electrical.dimension (b) Electrical.dim (c) Electrical.ndim (d) Electrical.bytes
53. What will be the output of the statement?
Electrical[Electrical==“Fan”]
(a) 1 Fan (b) 200W Fan (c) Empty set (d) Error
54. He wants to change the index of Electrical series “LED” element to “A” ,the command
will be:
(a) Electrical=Electrical.rename(index={‘12W’:“A”})
(b) Electrical=Electrical.ren(index={‘12W’:“A”})
(c) Electrical=Electrical.rename({‘12W’:“A”})
(d) Both (a) and (c)
55. He wrote the statement:
del Electrical [“1000 W”]
print (Electrical)
What will be the output of the above statement?
(a) Index Name
12W LED
200W Fan
1000W Electric Iron
1200W Rice Cooker
(b) Index Name
12W LED
200W Fan
1200W Rice Cooker
(c) Index Name
12W LED
200W Fan
(d) None of the above
OMR SHEET SP 3
Roll No.
Instructions
Use black or blue ball point pens and avoid Gel & Fountain pens for filling the OMR sheet.
Darken the bubbles completely. Don’t put a tick mark or a cross mark, half-filled or over-filled bubbles will not be read
by the software.
1 20 38
2 21 39
3 22 40
4 23 41
5 24 42
6 25 43
7 26 44
8 27 45
9 28 46
10 29 47
11 30 48
12 31 49
13 32 50
14 33 51
15 34 52
16 35 53
17 36 54
18 37 55
19
Answers
1. (a) 2. (a) 3. (d) 4. (d) 5. (a) 6. (d) 7. (d) 8. (a) 9. (b) 10. (d)
11. (d) 12. (b) 13. (d) 14. (a) 15. (c) 16. (a) 17. (c) 18. (a) 19. (b) 20. (c)
21. (c) 22. (a) 23. (d) 24. (b) 25. (b) 26. (a) 27. (c) 28. (b) 29. (c) 30. (c)
31. (c) 32. (d) 33. (b) 34. (c) 35. (c) 36. (c) 37. (b) 38. (c) 39. (b) 40. (a)
41. (c) 42. (d) 43. (b) 44. (a) 45. (c) 46. (d) 47. (a) 48. (b) 49. (a) 50. (a)
51. (d) 52. (c) 53. (b) 54. (a) 55. (b)
SOLUTIONS
1. The default delimiter of a CSV file is “,” 13. Sharewares are softwares that are available for
that’s why it is called comma separated free usage for a limited period after which they
values file. need to be bought. e.g. Anti-virus softwares, etc.
2. The iterrows() function loops through the 14. To create a non-empty series a minimum
rows of a dataframe and the iteritems() number of argument required for carrying data
function iterates column-wise. values is 1.
3. A line chart can have multiple lines plotted. 15. Excessive use of technology can cause
4. The range( 10, 1, 4) returns no values , so the musculoskeletal problems, vision problems and
series will contain no values. lack of sleep. Heart problems are not very
common due to use of technology.
5. NaN values are not counted as values of a
series. So the count is 3. 16. FOSS (Free and Open Source Softwares) are
those that are both free and open source.
6. Stack is a data structure that follows the LIFO
technique. This data structure is not natively OSS (Open Source Software) are those that are
available in pandas. open source but may or may not be free.
7. The indexes of a series can be integers, 17. When the tail ( ) function is used to extract data
characters and strings. Series can be created from a series, if no parameter is specified , by
as: default 5 trailing elements are extracted.
import pandas as p 18. Cyber criminals access accounts without
s1=p.Series(20,index=[0,1,2,3]) authorisation , do flooding of E-mail accounts
s2=p.Series(20,index=[‘a’,‘b’,‘c’,‘d’]) and also attack systems by trojans. Report
s3=p.Series(20,index=[“abc”,“pqr”,“xyz”, vulnerability in any system is not done by cyber
“mno”]) criminals.
8. Series indexes can be duplicate with any 19. The index.name property can be used to change
types of data. the name of the index.
9. Pandas allows changing the column labels at 20. A cookie is a temporary internet file that stores
any point of time. user information that can be used on
sub-sequent logins , so that the user need not
10. Data visualisation includes plotting of charts retype the same data.
which is not available with in pandas module.
21. Worms and viruses can excessively destroy
11. The sending of unnecessary junk mails from systems by deleting files , crashing the system
unauthenticated sources that fill up the and the operating system , even spywares can
mailbox , is called spamming. steal important data from the system .
12. Free softwares are available for free usage . Spamming is least dangerous type of malware,
Since she wants a software which is available that fills the mail box with unnecessary mails
free of cost , she should procure a free but does not do drastic harms.
software.
22. Netiquette means respecting other user’s 33. Encryption secures the passwords from potential
views and displaying common etiquette hackers and crackers by changing the text ,
when posting your views to online adding characters and other algorithms.
discussion groups. 34. A virus can appear from any external source
23. The Information Technology Act- 2000 was connected to the system, such as a pen drive ,
laid in October 2000 and is commonly called another computer or the network.
ITA-2000 . It contains sections to protect 35. The range(100,60, 15) returns the values 100 , 85,
citizens against crimes committed over the 70 starting from 100 decrementing by 15. Since
network. the data given is a constant 100 , the entire series
24. The empty attribute of a series can be used to carries the same data and the indexes 100,85,70.
check whether a series contains any elements 36. Proprietary softwares like Windows , Oracle,
or not. etc., need a license to be bought for its usage.
25. The following code shows the working of 37. The DataFrame() function when used without
“T ’’ attribute of a dataframe to transpose it. any parameters creates an empty dataframe.
>>>print(studentdf)
38. Digital footprints are also called by the name
Roll Name digital tattoos.
0 1 a
39. In both the data structures series and dataframe,
1 2 b the index starts from 0 to (n 1), where n is the
>>> print(studentdf.T) number of elements.
0 1 40. The rename method of a DataFrame can be used
Roll 1 2 to change the names of the indexes.
Name a b Here, the default indexes have been renamed to
26. The loc() function extracts elements from a ‘First Player’,’Second Player’ ….
series based on user indexes and from start 41. Physical exercises can prevent musculoskeletal
to the endindex , so flavours.loc[‘q’:‘r’] problems and applying water to eyes
extracts both the elements at indexes ‘q’ and periodically can save her eyes.
‘r’.
42. The statement to include a module is
27. To use the NaN constant, the numpy module
import <modulename> as <alias>
needs to be imported .Since numpy has been
imported as “np” , so NaN has to be used as e.g. import numpy as n
np.NaN. 43. The statement waterseries[: : 2] extracts
28. The function to reindex the dataframe is elements from the end to beginning going
<dataframe>.reindex, where the new backwards skipping by 2.
arrangement of the indexes is to be specified. 44. Adding a value to a series, add the value to all
29. The act of stealing creations made from the the values of the series.
innovative minds of others like books, 45. The SMPS (Switch Mode Power Supply) is an
software etc., and publishing them in one’s electrical unit that cannot be affected by virus
own name is called plagiarism. softwares.
30. The box is called a legend box.The legend() 46. All the statements display the records starting
function displays a legend box to indicate the from index 2 , which is the third row.
identity of the plots by their colors.
47. The statement print(s[ 3: : 1 ]) prints the
31. The xlabel() function displays the x-axis elements from index 3 to the beginning
label. Providing a x-axis label is not decrementing by 1. In series, the last element
compulsory, if added it increases the has index 1,second last has index 2 and so on.
readability of the chart.
48. The statement to display only the Qty of all
32. The savefig() function can be used to save products is Proddf ["Qty "].
any type of chart to an image file.
49. The values property prints the list of values as 51. Electrical[0:2] displays rows 0 and 1 ,
well as the data type of the values from a Series. Electrical.loc[“12W”:”200W”] displays the
The code below shows the working of values rows at indices “12W” and “200W”.
property : 52. The ndim attribute displays the number of
Suppose Series S1 is dimensions of a series.
0 1 53. The command Electrical[Electrical==”Fan”]
1 2 matches the rows where the value is “Fan”
and displays them.
2 3
print(s1.values) 54. The rename function can be used to rename
an index with the index attribute and
Output array([1, 2, 3], dtype=int64)
specifying the old and new index.
50. The addition operation on two series adds /
55. The del function along with the index
merges values for same indexes, for
removes the element at the index
non-matching indexes it gives a NaN.
permanently.