0% found this document useful (0 votes)
145 views12 pages

Ip-Class-Xii-Sample Question Paper

The document provides a sample question paper for class 12 Informatics Practices term 1 exam. It contains 3 sections with a total of 55 multiple choice questions to be attempted in 90 minutes. Section A has 25 questions to attempt 20, Section B has 24 questions to attempt 20, and Section C has 6 questions to attempt 5.

Uploaded by

ABDUL RAHMAN 11B
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
145 views12 pages

Ip-Class-Xii-Sample Question Paper

The document provides a sample question paper for class 12 Informatics Practices term 1 exam. It contains 3 sections with a total of 55 multiple choice questions to be attempted in 90 minutes. Section A has 25 questions to attempt 20, Section B has 24 questions to attempt 20, and Section C has 6 questions to attempt 5.

Uploaded by

ABDUL RAHMAN 11B
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

SAMPLE QUESTION PAPER 2

CLASS XII
INFORMATICS PRACTICES (065)
TERM 1
Maximum Marks: 35 Time Allowed: 90 Minutes
General Instructions:
1. The question paper is divided into 3 Sections – A, B and C.
2. Section A consists of Questions 1 to 25 and students need to attempt 20 questions.
3. Section B consists of Questions 26 to 49 and students need to attempt 20 questions.
4. Section C consists of Questions 50 to 55 and students need to attempt 5 questions.
5. All questions carry equal marks.

Section A
Section A consists of 25 questions. Attempt any 20 questions.
1. Pandas is a/an ___________ library.
(i) Open Source (ii) Source code
(iii) Binary (iv) Class
2. Series is a _________ and Dataframe is a _______ data structure in Python Pandas.
(i) 3-D, 2-D (ii) 2-D, 3-D
(iii) 1-D, multidimensional (iv) 1-D, 2-D
3. Wes Mckinney developed:
(i) NumPy (ii) Python
(iii) Pandas (iv) Dictionary
4. Pandas _______________ allows to organize data in rows and columns.
(i) NumPy (ii) Series
(iii) Dataframe (iv) List
5. Pandas allows you to visualize data using _____________ library.
(i) Matplotlib (ii) NumPy
(iii) Panel (iv) All of the above
6. Series is ________ mutable but __________ immutable.
(i) Size, value (ii) Value, size
Sample Question Paper 2
(iii) Data type, value (iv) Value, elements
7. The datapoints plotted on a graph are known as:
(i) Point (ii) Legend
(iii) Title (iv) Markers
8. Which of the following functions is used to display the graph in matplotlib?
(i) plt.display() (ii) plt.Show()
(iii) plt.Visible() (iv) plt.show()
9. Consider the code given below and identify the shape of the dataframe.
import pandas as pd
df1=pd.DataFrame([[2,4,5,6,6], [4,5,3,2,5],[5,6,7,8,4]])
print(df1.shape)
(i) (3, 5) (ii) (5, 3)
(iii) (3, 3) (iv) (5, 5)

A.1
10. _________________ is one of the arguments of plot() function in matplotlib.
(i) figsize (ii) save
(iii) linestyle (iv) linelength
11. When we delete a Facebook post from our smartphone, our digital traces get automatically deleted. Is
the statement correct?
(i) Yes (ii) Not sure
(iii) No (iv) May be
12. Raj and his friends send authentic-looking e-mails to anonymous people claiming to have won a prize of
` 5,00,000. To claim this prize, individuals must give personal information such as their name, location,
contact number, account details, etc., by clicking on the link provided by these scamsters. What type of
activity are they involved in?
(i) Helping people with money (ii) Phishing
(iii) Cracking (iv) Copyright infringement
13. Identify the incorrect statement.
(i) Proprietary software is neither open nor freely available.
(ii) Source code is not available with Shareware software.
(iii) Freeware software is available with source code which allows modifications.
(iv) FLOSS is both free software as well as open-source software.
14. Which of the following statements is correct regarding Pandas syntax?
(i) Import NumPy as np
(ii) A=PD.series([1,2,3])
(iii) Df=Df.pdDataFrame(lst)
(iv) import pandas as qty
15. _____________ is a grant of the inventor’s exclusive right to prevent others from manufacturing, selling,
using or importing a certain product or service.
(i) Trademark (ii) Patent
(iii) Digital right (iv) Copyright infringement
16. _________________ are the rights of the owner where they have the right to decide the price of their
intellectual property besides how much information is to be exchanged, shared and modified.
(i) Copyright (ii) Software licensing
Informatics Practices with Python–XII

(iii) Intellectual Property Rights (iv) IT Act, 2000


17. Consider a DataFrame Df1
0 1 2
one 2 4 5
two 3 2 5
three 5 6 4
Which of the following statements results in ValueError?
(i) Df1[3]=[3,4,5] (ii) Df1[3]=[10,2]
(iii) Df1[4]=[9,9,9] (iv) Df1[‘Three’]=[8,6,5]
18. You and your friend are working together on an IT project. Your friend copies some of the contents from
the internet and pastes it in the project. Your teacher checks your project with plagiarism checker tool
and finds that the project contains 45% plagiarized material. What is the conclusion of your teacher?
(i) Only your friend is guilty of plagiarism.
(ii) Since only 45% of the content was copied, neither is guilty of plagiarism.
(iii) Both have committed plagiarism as the evidence proves it.
(iv) Since both have been doing a school project, they are allowed to copy content from the internet.

A.2
19. Which of the following functions is not used to combine two dataframes?
(i) join() (ii) concat()
(iii) merge() (iv) combine()
20. Prolonged and continuous use of technology may lead to
(i) Internet addiction (ii) Sleeping disorders
(iii) Loss of attention and increased stress (iv) All of the above
21. Your best friend posted some photos on the social media she took with you on her birthday. However,
you instructed her to remove the photos in which you are seen. Is it possible and how would she do
that?
(i) She’ll take the photographs down from her social media posts.
(ii) She’ll hire a professional to remove all your photos from her account.
(iii) She’ll track down everyone who viewed or copied the photos and remove photos from their accounts.
(iv) She will never be able to delete such photographs since they may have been copied by someone else.
22. IT Act, 2000 does not deal with:
(i) Providing online classes
(ii) Providing legal recognition to digital signatures for authentication
(iii) Providing legal recognition to all transactions conducted via electronic data exchange
(iv) Providing security measures for electronic records
23. Identify how the given dataframe is created.
import pandas as pd
classXII ={'RollNo':pd.Series([1,2,3]),'Name’: pd.Series (['Jai','Mayank',
'Shruti'])}
df=pd.DataFrame(classXII)
(i) Dictionary of Strings (ii) Dictionary of List
(iii) List of Dictionary (iv) Dictionary of Series
24. Identify the function which can save dataframe df into csv file.
(i) df.write_csv() (ii) df.store_csv()
(iii) df.to_csv() (iv) df.create_csv()
25. Which of the following methods/functions is used to add a new column in a dataframe?
(i) add() (ii) insert()
(iii) df[<column name>] (iv) both (ii) and (iii)

Section B
Section B consists of 24 Questions (26 to 49). Attempt any 20 questions.
26. Consider a dataframe Stud:
Sample Question Paper 2
Stud
RollNo Name Class
0 1 Pankaj IX
1 2 Pranjal VIII
2 3 Khushi VI
Which of the following commands will set the Name column as index permanently?
(i) Stud.index(‘Name’) (ii) Stud.set_index(‘Name’,inplace=True)
(iii) Stud.set_index(‘Name’,inplace=Yes) (iv) Stud.reset_index(‘Name’,inplace=True)

A.3
27. Consider a Series:
Ser1
a 8.0
b 9.0
c 7.0
d NaN
dtype: float64
Which command returns True as a result?
(i) a.hasnans (ii) a.empty
(iii) a.dtype (iv) a.index
28. Mr Raj Arora is working in ABC Ltd. as an IT Assistant. He has been given the task to create a dataframe
that shows quarterly sales data (given) of two years (2019-20 and 2020-21). The dataframe should have
indexes as Qtr1, Qtr2 and Qtr3 and 2019-20 and 2020-21 as column headings. Choose the statement
which will create the dataframe ‘Sales’.
import pandas as pd
Data=[[3000,3200],[4000,4000],[5000,5100]]
(i) Sales=pd.Series(Data,Headings=['2019-20','2020-21'],index=['Qtr1','Qtr2','
Qtr3'])
(ii) Sales=pd.DataFrame(Data,columns=['2019-20','2020-21'],index=['Qtr1','Qtr2'
,'Qtr3'])
(iii) Sales=pd.DataFrame(Data,columns=['Qtr1','Qtr2',’Qtr3’], index=['2019-20',
'2020-21'])
(iv) Sales=pd.DataFrame('2019-20','2020-21',columns=[Data],index=['Qtr1',
'Qtr2','Qtr3'])
29. Any fraudulent business practice that extracts money from an ignorant person is called
_____________________.
(i) Software Piracy (ii) Scam
(iii) Cyberbullying (iv) Cyber Trolling
30. Observe the following figure. Complete the code to obtain this graph as output.
Informatics Practices with Python–XII

import matplotlib.pyplot as plt


members=[3,5,4,2,6,7,4,3,8,5,6,8,3,5,2,5,6,4,3,2,4,5,2,4,5,4,3,5,5,4,4,3,
5,4,3,3,2,2,1,3,4,5,5,4,3,3,2,2,1,5]
(i) plt.hist(members,bins=8)
plt.title("Total family members living in 50 Flats")
plt.show()
(ii) plt.plot(members)
plt.title("Total family members living in 50 Flats")
plt.show()

A.4
(iii) plt.bar(members)
plt.title("Total family members living in 50 Flats")
plt.show()
(iv) plt.hist(members)
plt.show()
31. Consider the two statements given below:
Statement 1: Matplotlib is a 2-D plotting library that helps in visualizing figures.
Statement 2: Calling plot() function from Matplotlib library will automatically create the necessary figure
and axes of the graph.
(i) Statement A is correct.
(ii) Statement B is correct.
(iii) Statement A is correct but Statement B is incorrect.
(iv) Statement A is incorrect but Statement B is correct.
32. Consider a code given below:
import matplotlib.pyplot as plt
import numpy as np
y= [1.1,2.2,3,4,3,5,6,9]
x= range(0,8)
plt.plot(x,y,'x',markersize=5,linestyle='dashed', markeredgecolor= 'r',
linewidth=5)
plt.show()
Which argument should be deleted to obtain scatter plot?
(i) markersize=5 (ii) markeredgecolor=’r’
(iii) linestyle=’dashed’ (iv) linewidth=5
33. Mohit needs to create a spreadsheet document for an IT project. However, he does not have Excel
software installed on his computer. What free software can he get from the internet to finish his project?
(i) OpenOffice Calc (ii) Python
(iii) OpenOffice Document (iv) Visual Basic
34. Suppose you receive a text message from your Bank asking you to click on a link to renew your password
in order to access netbanking.
Statement 1: Reply to the text message and give confirmation about change of password.
Statement 2: Call banker to verify if the request is genuine or not.
Statement 3: Never click on the link as it could download malware or expose credentials.
Statement 4: Click on the link and reset password.
Which of the above statement(s) will you opt for in such a situation?
(i) Statements 1 and 4 (ii) Statements 3 and 4
(iii) Statements 2 and 3 (iv) Statements 1 and 2 Sample Question Paper 2
35. Consider the following series named color:
color
1 Red
2 Green
3 Orange
4 Yellow
5 Black
dtype: object
Write the command that generates the output as:
1 Red
3 Orange
dtype: object
(i) color[0:4] (ii) color[1:3:2]
(iii) color[:4:2] (iv) color[1,3]
A.5
36. Identify which behaviour suggests that someone is being cyberbullied.
(i) Spending lots of time on chatting (ii) Feeling happy and excited
(iii) Feeling anxious and losing self-confidence (iv) More talkative than ever
37. What is the correct syntax to access 1 to 3 rows (both inclusive) and first 3 columns from a dataframe
Amt?
(i) Amt.iloc[1:3,0:3]
(ii) Amt.loc[1:3,0:2]
(iii) Amt.iloc[2:4,1:3]
(iv) Amt.loc[0:3,0:4]
38. Which of the following methods cannot be used to manage e-waste?
(i) Reusing and recycling e-waste
(ii) Buying environment-friendly electronics
(iii) Giving your e-waste to unauthorized recyclers
(iv) Donating your outdated technology
39. Consider the following dataframe ‘Record’.
Record

Name Marks
RollNo1 Supriya 90
RollNo2 Harshit 97
RollNo3 Abhishek 89
Identify the output of the following command:
>>>Record.T
(i) Marks Name
RollNo1 90 Supriya
RollNo2 97 Harshit
RollNo3 89 Abhishek
(ii) RollNo1 RollNo2 RollNo3
Name Supriya Harshit Abhishek
Informatics Practices with Python–XII

Marks 90 97 89
(iii) 90 Supriya
97 Harshit
89 Abhishek
(iv) None of the above
40. Suppose there are two Series UT1 and UT2
UT1 UT2
Eng 15 SSt 19
Hin 19 Comp 17
Math 17 Math 16
Sci 15 Sci 12
SSt 14 Games 18
dtype: int64 dtype: int64
Identify the output of the following command:
>>>print(UT1+UT2)
(i) Comp NaN
Eng NaN
A.6 Games NaN
Hin NaN
Math 33.0
SSt 33.0
Sci 27.0
dtype: float64
(ii)Eng 34
Hin 36
Math 33
Sci 27
SSt 32
Comp 17
Games 18
dtype: float64
(iii) Comp 17
Eng 15
Games 19
Hin 18
Math 33
SSt 33
Sci 27
dtype: float64
(iv) Comp 17
Eng 15
Games NaN
Hin NaN
Math 33.0
SSt 33.0
Sci 27.0
dtype: float64
41. While on internet, netiquette knowledge and awareness are helpful because:
(i) It helps you form favourable opinions about people you meet online.
(ii) It outlines some of the technological constraints of internet communication.
(iii) It describes the norms that lots of users already follow.
(iv) All of the above
42. Which command will be used to display fourth to eighth rows and 2nd and 3rd column values from a
dataframe Df?
(i) Df.loc[4,8:1,2] (ii) Df.iloc[3:8, 1:3] Sample Question Paper 2
(iii) Df[4:8, 1:2] (iv) Df.iloc[4:7 , 2:3]
43. Write the output of the following command?
import pandas as pd
L1= [1,2,3]
Ser1=pd.Series(L1*2)
print(Ser1)
(i) 0 1
1 2
2 3
3 1
4 2
5 3
dtype: int64

A.7
(ii) 0 1
1 4
2 9
dtype: int64
(iii) 0 11
1 22
2 33
dtype: int64
(iv) 1 1
2 4
3 9
dtype: int64
44. Deepak is working in a stationery shop where he has to store records in dataframe about products. But
he is facing some problem while creating a dataframe. Help him to create a dataframe ‘Product’ with
“Pen”,“Pencil”,“Eraser”,“Notebook” as column headings and “Qty” and “Cost” as index headings.
import pandas as pd
Qty = {'Pen': 10,'Pencil':12,'Eraser':8,'Notebooks':20}
Cost = {'Pen': 20,'Pencil':10,'Eraser':6,'Notebooks':50}
data = [Qty,Cost]
(i) Product = pd.DataFrame((Qty,Cost),columns=['Pen','Pencil',' Eraser',
'Notebooks'],index=['Qty','Cost'])
(ii) Product = pd.DataFrame(Qty,columns=['Pen','Pencil','Eraser','Notebooks'],
index=['Qty','Cost'])
(iii) Product = pd.DataFrame(Cost,columns=['Qty','Cost'],index=['Pen','Pencil',
'Eraser','Notebooks'])
(iv) Product = pd.DataFrame(data,columns=['Pen','Pencil','Eraser','Notebooks'],
index=['Qty','Cost'])
45. Which of the following is an incorrect pair?
(i) Microsoft Office: Proprietary Software
(ii) Linux: FOSS
(iii) Freeware: Adobe Reader
Informatics Practices with Python–XII

(iv) Microsoft Windows: Open-Source Software


46. Which of the following dataframe structures will be the correct Output: (2,3) when the given command
is executed?
print(Fruit.shape)
(i)
Apple Mango Orange Grapes
Order1 10 12 8 20
Order2 20 10 6 50
(ii) Apple Mango Orange
Order1 10 12 8
Order2 20 10 6
(iii) Apple Mango Orange
Order1 10 12 8
Order2 20 10 6
Order3 20 10 6
(iv)
Apple Mango
Order1 10 12
A.8 Order2 20 10
Order3 20 10
47. Identify the command from the following that will insert a new column in the 1st place named ‘E-mail’ in
dataframe Address.
Name City ContactNo
RollNo1 Parul Delhi 12345
RollNo2 Sanket U.P. 112233
RollNo3 Dhruv Delhi 222999
(i) Address.insert(loc = 1,column = 'E-mail', value =
["[email protected]",'[email protected]','[email protected]'])
(ii)Address.add(pos = 1,column = 'E-mail', index=
["[email protected]",'[email protected]','[email protected]'])
(iii)Address.append(loc = 1,Field = 'E-mail', index=
["[email protected]",'[email protected]','[email protected]'])
(iv)Address.insert(loc = 1,column = 'E-mail', index=
["[email protected]",'[email protected]','[email protected]'])
48. Consider the following dataframe ‘Stock’:
ItemName Qty Price
Product1 Iron 20.0 2000
Product2 Toaster 32.0 2500
Product3 Juicer NaN 3000

What will be the output of the following command?


Stock.Qty[‘Product3’]=10
(i) Error
(ii) ItemName Qty Price
Product1 Iron 20.0 2000
Product2 Toaster 32.0 2500
Product3 Juicer 10.0 3000
(iii) ItemName Qty Price
Product1 Iron 20.0 2000
Product2 Toaster 32.0 2500
Product3 Juicer NaN 3000
(iv) ItemName Qty Price
Product1 Iron 10 2000 Sample Question Paper 2
Product2 Toaster 10 2500
Product3 Juicer 10 3000

49. Consider the two statements:


Statement 1: When combining two dataframes, concat() function is used when structure of two dataframes
is same.
Statement 2: The join() function will raise a ValueError if column names are common in both the dataframes
when combining them.
(i) Both statements are true.
(ii) Both statements are false.
(iii) Statement 1 is true but Statement 2 is false.
(iv) Statement 2 is true but Statement 1 is false.

A.9
Section C
Case Study Based Questions
Section C consists of 6 Questions (50 to 55). Attempt any 5 questions.
Ms. Gunjan is a Python Assistant Programmer. She was given the task of creating a dataframe that included
the employees’ monthly attendance as well as their salaries. She has to perform some more operations on
this dataframe in order to prepare a report but is doubtful of the syntax for obtaining the necessary output.
Assist her in finding the correct output.
Code:
import pandas as pd
EmpNo =pd.Series(['E101','E102','E103','E104','E105'])
EName=pd.Series(['Pulkit','Suhani','Rashi','Pratibha','Vipin'])
Attnd= pd.Series([29,30,27,31,20])
Salary=pd.Series([25000,30000,42000,38000,40000])
Depart=pd.Series(['Sales','Marketing','Accounts','HR','IT'])
Data={'EmpNo':EmpNo,'EName':EName,'Attendance':Attnd,'
Salary':Salary,'Department':Depart}
Emp=pd.DataFrame(Data,columns=['EmpNo','EName','
Attendance','Salary','Department'])
Output of the above code is:
EmpNo EName Attendance Salary Department
0 E101 Pulkit 29 25000 Sales
1 E102 Suhani 30 30000 Marketing
2 E103 Rashi 27 42000 Accounts
3 E104 Pratibha 30 38000 HR
4 E105 Vipin 20 40000 IT

Based on the given information, answer question nos. 50–55.


50. She wants to set the index as EmpNo. Help her to choose the correct statement.
(i) Emp.set_index(EmpNo,inplace = True)
(ii) Emp.reset_index(EmpNo,inplace = True)
Informatics Practices with Python–XII

(iii) Emp.index(EmpNo,inplace = False)


(iv) Emp.set_index=EmpNo
51. She wants to add a new column with name ‘Leave’ that will be obtained after subtracting Attendance
from 30 days.
(i) Emp[Leave]=Emp[‘Attendance’ - 30]
(ii) Emp['Leave']= 30 - Emp['Attendance']
(iii) Emp[‘Leave’]= Emp[‘Attendance’]
(iv) 30-Emp[‘Attendance’]=Emp[‘Leave’]
52. She wants to find details of those employees who are getting salary greater than 30000. The output should
be like this.
EmpNo EName Attendance Salary Department
2 E103 Rashi 27 42000 Accounts
3 E104 Pratibha 30 38000 HR
4 E105 Vipin 20 40000 IT
Help her find the correct command.
(i) Emp[Emp['Salary']<30000]
(ii) Emp['Salary']>30000
(iii) Emp[Emp['Salary']>30000]
(iv) Emp[Emp.'Salary'>30000]
A.10
53. Now she wants to delete the column ‘Leave’ from the dataframe. Choose the right command(s) to do so:
(i) Emp.drop(['Attendance'],axis=1)
(ii) del Emp['Salary']
(iii) Emp.drop(['Attendance'],axis=0)
(iv) Both (i) and (ii)
54. Suppose there is one more dataframe Emp_detail that stores Address of the employees.
ENo EmpAddress
0 E101 Ashok Nagar
1 E102 Rohini
2 E103 Pitam Pura
3 E104 Karol Bagh
4 E105 Shalimar Bagh
She wants to create a new dataframe that will add data from these two dataframes. Help her choose the
right command.
(i) a=pd.concat(Emp,Emp_detail)
(ii) Emp.join(Emp_detail)
(iii) Emp.insert(Emp_detail)
(iv) Emp.add(Emp_detail)
55. What will be the output of the given command?

EmpNo EName Attendance Salary Department


0 E101 Pulkit 29 25000 Sales
1 E102 Suhani 30 30000 Marketing
2 E103 Rashi 27 42000 Accounts
3 E104 Pratibha 30 38000 HR
4 E105 Vipin 20 40000 IT
Emp['EName'].count()
(i) 6
(ii) 4
(iii) 5
(iv) 10

Sample Question Paper 2

A.11
A.12

You might also like