0% found this document useful (0 votes)
701 views93 pages

12 IPRevision Papers 2025

Uploaded by

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

12 IPRevision Papers 2025

Uploaded by

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

KENDRIYA VIDYALAYA SANGATHAN

AGRA REGION
FIRST PRE-BOARD EXAMINATION (2024-25)
CLASS-XII MQA �
Time: 3 Hrs Subject : INFORMATICS PRACTICES MM: 70

Instructions:
Please check this question paper contains 37 questions.
• All questions are compulsory. However, internal choices have been provided in
some questions. Attempt only one of the choices in such questions
• The paper is divided into 5 Sections- A, B, C, D and E.
· • Section A consists of 21 questions (1 to 21). Each question carries 1 Mark.
• Section B consists of 7 questions (22 to 28). Each question carries 2 Marks.
• _Section C_consists of 4 questions (29 to 32). Each question carries 3 Marks..
• Section D consists of 2 case study type questions (33 to 34). Each question 4 Marks.
• Section E consists of 3 questions (35 to 37). Each question carries 5 Marks.
• All programming questions are to be answered using Python Language only.
• In case of MCQ, text of the correct answer should also be written. ·
Q.no. Part-A Marks

I 1 State whether the_following.statement is True or False: 1


In Pandas, the head() function is used to display the last Je\:V rows of a
Series.
.
2 The GROUP BY clause in SQL is primarily used to: 1
(A) Delete rows from a table _
(B) Group rows that share the same values •
(C) Add a new column to the table
(D) Remove duplicates from the result set

3 Identify the networking device that amplifies and regenerates signals to 1


extend the distance over which data can be transmitted:
(A) Modem
(B) Hub
(C) Repeater
(D) Switch

(1) P.T.O.
Identify the SQL comman used to change name of column ina table: 1
4
'
(A) DROP TABLE '

(B) UPDATE TABLE


(C) DELETE FROM
(D) ALTER TABLE
5 Which of the following is a responsible method for disposing of e-waste? 1
(A) Burning electronic devices in an open field
(B) Throwing electronic devices in regular garbage
(C) Recycling or donating old electronic devices
(D) Storing unused electronic devices indefinitely
6 Which of the following Python statements can be used to delete a column 1
column_name from a DataFrame df?
(A) df.drop(columns=rcolumn_name1).
(B) df.remove('column_name')
(C) df.del('column_name')
(D) df.pop('column_name')
7 By default, the bar() function of Matplotlib creates a plot. 1
(A) Line
(B) Scatter
(C) Bar
(D) Area
8 State whether the following statement is True or False: 1
In SOL, the GROUP BY clause can be used without an aggregate
function to group records 'based on a specific column.
9 Which of the following Python statements is used to export a Pandas 1
DataFrame df to a CSV f le named output.csv?
(A) df.save_csv('output.csv')
(B) df.to_csv('output.csv')
(C) pd.export_csv(df, 'output.csv')
(D) df.write_csv('output.csv')

(2)
10 Which of the following actions is considered a form of plagiarism? 1
(A) Quoting someone's work with proper citation
(8) Paraphrasing text without attribution
(C) Creating original content based on research
(D) Citing sources correctly in a bibliography
11 Fill in the Blank 1
The AVG() function in SQL is used to calculate the
oaf numeric column in a relational database.
(A) Sum
(8) Maximum
(C) Average
(D) Count
12 In which of the network topologies are all devices (nodes) on the 1
network is connected to a central device, such as a hub, switch, or
router?
(A) Star
(8) Tree
(C) Mesh
(D) Bus
13 In a Pandas DataFrame, if the head() function is used without 1
specifying the optional argument indicating the number of rows to
display, what is the default number of rows displayed, considering'the
DataFrame has 40
; I

entries?
(A) 3
(8) 5
(C) 10
(0)20
14 Identify the type of cybercrime where attackers impersonate a legitimate 1
entity to deceive individuals into providing sensitive information like
usernames, passwords, credit card numbers, or other personal data.
(A) Phishing
(3) P.T.O.
(8) hacking
(C) Identity Theft
(D) Cyberstalking
15 While creating a DataFrame using a dictionary of lists, the keys of the 1-
dictionary become:
(A) Column names
(B) Row indices
(C) Values in the first row
(D) Data types of the DataFrame
16 Match the following SQL functions/clauses with their descriptions: 1
SQL Function/Clause Description
P. COUNT() 1. Filters rows based on a condition.
Q. GROUP BY 2. Groups rows sharing a property
for aggregate functions.
R. WHERE 3. Returns the number of rows in a
result set.
s. SUM() 4. Calculates the total of numeric
values in a column.
(A) P-3, Q-2, R-4, S-1
(.B) P-2, Q-1, R-3, S-4
(C) P-3, Q-2, R-1, S-4
(D) P-1, Q-3, R-2, S-4
17 What does the df.iloc[] function allow you to do in a DataFrame? 1
(A) Select rows and columns by labels
(B) Select rows and columns by integer position
(C) Filter data based on condition
(D) Rename columns in the DataFrame
18 Which Matplotlib plot is best suited to represent the distribution of data 1
into bins or ranges?
(A) Line plot
(8) Scatter plot
(C) Histogram
(D) Pie chart

(4)
19 Which type of network is designed to cover a large geographical area, 1
such as cities or countries?
(A) PAN
(B) MAN
(C) LAN
(D) WAN
Q-20 and Q-21 are Assertion (A) and Reason (R) Type questions.
Choose the correct option as:
(A)1Both Assertion (A) and-Re son (R)-are true,-and Reason (R) ;, - is
the correct explanation of Assertion (A)
(8) Both Assertion (A) and Reason (R) are true, but Reason (R) Is not
the correct explanation of Assertion (A)
(C) Assertion (A) is True, but Reason (R) is False
(D) Assertion (A) is False, but Reason (R) is True
20 Assertion (A): We-can filter rows in a DataFrame based on·a condition. 1
Reason (R): The loc □method allows for label-based indexing and
conditional filtering in Pandas. . · ,. . . , .,. ·.• , • . ,. :: ..
21 Assertion (A): In SQL,,the DELETE command is used to remove rows 1
from,a,table. , .· , - · · •" •. : ,- .,.,, · --- ,
Reason (R): The DELETE command··is a Data Manipulation Language
(DML) command. ,
Q.no. Part-8 Marks
22 (A) What is1a DataFrame•in F?ython Panda_s?,.;Explain•with·an example. 2
.:.. - .. OR-.. · ·: --- . ".::';' --.-·-..........:.:
(B) How do the head() and·tail() functions work in a Pandas Series?
23 What is data privacy, and why is it important in the digital age? 2
24 Consider the string: "Information Technology" 2
I. Write·an SQL query to extract andndisplay the word "Tech" from the
string.
It Display the position of the first ocGurrence of the word "Info" in the
given string.
25 (A)What is the role of HTTP in the World Wide Web, and how is it 2
related to the Internet?

(S) P.T.O.
OR -
(B) What is a web browser? Name some commonly used browsers, and
explain the purpose of browser settings.
26 Define the term Alternate Key in a database. Explain how it is different 2
-
from a Candidate Key.
27 How can prolonged use of digital devices impact mental health, and 2
what is one way to mitigate these effects?
28 (A) Rahul's Python program is supposed to create a DataFrame from 2
a dictionary of lists. However, his code has a few mistakes. Identify
and correct the errors:
import pandas pd
data = {'Name': [Aman, lsha, Neha], 'Age': [22, 24, 231}
df = pd.dataframe(data)
print (df)
OR
(B) Complete the given Python code to create a DataFrame with the
following output:
City Population
0 Mumbai 20400000
1 Delhi 16700000
2 Bengaluru 8400000
import as pd
data= {'City':.rMumbai', 'Delhi',' '], 'Population':
[20400000, 16700000,8400000]}
df = pd.. (data)
print('------')
Q.no. Part-C Marks
29 Rahul wants to throw away his old mobile phone, but he's not sure how 3
to do it properly.
I. What are the environmental risks of disposing of mobile phones
improperly?
II. What is one eco-friendly way Rahul can dispose of his old phone?
Ill. How does proper disposal of mobile phones benefit the environment?

(6)
30 (A) Write a Python program to create the following DataFrame using a 3
List of dictionaries:
Name Marks
Riya 85
Aman 90
lsha 78
Neha 88
OR
(B) Write a Python program to create a Pandas Series using a dictionary,
where the indices are fruits and the data are their colors as shown below:

Apple Red
Banana Yellow
Grapes Green

31 I. Write an SOL statement to create a table named EMPLOYEES with the 2+1
following specifications:

Column Name Data Type Key


'

EmployeelD Integer Primary Key ·


FirstName Varchar(30)
LastName Varchar(30)
HireDate Date
Salary Decimal(10,2)

II. Write an SOL query to insert the following data i_nto the EMPLOYEES
table:
101, John, Doe, 2015-05-20, 60000.00

(7) P.T.O
32 (A) Consider the following tables: 3-
Tables:
EMPLOYEE which stores Employee ID (EMP_ID), Employee Name
(EMP_NAME), Employee City (EMP_CITY)
PAYROLL which stores Employee ID (EMP_ID), Department
(DEPARTMENT), Designation (DESIGNATION), and Salar)(SALARY)
for various employees.
Sample Data: Table: EMPLOYEE
EMP_ID EMP_NAME EMP_CITY

1 ABHINAV AGRA
2 KABIR FARIDABAD
3 ESHA NOIDA
4 PAUL SEOUL
5 VICTORIA LONDON
Table: PAYROLL
EMP ID DEPARTMENT DESIGNATION SALARY

1 SALES MANAGER 75000


2 SALES ASSOCIATE 50000
3 ENGINEERING MANAGER 95000
4 ENGINEERING ENGINEER 70000
5 MARKETING MANAGER 65000

Write appropriate SQL queries for the following:


I. Display the total salary paid in each department.
II. List all departments in the increasing order of average salary.
111. Display employee names along with their corresponding
designations.
OR
(B) Consider the following tables:
Tables:

(8) .
1. STUDENT which stores StudentlD, Name, and Major. The table
displays basic Information of the students.
2. COURSES which stores Studentl0, CourseName, and Credits. The
table displays the courses each student Is enrolled In along with the
C'OtTespondlng credits.
Sample Data: Table: STUDENT
StudentlD Name Major

201 Alice Computer


Science
202 Bob Mathematics
203 Charlie Physics

204 Diana Computer


Science
205 Eva Mathematics

Table: COURSES
StudentlD CourseName Credits

201 Data 4
Structures
201 Algorithms 3
202 Calculus 4
203 Quantum 3
Mechanics
204 Operating 4
Systems
205 Linear 4
Algebra
205 Statistics 3
Write appropriate SQL queries for the following:
I. Display the total no. of students major wise.
II. Display the names of all students majoring In 'Mathematics' In
uppercase. Ill. Display the student names along with their corresponding
courses.
P.T.O.
(9)
Q.no. Part-D Marks

33 A student Is asked to fill In the blanks In a Python program that generates 4


a line graph showing the scores of four students In a test.
Student Test
Name Score
John 88
Sarah 92
Mike 75
Emily 85

Fill in the blanks in the code to generate the following line graph.
import as pit # Statemen\-1
r
students= John', 'Sarah', 'Mike', 'Emily1
scores= [88, 92, 75, 85)
plt.plot(students, , label='Test # Statement-2
Scores')
plt.xlabel('Student Name')
plt.
('Test Score') # Statemen 3

pit.legend()
pit.title(' ')
# Statement-4
pit.show()
I. Write the suitable code for the import statement in the blank space
in the line marked as Statement-1.
II. Refer to the code shown above and fill in the blank in Statement-2 with

suitable Python code.


.
Ill. Fill in the blank in Statement-3 with the name of the function to set the
label on the y-axis.
IV. Refer to the code shown above and fill the blank in Statement-4
with suitable Chart Title.

·
34 (A) suresh, who works as a databate designer, has developed a · 4
database for a holtwood. This database Includes a table iOVIE whose
column (attribute) names are mentioned below:
• MCOOE: Shows the unique code for each movie.
• TITLE: Indicates the movie's title.
• DIRECTOR: Specifies the director's name.
• RATING: Lists the rating of the movie (out of 10).
Table: MOVIE
MCODE TITLE DIRECTOR RATING
M001 INCEPTION CHRISTOPHER 8.8
NOLAN
M002 THE DARK CHRISTOPHER 9.0
KNIGHT NOLAN
M003 INTERSTELLAR CHRISTOPHER 8.6
NOLAN
M004 PARASITE BONG JOON-HO 8.6
MOOS THE FRANK DARABONT 9.3
-
SHAWSHANK
REDEMPTION
'

I. Write SQL query to display movie titles in uppercase.


II. Write SQL query to display the highest rating among the movies.
Ill. Write SQL query to display the number of characters in each movie
title.
IV. Write SQL query to display the Movie Code and Rating sorted by
Rating in ascending order.
OR

(B) Dr. Kavita has created a database for a supplier. The


database includes a table named SUPPLIER whose column (attribute)
names are mentioned below:
• SID: Shows the unique code for each supplier.

(1 P.T
• SUP_NAME: Specifies the supplier's name.
• CITY: Indicates the city where the supplier is located.
• PHONE: Lists the contact number of the supplier.
• JOIN_DATE: Specifies the date when the supplier wasadded.
Table: SUPPLIER
SID SUP NAME CITY PHONE JOIN_DATE
S01 Med Supplies MUMBAI 1234567890 2023-05-01
S02 HealthPlus KOLKATA 9876543210 2022-11-15
S03 PharmaDirect BENGALURU 4561237890 2023-01-10
S04 QuickMeds CHENNAI 7894561230 2023-02-05

sos CareProviders AHMEDABAD 3216549870 2022-12-20

Write the output of the following SQL Queries.


I. SELECT LENGTH(SUP_NAME) FROM SUPPLIER WHERE CITY =
'MUMBAI'·
'
II. SELECT SUP_NAME FROM SUPPLIER WHERE
MONTH(JOIN_DATE) = 1;
Ill. SELECT SUP_NAME FROM SUPPLIER WHERE SID BETWEEN
'S02' AND 'S04';
IV. SELECT MAX(JOIN_DATE) FROM SUPPLIER;
Q.no. Part-E Marks
35 XYZ Tech Solutions is expanding its operations and planning to establish 5
.two offices: Delhi Head Office and a Chennai Branch Office. The
Delhi Head Office will be divided into the following departments:
Development Marketing, Sales, and Support.
The shortest distances between the departments/offices are as follows:
• Development to Marketing: 90 meters
• Development to Sales: 110 meters
• Development to Support: 100 meters
• Marketing to Sales: 85 meters
• Marketing to Support: 95 meters
• Sales to Support: 75 meters
• Delhi to Chennal: 1500 km

(12)
The number of computers In each departmenUoffice is as follows:
• Development: 200 computers
• Marketing: 100 computers
• Sales: 50 computers
• Support: 30 computers
• Chennal Office: 60 computers
I. Suggest the most suitable department in the Delhi Head Office to
install the server. Justify your answer.
II. Draw a suitable cable layout of wired network connectivity between
the departments in the Delhi Office.
Ill. Which networking device would you suggest the company to
purchase to interconnect all the computers within a department in Delhi
Office?
IV. The company is considering establishing a network connection
between its Delhi Head Office and Chennai Branch Office. Which type of
network-LAN, MAN, or WAN-will be created? Justify your answer.
V. The company plans to develop an interactive website that will enable
its employees to track their work •progress after·logging in. Would you
recommend a static or dynamic website, and why?
36 Consider the DataFrame df shown below: 5
DataFrame: df
BooklD Title - Author Year Price
0 The Paulo Coelho 1988 499
Alchemist
1 The Da Vinci Dan Brown 2003 350
.
Code
2 ' Sapiens Yuval Noah 2011 599
Harari
3 Atomic James Clear 2018 450
Habits
4 Becoming Michelle 2018 550
Obama

Write Python statements for the DataFrame df to:

(13) P.T
I. Print the first three rows of the DataFrame df.
II. Display titles of all the books.
Ill. Remove the column Price.
IV. Display the data of the 'Title' column from indexes 1 to 3 (both
included).
V. Rename the column name 'Title' to 'Book_Title'.
37 (A) Write suitable SQL query for the following: 5
I. To display the sum of marks from the marks_obtained column
(attribute) in the Results table.
11. To display the first two characters of the product_code column
(attribute) in the Inventory table. (Note: The product codes.are stored in
the format PRD-0012345).
111. To display the data from the column (attribute) customer_name in
the Customers table, after converting the name to uppercase.
IV. To display the minimum value i_n th purchase_amount column
(attribute) of the Orders table.
V. To determine the count of unique values in the category column
(attribute) in the Products table.
OR
(8) Write suitable SQL query for the following:
I. Round the value of 22/7 to three decimal places.
II. Calculate the remainder when·1s6 is divided by 11.
Ill. Display the number of characters in the word 'Bangalore'.
IV. Display the first 6 characters from the word 'lnformatic Practices'.
V. Display details from the 'username' column (attribute) in the
'Employees' table, after removing any leading and trailing spaces.

(14)
. -- .

'&>_ Fqc hu l cl lf- tf,,a li'lfrll ·


'crcf-lt
Kendri 1
'tr yalayat Sangathan, Chennal Region
cf> / Clas: .<fl'XII · / l' Pre-Board Examination:202-:J-25
12 1
-..; J.{'q)/ M.M: 70 /Subject :-lnformatlc P·ractlces
.. General Instructions· . 3 /Period:3 Hours/ .
I. Please check thi · • ·
2. All ·. queShon paper contains 37 questions.
. i questions are compulsory How v . . h'.1 .
Attempt only one ofU h . . . c er, internal c o1ces have been provided fo some quest'
3: TJ . . . ic c o1ccs m such questions . ions.
·4_ le?aper IS d1v1ded i.nto 5 Sections• A B·c D d·E ,
Sectton A consists of21 . •.• ' an . , '•:
5. SectionB consists f7 que tions (l to 21). Each .question carries 1 Mark.
6 Sect1·0 C . . o_ questions (22 to 28): Each question carries 2 Marks.
·
•1· n consi.sts of 4 (29 32). 1

7 S t 0 ques 10ns to Each question carries 3 Marks.


. cc ion cons1sts·of 2 c , to 34). Each question carries 4 Marks.
8 SectionE .· ase stud Y type qu_estions
. (33
· All t 3 '
con tS s of questions (35 to 37). Each question carries 5 Marks. ,
9
· · _programm ng questions are to be answer d using Python Language only.
·- Q NI O. In case of MC , text'of the c·orrect answer should also be tten.
0 sect10n-A (21 x 1 =21'Marks)' Marks
1 . with: •
By default the Series indice·sstart 1
(a)I (b) 0 (c) '/\' (d) 'a'
2 Physical or logical arrangement-of network refers to a.s ,, 1
(a) routing .. (b) looping (c) topology . :.. , (d) networking·_. : ''i ,. .._

3 In column 'Margin',contains the data set (2.00,'2.00, NULL; 4.00, NULL; 3;00;3.00); 1
What will be the outp t after the execution of.the given query? · · ' ;
· SELECT AVG(Margin) from SHOP; . . ; .
(a) 2.80 (b) 2 · (c) 2.0· ,. ,· (d) error ·
4 Which of the following topologies is also_Iq10\l/Il Linear Topology?. 1
(a) Star Topology (b) Ring Topology' : (c) Bus Topology (d) N,one of th.es e .

5 Helpela·in predicting the output of the following SQL command.. , 1


. select J\13S INSTR('Informatics Practices','for')-L <?TH('Infonnatics'));
(a) -8 (b) 8 . (c).7 _· . .. (d)-7-, . ... : >-' .
6 ·write the output of the following SQL co d. 1
SELECT ROUND(25.532,-l); . y!·,
(a)25, (b)30 (c)20· .":;"\ :,':;_(d)25.5
-7, Which of the following is·not a cyber crime'l;.. ·.·. . .:..... . 1
(a) phishing (b) cyberstalking (c)-iif, ?. r: e '(d) oitlinechatting_
8 Which of the following functions returns the riu ber of rows in a DataF™:De? 1
(a) find() (b) count() (c) t O. ; ::,:::_< (d) None of these - 1
Which of the following functions is used to 4&e1e•arow from DataFrame?
9 (a) del (b) erase (c) d l tc;,. ·/··. (d) drop .
1
10 What does e..waste stand_for · · - ;·:•:·_ .
(a) Environmental waste (b) Elec!romc waste
( c) Electrical waste. . (d) Eqmpment waste
-. . -,·-
',. U!!
--..
1

1 5 Whic,?1
Ir--_a,.J-_ £M , ' °}.:. .;
foll g1 gµ_tµe > jJIJ>. - J9 plyjl,<?f;t \t l Ji .C,;;>r1'. .o
trans,emng uata irom CSV fil to·-ilieDataFrarncf?,-·; -? .------
1 -----i---, T
1
'-- -(A)-Head:=None . ,,. o1·,.• .. '._(B)'.b J;;;;True --------- - _:_: ,
I. t- . !- C column=None- i"'.ii.'eade Fals{.f1i 8 ll1:)G o.Ll J[os1 b \ tl l-
16 I . Wri_te wheth r the f llo g state t are True/F _ls'e'-'
i2j _ _ 1
1 1 ' ''' 1
While renammg a column of a Dataf,ramenYP4 qnly JJ. Joim.entjontn W.- lWMpam :
. as arametertotherreilam . function. ·,r,,, n)/'\r.')I , .) .r,i r,-.[ ( '.', - ,ir•; :rr,...·( ) t
-
. :mit is wri inga Python. rogram to. create a DataFrame usingilisfof.diclio iii s. ,
. owever, ?'s code contains some mistakes. Identify the errors, rewrite the correct co<ie 2
1
nd underline the corrections made. '
import pandas as pt
D1={'Name':'Ram','Age':32}
D2={'Name':'Sccta','Age1:27}
D3={'Name':'Shyam','Age':29}
data=[Dl,D2,D3)
df=pd.Datafmme(datn)
print(Df)
OR
Complete the given Python code to get the required output (ignore the dtype attribute) as
Output: · · · -
New Delhi New
Delhi Madhya Pradesh
Bhopal
Tripura Agartala
Code:
:. mport · _ as pd
mdx=['New Delhi','Bhopal',' ']
data=['New Delhi', 'Madhya Predesh', 'Tripura']
s=pd.Series(indx, )
rint
24 2
25 Write suitable SQL queries for the.following. 2
(a) To.display the first 3 characters, extracted from the extreme right position of the
given string 'Majlabh rat'. _ _ . . .
To dis la a substrin 'funn '.from a ·ven strin 'En tish is a funn Ian ·a e'.
26 Define_t4e_teni1 Referential Integrity in a database. Explain how it is different from a 2
Prima Ke . . ._.
27 (A) Differentiate between absolute URL and relative RL. _ 2
- - -· OR

28 List any two health hazards related to excessive use of technology and also give two point 2
- for revention of these health hazards. ' - · -· · '' ·-
Section C 4 X 3= 12 Marks
29 3
30 (A) (i) Write a Python program to create the following DataFrame using a list of 3
dictionaries. ·
COMPANY CITY
Cl MICROSOFf SAN FRANCISCO
C2 COCA-COLA NEWYORK
C3 INFOSYS BANGLORE
C4. TVS DELHI
.
"

(ii) Write command to delete CITY column without functio.n


OR . . .
. (i) Writea Python Program to create a Pandas Series as shown below_usmga dtcdttonary.
.
Not·ethat theleft column dicates the ind·ices and ht en·g ht cotumn displays the ata.
m India NewDelhi
Sri-Lanka Colombo
Nepal Kathmandu
Thimohu
.
Bhutan

n Write command to delete value at indexN.e - al. .


,,:
3

- - ·,, -
SNO TYPE-· -
ITEMNAME lPRICE .
1 Chaises 11500 ft

Living
2 Accent Chairs Living 31000 , '
3 Bnkcr Racks Kitchen 25000·
4 Sofa Living 7000
5 Nig htstand Bedroom 10000
Write SQL_queries forthe followmg. .
!:
Di plat all the records in descending order of price.
: Da play the type and total number of items of each·type.
. m. Display the average price of each type.
3
32 Consider the Following tables:
T ble I: Item which stores Product code(Pr code) Product description (Item Name)
pnce of product (Price) · .- · ' · ·
T.able 2· · Brand wh1' ch stores Product code(Pr code) and.brand narrie(Brand Name) for
vanous products. . . - . ·. -
N A · . .
ote: ttn but es names are written within brackets .. I, ,
Table: Item(Pr Code,Item Name.Price] '. . . .!·. • ,1,
Table: Brand[Pr Code, Brand Name]
Table: Item ..

.l Price
.. J
Table:Brand -
, ·pr Code Brand_Name :
Pr·code Item Name
.
P111 .Sony
Plll . ' .Television, •n .85000
•• • r

P112 Computer 62000 P112 Samsung


Washing : ' --·
P113 LG
P113 .
- Machine .
··-
34000
!

28000 Pll4 Lenovo


Pl14 Refrigerator ; ,
'65000 PllS· llyods
PllS Air Conditioner
· •
Write MySQL queries for the following:
(a) To display Pr_Code, Item_Name and corresp<;mdingBi:and...Name of those items
whose Price is between 60900 arid 85000 (both values inciuded)
(b) To display Pr_Cod , Price and Brand_Name of the item hich has an Item_Name as
'·Washing Machine'. . .
(c) To increase the price of all the·items(Item_Name) by 10% and display onacolumn

r-------_-_.. ..
· name New_Price.
-i---
OR
!
+---
I
I
.....- -----

-
;MMO
·
-
IndianAlbwns ! ;

Attribute Data Type -.- -·-·---------- --···-..··-·-----·-···-------·--•···.·-..·,


Artist info :

AlbumlD INT ..
Attribute Data Type
VARCHAR(100)
AlbumName '.

- ArtistlD INT
ArtistfD INT - VARCHAR(lOO)
ReleaseYear · INT - ArtistName
Nationality VARCHAR(50) ·
Genre VARCHAR(50) 'I

Sales OECIMAL{10, 2)
-- '-·-· ·-- -·- ---··- - --- ...... ---·-··-·.........'!' -••·

Language -
. VARCHAR(50)
. tasks: . .
· WriteSQL.queries to perfonn the following .
l. Update the 1ndiaitAlbums· table to mo ify the sales of the album with 'AlbumID'3 to
I 0 00e0le0t0e. the record of the album name.d un1·t Se" from the 'IndianAlbums' table.
l. D
. . · Section D 2X4= 08 Marks ·
33 Dunng an Olympic Games write Python d- t I t
as shown below: This bar'chartr . . cot M eo, p o a bar chart for India's medal tally 4
epresen s edal Category-rG Id' •s·r r' 'B
and Number of Medal=[20 15 18) h - o • ' ve ' ronze1
figure as •aa.jpg'. ' ' _ass own In figure. Also give code to ve the

17.5

1.5.0

,,
7.5
'I " •
s.o
2.5

o.o
Sliver Bronze
Medal,Ype

34 • ?argi, Who works as a d tabase designer, has developed a database. This database 4
mdudes table Stock whose·colunm(attrih:aite) es are mentioned belo :
PID: Shows the unique code for each product , · · .
PNAME : Indicates 'the product Name '·
. Category: Indicates the product t gory such as-Input;Output or Netw k
Qty: Indicates the quantity of product ·
Price: Indicates the price of product
PID PNAME .
Cate orv Otv Price
Pl Kevboard IO ts· 450
P2 Mouse IO 10 ·. 350
p3· Wi-Fi Router NW 5 2600
P4 . Switch NW 3 3000.
PS Mo·nitor 0 10 4500
P6- Printer 0 4· 17000
(a) Write 'SQL 'query to display product name in lowercase.
(b) Write SQL quecy to display the highest priceamong the product -.
(C) Write SQL query to display th number of characters in each product name.
(d) Write SQL quer.yto display the product code and price sorted by price in descending.
order. .
OR
Dr Divya has created a database for a hospital's phannacy. The tabase includeas table
name medicine whose column( attribute) names arc mentioned below: · ·
. MID: S ows the unique code for each
medicine Med Name:.Shows the name of
medicine
Supcity: specifies the city where the supplier is located
Stock:.indicates ihe quantity of the medici11ce available
Del Date
Stock
25.0 2024-03-24
2023-06-15
50 2023-02-10
MOJ COUOH SYRUP Chennai 135 2024-01-25
M04 INSUI;IN Bho al 180 2024-10-24
MOS IBUPROFEN Pune 60
Write the output of the following SQL queries.
(a) select length(mcd_name)-length(supp_city) from medicine where stock >l00;
(b) select Med_naf!le from medicine where month(del_date)=6;
(c) select med_name from medicine where stock between 120 and 200 order by
med_name desc;
(d) Select min(stock) from medicine·
. . J

35 Section E 3X5= 15 Marks .


Young India Corporation is a start up company. The company is planning to setup their 5
offices in India with its hub at Bangalore with its 4 blocks namely ADMIN,
a
FINANCE and SOFTWARE. You as network expert have to·suggest the b st network
related solutions for their problems raised in (i) to (v), keeping in mind the distances
between the buildings and other given parameters. ·
,Block to Block distance (in meters):
Block (From) Block Distancelin meter)
Admin Finance 60
Admin . Software 80
Admin HR 75
Fim:.nce Software 110
Finance HR 6S
Software HR- 90
Expe ted number of Computers to be instalJed in each block:
Admin · 40
Finance 35
Software l IO
HR 55
(a) Suggest·an ideal layout for connecting these blocks/centers for a wired connectivity.
(b) What will be the most appropriate block where the company should plan to install
their server?
(c) What "YiIJ be the best possible connectivity out of the following to connect the office
in BengaJuru with its London based Office? _ •
(i) Infrared · (ii) Satellite Link (iii) Et'1.emet Cable
(d)Suggest the placement of the following devices :; ·
{i) Switch/Hub
(ii) Modem · · '
(e) Which of the following wiIJ you suggest establishing an online face to face
communicat on between_the people in ADMIN office of Bangalore campus and
Head
Office?
(i) Cable TY
(ii) Email .
(iii) Vide·oconferencing
d Text chat
36 Ram desi gned the DataF
below· · .·
. rarne df th .
at contains the
temperature of different cities as shown 5

24 25.S

37
(i) To di 1 query for the following : ·
sp 5
(ii) Toremove ay the name of th e month of the current date.
(iii) T . spaces from the beginning and end of the string 'Panorama•;
o d isplay the name of the day
F orp.le, Fn·day or Sunday from your.date of birth, doh
.
exam play th t rt' •. · •
(1v) To dis . es a mgpos1tionofyourfustname(fuame)fromyourwholename(name)
mpute the remainder of division between two numbers nl and n2
"th th fl OR data.
(v) To co
ider
sale a table
sman WI e O11OWI•DI?
(B) Cons SNO SNAME .SALARY BONUS. Dateofjoin·.
AOl BeenaMehta -30000 ·300.23 I 29-10-2019
A02. KLSahav 50000 500.34 12-03-2018
B03 Nisha Thakkar 30000 400.00 18-03-2017
B04 Leela Yadav 80000 NULL 31-12-2018
cos Gautam Gola 20000 NULL 23-01-1989
C06 Trapti Garg 70000 600.37 15-06-1987
D07 Neena Sharma 50000 550.89 -18-03-1999
. L queries using SQL . . . .
. Write SQ
(1la.)o · y salesman name and bonus after roun ding o f.f to zero decu· nal places.·
1thes position of occurrence of th e s tri. ng 'ta, m
. s alesman n ames. ·
p ( u th four characters . . - name starting
from salesman . from second
.
o1· s1pya ay character.
h on h
e . . • • al
Join s esma t e m t
... . name for the date of of n.
(1 ) ay · of the weekday for the date of join of salesman.
111 D1sp the name .
. .
1

. -·....., , !->-·. · ·
_.........-. - -- :
.------ 7 I P at
··
ICES (065) Marking Scheme
iTtimefallowea:·3 Hou·rs Maximum Marks:70
lfStNol: :Answers
11' Marks
(b) 0
. •, 2 (c) topology
1
1
3 (a) 2.80 1
4 (c) Bus Topology 1
5 (b) 8 1
6 (b) 30 1
7 (d) online chatting 1
8 (c) Jen() . 1
9, (d) drop 1
10 (b) Electronic waste 1
11 (c) Lead and Mercury 1
12 1
(c) rdExam@.
13 1
(a) lineQ
14 1
(B) P-2, Q-4, R-1, S-3
1
15 (B) header-True 1
16 False 1
17 (B)o/o 1
18 (C) legend() 1
19 (C)3 1
20 (A) Both Assertion (A) and Reason (R) are true, and Reason (R) is correct explanation of
Assertion (A). 1
21 (A) Both Assertion (A) and Reason (R) are true, and Reason (R) is correct explanation of
Assertion (A). 2
22 (A) Dataframe isa two dimensional data structure in the form of rows and columns just likea
table.Features of dataframe :-
(a) Columns can be of different types i.e., It can be possible to have any kind of data
in columns like numeric, string or floating point due he!erogeneous property of
dataframe.
(b) Size of dataframe is mutable i.e. number of rows and columns can be increased
or decreased when new row/column is added or deleted from dataframe at any
time. Data can also be changed or modified at any time.
Example
import pandas as pd print(pd.DataFrame([{'a':10,'b':20},
{'a':5,'b':1 O,'c':20}]))
OR
Library:A collection of modules providi g fun_ctionalities for specific tasks.
NumPy isa Python library used for workmg with arrays.
Matplotlib :Used for creating plots 2
23 import pandas as ru!
D 1={'Name':'Ram','Age':32}
D2={'Name':'Seeta','Age':27}
D3={'Name':'Shyam','Age':29}
)

data=[D l,D2,D3 l
df=pd.Dataframe(data)
print(!!f) OR
import pandas as pd
indx=['New Delhi','Bhopal','Agartal?:] . ,
data=['New Delhi'' 'Madhya Pradesh' Tnpura]
s =pd.Series(indx,data)
print(s)

24 A digital footprint trefi h . ·


individuals . rs t e trail of data and online activities left behind by 2
o
encom ass g 1zah n , or devices on the internet and digital platforms. It
P anous digital trnces. Digital Footprints are important because·
I . Pe.rsona1 8 randing· e presence affects reput.ation and career opport·unities
on Im'
2·TPnvacy and Se.cur'ty•. o·tg·1ta1 ,r o. otpr• mts can comprom• ise sensitive information•.
3 · argete Advert1s11rn: Online activities influence personalized ads.
25 (a) select nght('Mahabharat',3); 2
(b) select substr('English is a funny language' 14.5)·
26 Refe cnti l integrity (RI) is a database conce;t tha/ensures the consistency of 2
relattonslnps between tables. It ensures that the values of foreign keys in one table
match the primary key values in another table.
Th main_diffe_rence between a primary key and referential integrity is that a primary key
umquely identifies rows in a table, while referential integrity ensures that relationships
between tables are consistent ·
27 An absolute URL contains all the infonnation necessary to locate a resource. A relative URL 2
locates a resource using an absolute URL as a starting point. Absolute URL contains complete
path whereas relative URL contains the path related to particular resource or page.
OR
Static Web Page:- A static web page is a pre-built HTML file that remains unchanged until
manually updated by a developer. The content is fixed and loaded entirely when the page
is requested.
Dynamic Web Page:- A dynamic web·page is generated in real-time by a web application
or server-side scripting language, using data from a database or external sources. The
content changes dynamically based on user interactions or updates.

28 Prolonged screen time can lead to various health issues. Here are some potential health 2
concerns Sneha may face:
Physical Health Issues: .. .
1. Eye Strain and Vision Problems: Dry eyes, ?lurre v1s10n, headaches, and mcreased
risk of myopia (nearsightedness) and hyperopia (fars1ghted?ess).
2. Musculoskeletal Disorders: Neck, back, and shoulder pam due to poor posture and
prolonged sitting.
isturbances: Disrupted circadian. rhythms, msomma,
. . .
and daytime .
·3 SIeep fatigue. ·k f · h . d. b t
D . Obesity and Sedentary Lifestyle: Incre ed ns o weigt gam, 1ae es,
4
cardiovascular disease and reduced physical fitness.
.g aines· Frequent screen time can trigger or exacerbate headaches
d
5. Hea aches an d Ml ·
and migraines.
Any two . d
1. Replace screens with aud1obooks or P? casts
2. Use blue light filtering lasses or apps
3. Practice good sleep hygiene
s
4 Limit social media use .
Engage in screen-free hobbies (e.g., painting, gardening
. )

6 Set realistic screen tim goals and track progress


7. Seek orofessional help tf nee_ded
'
one else's work ideas, or words without giving 3
(a) Plagiarism is he act of Smg om;ting from sour es, Paraphrasing without giving
29 credit. It can include: Copymg an pk own
• · one else's wor as your ·
credit, Submttt!ng ome fO technology to harass, threaten, embarrass, or target anothe.r
(b) Cyberbullymg ts the use gressive or rude texts, tweets, posts, or messages all
erson. Online threat andmean, a nformati n, pictures, or videos designed to hurt or
P 1
count. S0 does posting persona t
b ass someone else.
em
- _,, ,·•
-.,_ ,r. ...

Free and o
- : ,1

Foss stancts for


(c) 'b S
c_an e used, studied, modifie pen our e oftware.. It's a term that refers to software tha
1censes are distribution tenn/;h: ! redt'5tbut:d without paying the author a fee. FOS
30 import pandas as pd ran t ese rights to users.
(i) dl-{'COMPANY'·[' 3
'CITY''['SAN FRA. MICROSOFT','COCA-COLA','INFOSYS' 'TVS']
df=: d ' ◄ NCISCO\'NEWYORK','BANOLORE' 'DELHI']} '
:-P .DataFrame(d I ,index=['C I' 'C2' 'C3' 'C4']) '
pnn dQ ' ' '
(ii) de! dft'CITY']
. . OR
(1) import pandas as pd
d2={'lndia::'New Delhi','Sri-Lanka':'Colombo','Nepal':'K.athmandu','Bhutan':'Thimphu'}
S1=pd.Senes(d2)
print(Sl)
(ii) S1=S l.droo('Nepal')
31 :.i. select * from Item order by price desc;
11. select type, count(*) from item group by type;
iii. select type, avg(price) from item group by tvoe;
32 (a) select item.Pr_code,ltem_name,brand_name from item,brand
where item.Pr_code=brand.Pr_code and price between 60000 and 85000;
(b) select item.Pr_code,price,brand_name from item,brand
where item.Pr_code=brand.Pr_code and item_name='Washing Machine';
(c) select ltem_name,price+(price*.10) "New Price" from item;
OR
1.Update the sales of the album with 'AlbumID' 3:
UPDATE IndianAlbums
SET Sales = 1000000
WHERE AlbumID = 3;

2.Delete the record of the album named "Dil Se":


DELETE FROM IndianAlbums
WHERE AlbumName == 'Oil Se';

3.Alter the table structure to add a new column "Language":


ALTER TABLE IndianAlbums
ADD Language VARCHAR(S0);

4. Select all albums released in the year 1990 or later:


SELECT I.AlbumName, I.ReleaseYear, I.Genre, A.ArtistName
FROM IndianAlbums I,Artist_Info A
WHERE I.ReleaseYear>- 1990 and 1.ArtistlD = A.ArtistlD;
33 import matplotlib.pyplot as pit
Category==['Gold','Silver','Bronze']
Medal=[20,15,18]
pit.bar(Category ,Medal)
plt.ylabel('Medal')
plt.xlabel('Category')
plt.title('lndian Medal tally in Olympics')
pit.show()
plt.savefig("aa. jpg")
34 (a) select lcase(Pname) from stock;
Or
select lower(Pname) from stock;
(b) select max(price) from stock;
(c) select pname,lemrth(pname) from stock;
( d) select pid,price from stock order by . d
price esc;
(a) +--------------- Or
I Iength(med_n --------------- +
'+ ame)-length(su; = i;;)-I
+
I I 1
I I I
I
+-------------------+
(b) + +
I Med name I
+ +
I Paracetamol I
+--------+
( C) + +
I med_name I
+--------+
I Insulin I
ICough syrup I
+ +
(d) + +
I min(stock) I
+-----------------+
I so I
+------------------+
35 (a) Any layout which connect all the blocks ADMIN, HR, FINANCE and SOFTWARE
(b) Software block as it has maximum number of computer
(c) Sateliite Link as distance is too large
(d) Switch/Hub should be in all the blocks and modem should be installed in the Software block.
(e) Video Conferencin(!
36 (a) print(df.size)
(b) df[0:2] or df.loc[0:l] or df.iioc[0:2]
(c) df=df.drop(3,axis=0) or df.drop(3,axis=0,inplace=True)
(d) df.Ioc[3]=['Kolkata',28,I 9,24,20.l]
(e) df.rename(columns=f'City':'Green City'},inplace=True)
37 (A)
(i) select monthname(now());
(ii) select trim(' Panorama ');
(iii) select dayname('1985-09-10');
(iv) select instr('dinesh kumar sharma','dinesh'); or select instr(name,fname);
(v) select mod(l2,5); or select mod(nl,n2);
OR
(B)
(i) Select SName,round(Bonus,0) from salesman;
(ii) Select instr(SName, 'ta') from salesman;
(iii) Select mid(SName,2,4) from salesman;
Or
Select substring(SName,2,4) from salesman;
(iv) Select monthname(Dateofjoin) from salesman;
(v) Select davname(Dateofioin) from salesman;
अनुक्रम ांक/ROLL NO सेट/SET : 01

कें द्रीय विद्य लय सांगठन ,जयपुर सांभ ग


KENDRIYA VIDYALAYA SANGATHAN, JAIPUR REGION
प्रथम प्री बोर्ड परीक्ष / 1ST PRE BOARD EXAMINATION :2024-25
कक्ष / CLASS :XII
विषय / SUB : Informatics Practices(065)
अविकतम अिवि / Time Allowed :03 Hours अविकतम अांक Maximum Marks : 70

स म न्य वनर्देश / General Instructions:


1. Please check this question paper contains 37 questions.
2. All questions are compulsory. However, internal choices have been provided in
some questions. Attempt only one of the choices in such questions
3. The paper is divided into 5 Sections- A, B, C, D and E.
4. Section A consists of 21 questions (1 to 21). Each question carries 1 Mark.
5. Section B consists of 7 questions (22 to 28). Each question carries 2 Marks.
6. Section C consists of 4 questions (29 to 32). Each question carries 3 Marks.
7. Section D consists of 2 case study type questions (33 to 34). Each question carries
4 Marks.
8. Section E consists of 3 questions (35 to 37). Each question carries 5 Marks.
9. All programming questions are to be answered using Python Language only.
10. In case of MCQ, text of the correct answer should also be written.

Q No. Section-A (21 x 1 = 21 Marks) Marks


1 State whether the following statement is True or False: 1
A pandas DataFrame can contain homogenous data only.
2 The purpose of the GROUP BY clause in a SQL statement is to: 1
(A) Filter rows based on a condition
(B) Group rows that have the same values in specified columns
(C) Sort the result based on a column
(D) Specify the columns to be displayed
3. The primary function of a modem in a computer network is to: 1
(A) Amplify the network signal
(B) Connect multiple computers within a local network
(C) Convert digital signals to analog signals and vice versa
(D) Route data packets between networks
4. Which of the following SQL queries is used to retrieve rows from the "customers" 1
table where the "email" column contains NULL values?
(A) SELECT * FROM customers WHERE email = NULL;
(B) SELECT * FROM customers WHERE email IS NOT NULL;
(C) SELECT * FROM customers WHERE ISNULL(email);
(D) SELECT * FROM customers WHERE email IS NULL;

Page 1 of
5. Which of the following is a responsible way to manage e-waste? 1
(A) Disposing of electronic devices in landfills
(B) Incinerating old electronic devices
(C) Recycling or refurbishing electronic devices
(D) Storing unused electronic devices in storage rooms

6. Find the output of the following python code:- 1


import pandas as pd
df = pd.DataFrame({'KVs': ['KV1', 'KV2', 'KV3', 'KV4', 'KV5']})
print(df.head(-2))

(A) (B) (C) (D)


KVs KVs KVs
0 KV1 0 KV1 0 KV1 Error
1 KV2 1 KV2 1 KV2
2 KV3 2 KV3
3 KV4
4 KV5

7. Which is the correct import statement to import pyplot? 1


(A) import pyplot.matplotlib as plt
(B) import pyplot from matplotlib
(C) import matplotlib.pyplot as plt
(D) None of the above
8. State whether the following statement is True or False: 1
"In SQL, the DELETE command removes rows from a table along with its table
structure.
9. What is the default separator (delimiter) when reading a CSV file using 1
pd.read_csv() in Pandas? (Note: pd is an alias for pandas)
A) Semicolon (;)
B) Comma (,)
C) Tab (\t)
D) Pipe (|)
10. Master Raj , class XII student, writes a book titled "All round development in KVS". 1
What type of intellectual property protects his rights as the author of the book?
A) Trademark
B) Patent
C) Copyright
D) Trade secret
11. The query SELECT department, SUM(salary) FROM employees 1
department; will return the total salary for each department.
A) GROUP BY
B) ORDER BY
C) HAVING
D) WHERE
12. In a bus topology, what happens if the main cable (the backbone) fails? 1
A) Only the devices connected after the break stop working
B) The entire network fails
C) Devices continue to communicate through secondary routes
D) Only the central device fails

Page 2 of
13. DF-- DataFrame 1

What will be the output of DF.loc[1, 'Name']?


(A) Priya
(B) Ramesh
(C) Anjali
(D) 1, Name
14. A KV teacher receives an email claiming to be from their bank, asking them to click 1
a link and update their personal information. This is an example of which type of
cybercrime?
A) Phishing
B) Hacking
C) Ransomware
D) Spyware
15. Which of the following is a one-dimensional array containing a sequence of values 1
in Python ?
A) Relation
B) DataFrame
C) Series
D) Square
16. Match the following SQL functions with their purpose: 1

SQL Function Description


P. COUNT() 1. Finds the position of a substring
Q. CONCAT() 2. Returns the total number of rows
R. INSTR() 3. Return the length of the string,
S. LENGTH() 4. Adds two or more expressions/strings together

(A) P-1, Q-2, R-3, S-4


(B) P-2, Q-1, R-3, S-4
(C) P-2,Q-4, R-1, S-3
(D) P-4, Q-2, R-1, S-3
17. Which of the following can be used to specify the data while creating a DataFrame? 1
(A) Dictionaries
(B) Series
(C) ndarrays
(D) All of the above

Page 3 of
18. Which Matplotlib plot is best suited to represent changes in data over time? 1
(A) Bar plot
(B) Histogram
(C) Line plot
(D) Histogram & Bar plot
19. Mr. Ram , a computer science teacher wants to transfer data between their 1
smartphone and laptop using Bluetooth in computer lab. Which type of network
would this fall under?
A) PAN
B) LAN
C) WAN
D) MAN
Q-20 and Q-21 are Assertion (A) and Reason (R) Type questions. Choose the
correct option as:
(A) Both Assertion (A) and Reason (R) are true, and Reason (R) is the
correct explanation of Assertion (A)
(B) Both Assertion (A) and Reason (R) are true, but Reason (R) is not the correct
explanation of Assertion (A)
(C) Assertion (A) is True, but Reason (R) is False
(D) Assertion (A) is False, but Reason (R) is True
20. Assertion (A):- DataFrame has both a row and column index. 1
Reasoning (R): - A DataFrame is a two-dimensional labelled data structure like a
table of MySQL.

21. Assertion (A): The CREATE TABLE command is used to add new rows to an 1
existing table in SQL.
Reason (R): The CREATE TABLE command defines the structure of a new table,
including its columns and data types.
Q No. Section-B (7 x 2 = 14 Marks) Marks
22. (A).What are the difference between Series and Dataframe. Write any two 2
differences.
OR

(B). What does the term 'library' signify in Python? Mention one use for each of
the following libraries:
• NumPy
• Matplotlib
23. What do you mean by FOSS ? Name any two free and open source software. 2

24. A string is given as “Humpty Dumpty”. Write suitable SQL queries for the following: 2
I. Count how many characters are there in above string.
II. Display above string in uppercase ."
25. (A). Explain the role of a web browser in accessing the internet ? Write any 2 names 2
of web browsers.
OR
(B). What do you mean by webpage ? How is static web pages differ from the
dynamic webpages.

Page 4 of
26. Distinguish between primary key and candidate key with example. 2

27. As a student , what two advice you should give to other student for e-waste 2
disposal ?
28. (A). Parul , class XII student , writes a Python program to create a DataFrame. 2
However, her code contains some mistakes. Identify the errors, rewrite
the correct code, and underline the corrections made.
import pantas as pd
Rollno= [1101, 1102,1103]
Name= ['Teena', 'Jay’, 'Rishi']
Age=[26,27,35]
Final= [Rollno, Name, Age]
df= pdf.DataFrame(Final, INDEX= ['Stud1', 'Stud2', 'Stud3'])
print(DataFrame)

OR
(B) Complete the given Python code to get the required output (ignore the
dtype attribute) as

Output:
Jan 31
Feb 28
Mar 31
Apr 30

Code:-
pandas as pd
Month_Day = pd. ({'Jan': 31, 'Feb':28, 'Mar':31, ' ':30})
print( )

Section-C (4 x 3 = 12 Marks)
Q No Marks
29. Bharti received a message that she needs to update the KYC for her Bank
3
Account therefore she should upload her Aadhar Card, Bank Account Number and
the OTP on the link given in her message. Answer the following questions :

(i) Is it safe for Bharti to upload her Aadhaar card, bank account number, and
OTP on the link provided in the message?
(ii) Why is it important for Bharti to immediately contact her bank to verify
the authenticity of the message?
(iii) What type of cyber crime is being committed in the message Bharti
received, where she is asked to upload sensitive information?
30. (A). Write a Python program to create the following DataFrame (Student).
3

Page 5 of
Name English Maths Physics
0 aparna 80 70 50
1 pankaj 78 18 48
2 sudhir 59 59 69
3 Aditya 76 66 96

OR
(B). Write a Python Program to create a Pandas Series as shown below using a
dictionary. Note that the left column indicates the indices and the right column
displays the data.
Virat Kohli Ckricket
Neeraj Chopra javelin throw
Mary Kom Boxing

31. I. Write an SQL statement to create a table named Employee, with the
2+1=3
following specifications:

Column Name Data Type Key


Emp_ID Integer Primary Key
Emp_Name Varchar(20) Not Null
Department Varchar(15)
Increment_Date Date
Salary Int(7)

II. Write SQL Query to insert the following data in the Employee
able 1001, Rajesh, Sales, 2024-12-10, 75000
32. (A) . Consider the following tables:
3
Table 1:
Flights which stores Flightid, model and company
Table 2:
Booking which stores Ticket number (Ticketno), passenger name(passenger),
source , destination, quantity, price and Flightid

Table: Flights

Flightid model company


10 747 Boeing
12 320 Airbus
15 767 Boeing

Page 6 of
Table: Booking
Ticketno passenger source destination quantity price Flightid
10001 AJAY BAN DELHI 2 7000 10
10002 RIYA BAN KOLKATA 3 7500 12
10003 MOHAN DEL MUMBAI 1 6000 15
10004 RISHI MUM KOLKATA 2 5600 12
10005 VIJAY MUM DELHI 4 5000 10
a) Write a query to count flights booking source wise.
b) Increase 10% fare of those flight booking whose destination is Delhi
c) Display Passenger name , source , model and company from the table flights
and booking for the matching rows.
OR
(B). Consider the following tables:
Table 1:
Table: Stationary , which stores stationary id (S_ID), Stationary
Name(StationaryName), Company and Price
Table 2:
Consumer, which stores Consumer id (C_ID), Consumer_Name , Address and
stationary id (S_ID)
Table:- Stationary

S_ID StationaryName Company Price


DP01 Dot Pen ABC 10
PL02 Pencil XYZ 6
ER05 Eraser XYZ 7
PL01 Pencil CAM 5
GP02 Dot Pen ABC 15
Table:- Consumer
C_ID Consumer_Name Address S_ID
1 Rajat Delhi PL01
6 Mohini Mumbai GP02
12 Ragini Delhi DP01
15 Anil Delhi PL02

I. Display stationary wise average Price


II. Display length of those consumer name who are residing in Delhi
III. Display the stationaryname along with their consumer name

Q No Section-D (2 x 4 = 8 Marks) Marks

Page 7 of
33. Bharti a class XII (IP) student has to fill in the blanks in Python programs that
4
generate a bar chart. This bar chart calculate subject wise result analysis.

Subject Percentage
ENGLISH 85
ACCOUNTS 98
BST 70
ECONOMICS 82
IP 100
Help Bharti to complete the code

import as plt #Statement-1


Subject=['ENGLISH','ACCOUNTS','BST','ECONOMICS','IP']
Percentage=[85,98,70,82,100]
plt.bar( , Percentage) #Statement-2
plt. ("SUBJECTS") #Statement-3
plt.ylabel("PERCENTAGE")
plt.title(‘ ’) #Statement-4
plt.show()
plt.savefig('Result.png')

I. Write the suitable code for the import statement in the blank space in
the line marked as Statement-1.
II. Refer to the graph shown above and fill in the blank in Statement-2
with suitable Python code.
III. Fill in the blank in Statement-3 with the name of the function to set
the label on the x-axis.
IV. Refer the graph shown above and fill the blank in Statement-4
with suitable Chart Title.

Page 8 of
34. (A) Sachin, who works as a database designer, has developed a database for a
4
Sport club. This database includes a table Sportsclub whose column
(attribute) names are mentioned below:

Playerid: Shows the player id.


Pname: Shows Player name.
Sports: Specifies the player’s sport.
Country: Lists the player’s Country
Rating:- List the rating of the player
Salary:- Displays the salary of the
players
Table: Sportsclub

Playerid Pname Sports Country Rating Salary


10001 PELE SOCCER BRAZIL A 50000
10002 FEDERER TENNIS SWEDEN A 20000
10003 VIRAT CRICKET INDIA A 15000
10004 SANIA TENNIS INDIA B 5000
10005 NEERAJ JAVELIN THROW INDIA A 12000

10006 Ronaldinho SOCCER BRAZIL A 8000

I. Write a query to display player’s name in the lower case of those player
whose country is India
II. Display sum of salary sports wise.
III. Write a query to display unique sport name.
IV. Display all the details of Indian player who got A rating in sportclub

OR

(B). Ranjana has created a database for employee management . The database
includes a table named Employee whose column (attribute) names are
mentioned below:
EMPNO: Shows the unique employee number for each employee.
NAME: Specifies the employee name
DOJ: Specifies the joing date of employee.
SALARY: Shows the salary of the employee.
CITY: Shows the city of the employee.

Page 9 of
Table: EMPLOYEE

EMPNO NAME DOJ SALARY CITY


5001 SUMIT SINGH 2012-05-24 55000 JAIPUR
5002 ASHOK SHARMA 2015-10-25 65000 DELHI
5003 VIJAY SINGH 2009-09-09 85000 JAIPUR
5004 RAKESH VERMA 2020-12-21 60000 AGRA
5006 RAMESH KUMAR 2011-01-22 72000 DELHI

Write output of the following SQL queries:


I. SELECT NAME, LENGTH(NAME) FROM EMPLOYEE WHERE SALARY>65000;
II. SELECT NAME FROM EMPLOYEE WHERE MONTH(DOJ)=12;
III. SELECT NAME, SALARY FROM EMPLOYEE WHERE NAME LIKE ‘_A%’;
IV. SELECT SUBSTR(NAME, 2,4) FROM EMPLOYEE WHERE CITY
<> ‘JAIPUR’ ;

Q No. Section-E (3 x 5 = 15 Marks) Marks


35. Gagan Infotech has a head office in Delhi. Now company wants to set up their 5
computer network in the Jaipur based campus having four buildings. Each block
has a number of computers that are required to be connected for ease of
communication, resource sharing and data security. You are required to suggest
the best answers to the questions (i) to (v) keeping in mind the building layout on
the campus.
Number of Computers.

Block Distance
Development to HR 50m
Development to Admin 75m
Development to Logistics 120m
HR to Admin 110m
HR to Logistics 50m
Admin to Logistics 75m
Distance Between the various blocks

Block Number of computers


Development 100
HR 120
Admin 200
Logistics 110

Page 10 of
i) Suggest the most appropriate block to host the Server. Also
justify your choice.
ii) Draw a suitable cable layout of wired network connectivity
between the departments in the Jaipur Office..
iii) Suggest the placement of the following device with justification:
a)Repeater b) Hub/Switch
iv) Suggest a system (hardware/software) to prevent unauthorized access
to or from the network.
v) Suggest the high-speed wired communication medium between
Jaipur Campus and Delhi campus to establish a data network.

36. Consider the following DataFrame, DF


5

Rollno Name Class Section CGPA

0 1 Geeta IX E 8.7
1 2 Preeti X F 8.9
2 3 Ravi IX D 9.2
3 4 Lakshay X A 9.4

I. Add a new column ‘Stream’ to the Dataframe with values

(Science, Commerce, Arts, Science.)

II. Add a new row with values ( 5 , Rajesh ,X, F , 9.8, Science)

III. Print no of rows and columns in DataFrame DF


IV. Delete row for rollno 2.

V. Display record of Ravi in DF DataFrame

Page 11 of
5
37 (A). Write suitable SQL query for the following:
I. Display 5 characters extracted from 3th left character onwards from

the string ‘EK BHARAT SHRESHTHA BHARAT’.

II. Display the position of occurrence of string ‘GREATEST’ in the

string ‘INDIA IS THE GREATEST COUNTRY.

III. Round off the value 453.668 to two decimal place.

IV. Display how many records are there in the Employee table.

V. Display Sum of Salary in the Salary column (attribute) in the Employee table.

OR

(B). Write suitable SQL query for the following:

I. Display 5 characters extracted from 4th left character onwards from the

string ‘INFORMATICS PRACTICES’ .

II. Display the position of occurrence of string ‘DUMPTY’ in the string

‘HUMPTY DUMPTY SAT ON A WALL’.

III. Round off the value 45.1876 to one decimal place.

IV. Display the remainder of 77 divided by 4.

V. Remove all the expected leading and trailing spaces from a

column student_name of the table ‘ result ’.

Page 12 of
के न्द्रीय विद्यालय संगठन, जयपुर संभाग
Kendriya Vidyalaya Sangathan, Jaipur Region
बोर्ड पूिड परीक्षा-1 2024-25
Pre-board-1 Exam 2024-25
कक्षा/Class: XII विषय/Subject: Informatics Practices(065)
समय/Time: 3 Hours पूर्ाड क /Max. Marks: 70

Marking Scheme- SET 01


Q No. Section-A Marks
1 False 1

(1 mark for correct answer)

2 (B) - Group rows that have the same values in specified columns. 1
(1 mark for correct answer)

3. (C) - Convert digital signals to analog signals and vice versa. 1

(1 mark for correct answer)

4. (D) - SELECT * FROM customers WHERE email IS NULL; 1


(1 mark for correct answer)

5. (C) - Recycling or refurbishing electronic devices. 1

(1 mark for correct answer)


6. (A) - 1

KVs
0 KV1
1 KV2
2 KV3

( 1 mark for correct answer)


7. 1
(C) - import matplotlib.pyplot as plt

(1 Mark for correct answer)


8. 1
False
(1 Mark for correct answer)
9. 1
(B) - Comma (,)

(1 mark for correct answer)


10. 1
(C) – Copyright

(1 mark for correct answer)


11. 1
(A) - GROUP BY

(1 mark for correct answer)


12. 1
(B) - The entire network fails.

(1 mark for correct answer)


13 1
(B)- Ramesh
(1 mark for correct answer)

14. 1
(A) – Phishing
(1 mark for correct answer)

15. 1
(C) – Series

(1 mark for correct answer)


1
16. (C) P-2,Q-4, R-1, S-3

(1 mark for correct answer)


1
17. (D) - All of the above

(1 mark for correct answer)


18. 1
(C) - Line plot

(1 mark for correct answer)


19. 1
(A) - PAN

(1 mark for correct answer)


20. 1
(A) . Both Assertion (A) and Reason (R) are true, and Reason (R) is the correct
explanation of Assertion (A)

(1 mark for correct answer)


21. 1
(D). Assertion (A) is False, but Reason (R) is

True (1 mark for correct answer)

Q No. Section-B (7 x 2 = 14 Marks) Marks


2
22. (A) Series DataFrame
One-dimensional Two-dimensional

Series has a single column. DataFrame can store multiple


columns
Size Immutable Size Mutable

(1 mark for each correct difference as above or similar difference)

OR
(B) Library: A collection of modules providing functionalities for specific tasks.
NumPy :-Used for numerical operations.
Matplotlib: Used for data visualization/ Used for creating plots
(1 mark for correct definition)
(1/2 mark each for correct use of each library)

23. 2
FOSS (Free and Open Source Software) refers to software that is both freely
available and open source, meaning that anyone can use, modify, and distribute it.

Examples:- Linux, MySQL , Apache, GIMP

(1 mark for correct definition)


(1/2 mark for each correct open source software name)

24. I. SELECT LENGTH('Humpty Dumpty'); 2

II. SELECT UPPER('Humpty Dumpty');

(1 mark for each correct query)


25.(A)
A web browser fetches and displays content from the internet in a user-friendly 2
way. Web browser names :- Google Chrome, Mozilla Firefox, Apple Safari,
Microsoft Edge, Opera etc.

(1 mark for correct role)

(1/2 mark each for each correct web browser name above or any other web
browser name) )

OR

(B) A webpage is a document that is displayed on the internet using a web browser.
It can contain text, images, videos, links, and other multimedia elements.
Difference:- In static web pages, pages will remain same until someone
changes it manually and information changes rarely.
Dynamic web page: In dynamic web pages, content of pages are different for
different visitors and information change frequently.
(1 mark for correct definition)
(1 mark for correct difference)

26. 2
Primary key :- It uniquely identifies records or rows in a table . There can only be
one primary key per table.
Candidate key:- All attributed combination in a relation (table) that can be served
as primary key.
Table:- Student

Rollno Name Admno Phoneno

1201 Ajay 101 9876543210

1202 Riya 102 9123456789


1203 Ajay 103 9234567890

Primary Key:- Rollno can be selected as primary key

Candidate Key :- Rollno, Admno, and Phoneno are unique for each student,
making all three eligible to be candidate keys.

(1 mark for correct difference)


(1/2 for each correct example)
27. 1. Recycle e-waste responsibly 2
2. Donate your old electronic devices to your friend

(1 mark for each correct advice)

Corrected code 2
28.(A)
import pandas as pd
Rollno= [1101, 1102,1103]
Name= ['Teena', 'Jay', 'Rishi']
Age=[26,27,35]
Final= [Rollno, Name, Age]
df= pd.DataFrame(Final, index= ['Stud1', 'Stud2', 'Stud3'])
print(df)

Changes Made :
i. Changed pantas to pandas.
ii. Corrected mismatched pdf to pd
iii. Corrected capital letter INDEX to index
iv. Correct print statement DataFrame to df

(1/2 mark for each correct correction and underlining)

OR
import pandas as pd
(B)
Month_Day = pd.Series({'Jan': 31, 'Feb':28, 'Mar':31, 'Apr':30})
print(Month_Day)
(1/2 mark for each correct fill in the blank)

Q No Section-C (4 x 3 = 12 Marks) Marks

29 3
(i) No, it is not safe for Bharti to upload her Aadhaar card, bank account
number, and OTP on the link provided in the message. This could
be part of a scam or phishing attempt to steal her personal and
financial information.
(1 mark for correct answer)
(ii) It is important for Bharti to immediately contact her bank to verify the
authenticity of the message because it could be a phishing attack
designed to steal her identity and financial details.
(1 mark for correct answer)
(iii) Phishing
(1 mark for each correct answer)
30. (A) import pandas as pd 3

Student = {'Name': ['aparna', 'pankaj', 'sudhir', 'Aditya'],


'English': [80, 78, 59, 76],
'Maths': [70, 18, 59, 66],
'Physics': [50, 48, 69, 96]}
df = pd.DataFrame(Student)
print(df)
(1 mark for correct import statement)
(1 mark for correct dictionary creation)
(1 mark for correct creation of DataFrame)
OR

import pandas as pd

(B) Sport = {'Virat Kohli': 'Cricket', 'Neeraj Chopra': 'Javelin Throw', 'Mary Kom':
'Boxing'}

My_Series = pd.Series(Sport)

print(My_Series)

(1 mark for correct import statement)

(1 mark for correct dictionary)

(1 mark for correct creation of Series)

31. 3
(I)
CREATE TABLE
Employee (
Emp_ID INTEGER PRIMARY KEY,
Emp_Name VARCHAR(20) NOT NULL,
Department VARCHAR(15),
Increment_Date DATE,
Salary INT(7)
);
(2 mark for correct creation of Table)

(II) INSERT INTO Employee VALUES (1001, 'Rajesh', 'Sales', '2024-12-10',


75000);

(1 Mark for correct insert Query)


3
32.(A) a) SELECT source, COUNT(*) FROM Booking
GROUP BY source;
(b) UPDATE Booking
SET price = price+ (price * 0.10)
WHERE destination = 'DELHI';
(c) SELECT passenger, source, model,
company FROM Booking B, Flights F
WHERE B.Flightid = F.Flightid;

(1 mark for each correct query)


OR

(B) (I) SELECT StationaryName, AVG(Price) FROM

Stationary GROUP BY StationaryName;

(II) SELECT Consumer_Name, LENGTH(Consumer_Name) FROM


Consumer WHERE Address = 'Delhi';

(III) SELECT StationaryName, Consumer_Name

FROM Stationary S, Consumer C

WHERE S.S_ID = C.S_ID ;

or

SELECT StationaryName, Consumer_Name

FROM Stationary , Consumer

WHERE Stationary.S_ID = Consumer.S_ID ;

(1 mark for each correct query)


Section-D (2 x 4 = 8 Marks)
Q No. Marks

33 I. matplotlib.pyplot 4

II. Subject
III. xlabel
IV. SUBJECTWISE RESULT ANALYSIS
1 mark for each correct answer)
34. (A) 4
I. SELECT LOWER(Pname) FROM Sportsclub
WHERE Country = 'INDIA';
II. SELECT Sports, SUM(Salary) FROM Sportsclub
GROUP BY Sports;
III. SELECT DISTINCT (Sports) FROM Sportsclub;
IV. SELECT * FROM Sportsclub
WHERE Country = 'INDIA' AND Rating = 'A';

(1 mark for each correct answer)


OR
(I)
(B)
NAME LENGTH(NAME)

VIJAY SINGH 11

RAMESH KUMAR 12

(II)
NAME
RAKESH VERMA

(III)
NAME SALARY
RAKESH VERMA 60000
RAMESH KUMAR 72000

(IV)
SUBSTR(NAME, 2,4)
SHOK
AKES
AMES
1 mark for each correct output)

Section-E (3 x 5 = 15 Marks)
Q No. Marks

35 (I) The server should be installed in the Admin block as it has the most 5
number of computers and It will increase the efficiency of the network.
(1 mark for correct answer)
(II) Cable layout

(III)

(1 mark for correct cable layout)

(III) (a) Repeater:- Between HR and Admin block because the distance is

more than 100m.

(b) Switch/Hub:- in all the blocks since the computers need to be

connected to the network.


(1/2 mark for each correct answer)

(IV) Firewall
(1 mark for correct answer)

(V) Optical Fiber cable connection.


(1 mark for each correct answer)

36. (I) DF['Stream'] = ['Science', 'Commerce', 'Arts', 'Science'] # DF- DataFrame Name
5
(II) DF.loc[4] = [5, 'Rajesh', 'X', 'F', 9.8, 'Science']

Or

new_row = {'Rollno': 5, 'Name': 'Rajesh', 'Class': 'X', 'Section': 'F', 'CGPA':


9.8, 'Stream': 'Science'}

DF = DF.append(new_row, ignore_index=True)

(III) print(DF.shape)

(IV) DF=DF.drop([1])

(V) ravi_record = DF[DF['Name'] ==


'Ravi'] print(ravi_record)
or print(DF.loc[2:2]) or any oher suitable answer

(1 mark for each correct answer)


37.(A) 5
(I) SELECT SUBSTRING('EK BHARAT SHRESHTHA BHARAT', 3, 5);

(II) SELECT INSTR('INDIA IS THE GREATEST COUNTRY', 'GREATEST');

(III) SELECT ROUND(453.668, 2);

(IV) SELECT COUNT(*) FROM Employee;

(V) SELECT SUM(Salary) FROM Employee;

(1 mark for each correct query)

OR

(B) (I) SELECT SUBSTR('INFORMATICS PRACTICES', 4, 5);

(II) SELECT INSTR('HUMPTY DUMPTY SAT ON A WALL', 'DUMPTY');

(III) SELECT ROUND(45.1876, 1);

(IV) SELECT MOD(77, 4);

(V) SELECT TRIM(student_name) FROM result;

(1 mark for each correct query)


अनुक्रम ांक/ROLL NO

कें द्रीय विद्य लय सांगठन ,जयपुर सांभ ग


KENDRIYA VIDYALAYA SANGATHAN, JAIPUR
REGION PRACTICE SET – 02
कक्ष / CLASS :XII
विषय / SUB : Informatics Practices(065)
अधिकतम अिधि / Time Allowed :03 Hours अधिकतम
Maximum Marks : 70
अक

स म न्य ननर्देश / General Instructions

1. Please check this question paper contains 37 questions.


2. All questions are compulsory. However, internal choices have been provided in some
questions. Attempt only one of the choices in such questions
3. The paper is divided into 5 Sections- A, B, C, D and E.
4. Section A consists of 21 questions (1 to 21). Each question carries 1 Mark.
5. Section B consists of 7 questions (22 to 28). Each question carries 2 Marks.
6. Section C consists of 4 questions (29 to 32). Each question carries 3 Marks.
7. Section D consists of 2 case study type questions (33 to 34). Each question carries
4 Marks.
8. Section E consists of 3 questions (35 to 37). Each question carries 5 Marks.
9. All programming questions are to be answered using Python Language only.
10. 10. In case of MCQ, text of the correct answer should also be written.

Q.No SECTION-A Marks


1. State whether True or False: 1
Boolean Indexing helps us to select the data from the DataFrames using a
boolean vector.
2. In column “Margin “contains the data set(4,NULL,NULL,12). What will be the 1
output of after the execution of the given query?
SELECT AVG(Margin) FROM SHOP;
a. 4.0
b. 8.0
c. 16.0
d.12.0
3. is a device which receives a weak signal and regenerates it. 1
a. Browser
b. Gateway
c. Modem
d. Repeater
4. command is used to modify records in the MySQL table. 1
a) ALTER
b) UPDATE

Page 1 of
c) MODIFY
d) SELECT
5. An organization purchase new computers every year and dumps the old one 1
into the local dumping yard. Write the name of the most appropriate category of
waste that the organization is creating every year, out of the following options:
a) Business waste
b) Commercial waste
c) E-waste
d) (D) Green waste
6. what will be the output of following code: 1
import pandas as pd
a=pd.Series([2,3,4,5])
b=pd.Series([5,6,7,8,9])
c=a+b
print(c)
(a) (b) (c) (d) Error
0 7 0 7.0 0 7.0
1 9 1 9.0 1 9.0
2 11 2 11.0 2 11.0
3 13 3 13.0 3 13.0
4 0 4 0 4 NaN
dtype: float64 dtype: float64 dtype: float64
7. The command used to give a heading to a graph using matplot is 1
(a) plt.show()
(b) plt.plot()
(c) plt.xlabel()
(d) plt.title()
8. State whether the following statement is True or False: 1
In SQL, The HAVING clause is used to filter data on groups formed by GROUP
BY clause.
9. What does CSV stands for:- 1
a) Comma Support Variables
b) Comma Spreadsheet Values
c) Comma Seperated Values
d) Common Specific Values
10. Stealing someone’s intellectual work and representing it as another person’s 1
work is known as .
a) Phishing
b) Spamming
c) plagiarism
d) hacking
11. Which one of the following is a string function? 1
a) COUNT()
b) SUBSTR()
c) MOD()
d) MAX()

Page 2 of
12. Which protocol allow us to have voice calls over the internet? 1
a) HTTP
b) VoIP
c) VideoChat
d) SMTP
13. Given a Pandas series called Marks, the command which will display the last 2 1
rows is :
a) print(Marks.tail(2))
b) print(Marks.Tail(2))
c) print(Marks.tails(3)
d) iv. print(Marks.tail())
14. Which of the following is not done by cyber criminals? 1
a) Unauthorized account access
b) Mass attack using Trojans as botnets
c) Email spoofing and spamming
d) Report vulnerability in any system
15. To create an empty Series object, you can use: 1
(a) pd.Series(empty)
(b) pd.Series( )
(c) pd.Series(np.NaN)
(d) all of these
16. Which MySQL function returns the week day name corresponding to Date value 1
supplied as argument.
a) weekday()
b) dayname()
c) dayofweek()
d) weekofday()
17. In Pandas which of the following dataframe attribute can be used to know the 1
number of rows and columns in a dataframe
a. size
b. index
c. count
d. shape
18. In order to draw charts in Python, which of the following statement will be used: 1
a) import pyplot.matplotlib as pl
b) import matplotlib.pyplot as plt
c) Import matplotlib.pyplot as plt
d) import pyplot from matplotlib as plt
19. If different branches of a hospital in different state capitals are connected 1
together, which type of network it forms?
(a) LAN
(b) MAN
(c) WAN
(d) None of the above
Q-20 and Q-21 are Assertion (A) and Reason (R) Type questions. Choose

Page 3 of
the correct option as:

(A) Both Assertion (A) and Reason (R) are true, and Reason (R) is the
correct explanation of Assertion (A)
(B) Both Assertion (A) and Reason (R) are true, but Reason (R) is
not the correct explanation of Assertion (A)
(C) Assertion (A) is True, but Reason (R) is False
(D) Assertion (A) is False, but Reason (R) is True
20. Assertion (A):- While creating a dataframe with a nested or 2D dictionary, 1
Python interprets the outer dict keys as the columns and the inner keys as the
row indices.
Reasoning (R):- A column can be deleted using remove command.
21. Assertion (A):- SELECT INSTR(‘Python Program’, ‘thon’); will give an output 2. 1
Reasoning (R):- INSTR() function takes two arguments as string and sub string
and returns the position of first occurance of a specifies substring from a string.
Q No. Section-B (7 x 2 = 14 Marks)
22. (A) Consider a given Series , M1. 2

Write a program in Python Pandas to create the series.


OR
(B) Write a program to create a series object using a dictionary that stores
the number of Kendriya Vidyalayas in each city of cities of your state.
Note: Assume some cities like AGRA, JHANSI, MATHURA, NOIDA
having 4, 3, 5, 4 KVs respectively and pandas library has been imported as
mypandas.
23. What do you understand by digital footprint? What are the different types of 2
digital footprints?
24. Anjali writes the following commands with respect to a table employee having 2
fields, empno, name, department, commission. Command1 : Select count(*)
from employee; Command2: Select count(commission) from employee; She
gets the output as 4 for the first command but gets an output 3 for the second
command. Explain the output with justification
25. (A) Expand the following terms related to Computer Networks: 2
a. URL
b. PAN
c. MODEM
d. WWW
OR
(B)What are cookies?
26 What do you mean by Degree and Cardinality in relational database system. 2

Page 4 of
Explain with suitable example.
27. (A) Priya is using her internet connection to book a train ticket. This is a 2
classic example of leaving a trail of web activities carried by her. What do we
call this type of activity? What is the risk involved by such kind of activity?
OR
(B) List any one Positive impact and negative impact of usage of technology.
28. (A) Consider the following code and fill in the gaps to get the given output: 2

import as pd
s=pd.Series( , )
print( )
1 3
2 3
3 3
4 3

OR
(B) Neena has created a Python code to create a DataFrame Toppers
with appropriate column headings from the list given below:
[[501,'Aromal',’Commerce’],[502,'Greeshma',’Science’],[503,''
Preeti”,’Humanities’], [504,' Rupin ',’Arts’]]
However, he code contains some mistakes. Identify the errors, rewrite the code,
and underline the corrections made.

import pndas as pd
Data= [[501,'Aromal',’Commerce’], [502,'Greeshma',’Science’],
[503,''Preeti”,’Humanities’], [504,' Rupin ',’Arts’]]
Toppers=pd.dataframe (data,columns=['Rno','Name', 'Stream'])
print(Toppers)
Section-C (4 x 3 = 12 Marks)
29. i. Ishita is using a software which are sold commercially and their source code 3(1+2)
not shared or distributed to the users. What are such softwares known as ?
ii. What is IPR? Why should it be protected?
30. Consider the following dataframe ndf as shown below : 3

What will be the output produced by following statements :-


a. print( ndf.loc [ : , ’Col3’ : ] )
b. print( ndf.iloc[2 : , : 3] )
c. print( ndf.iloc [ 1:3 , 2:3 ])
OR
Write a Python code to create a DataFrame ‘Df’ using dictionary of lists for the
following data.
Page 5 of
31. ANITA is working with functions of MySQL. Explain her following: 3
i. What is the difference between MONTH() and MonthName() function?
ii. Which function returns the weekday for date.?
iii. What is the output of SELECT MONTHNAME ('2008-02-03')?

32. Consider the following SQL table ‘automobile’ 3

Write SQL queries using SQL functions to perform the following operations:

i. Display company name and body wheel base after rounding off to nearest
one decimal places.
ii. Display the position of occurrence of the string “dan” in body style.
iii. Display the year of manufacturing for sedan;
OR
Compare Having clause and Order by clause with suitable example?
Q No Section-D (2 x 4 = 8 Marks)
33. Riya wants to create Python code to plot a bar chart for Indian player 4
performance in a match:

Page 6 of
.Help her to complete the code:
import matplotlib.pyplot as............................#statement 1
Player=['Rohit','Virat','Surya',’Rahul’]
Runs=[80,60,40,20]
plt.......................................#statement 2
plt.ylabel('Runs')
plt….................('Player') #statement
3
plt.title('PERFORMANCE')
plt….........................#statement 4
plt.savefig("x.jpg")
(i) Write suitable code for blank space in statement1 to import required library. (i)
(ii) Write suitable code for blank space in statement2 to plot the graph.
(iii) Write suitable code for blank space in statement3 to set the X-Axis
with required name.
(iv) Write suitable code for blank space in statement4 to display the graph plotted.
34. (A) Consider the following table (salesperson) and Write SQL queries 4
for following:

i. Display the first three characters of salesperson name’s in lowercase.


ii. Display the eldest salesperson name.
iii.Display the last 4 digits of phone number considering phone number as a
string data.
iv. Display the number of salespersons of the sales person zone wise.
OR
(B) Consider the below given table – SuperArcade:

Krunal joined as DBA and written following partial queries, complete the queries
and help him:

Page 7 of
i. Select , from superarcade;
(Maximum & Minimum Rent)
ii. Select from superarcade; (owner name into capital)
iii. Select FLR, avg(rent) from superarcade FRL having
>=2;
(Floor wise average rent where shops are more than or equal to 2)
iv. Select AgencyName, Owner from superarcade
opening_date
(Display the shops given by history (Latest to Oldest)).

QNo. Section-E (3 x 5 = 15 Marks) Mark


35. Soft Infotech Software Development Company has set up its new centre at 5
Ahmedabad for its office and web based activities.
It has 4 blocks of building named Design, HR, Development, R & D.
It has following no. computers in each block.
Department Computers
HR 25
Design 50
Development 125
R&D 10
Shortest distances between various Blocks in meters are as follows:
Block A to Block B 60 m
Block B to Block C 40 m
Block C to Block A 30 m
Block D to Block C 50 m
i. Suggest the most suitable place (i.e. block) to house the server of
this company with a suitable reason.
ii. Suggest the type of network to connect all the blocks with suitable reason.
iii. The company is planning to link all the blocks through a secure and
high speed wired medium. Suggest a Layout to connect all the blocks.
iv. Suggest the most suitable block to place the following devices:
a) Hub/Switch b) Modem
v. Company is planning to purchase a new hardware to protect the network
from network from unauthorised access from outside the network. Name the
device.
36. Mr. Roshan, a data analyst has designed the DataFrame df that contains data 5
about sales made by 4 salesmans in two half yearlys as shown below.
Answer the following questions:

Page 8 of
A. Predict the output of the following python statement:
i. df.shape
ii. df[1:3]
B. Write Python statement to display the data of Second half yearly column
of indexes Salesman1 to Salesman3
C.Write Python statement to compute and display the sum of data of First
column and Second column of the above given DataFrame.
D. Write python statement to display the data of the First column of
index Salesman2 to Salesdata
E. Write Python statement to compute and display the difference of data of
First column and Second column of the above given DataFrame.
37. (A) Write suitable SQL query for the following: 5
i. Display 7 characters extracted from 7th left character onwards from
the string ‘INFORMATICS PRACTICES’.
ii. Display the position of occurrence of string ‘COME’ in the
string ‘WELCOME WORLD’.
iii. Round off the value 2334.78 to one decimal place.
iv. Display the remainder of 200 divided by 7.
v. Remove all the expected leading and trailing spaces from a
column userid of the table ‘USERS’.
OR
(B) Write suitable SQL query for the following:
i. Display 5 characters extracted from 3th left character onwards from
the string ‘INDIA RISING’.
ii. Display the position of occurrence of string ‘FUNDA’ in the
string ‘PYTHON FUNDAMENTALS.
iii. Round off the value 453.668 to two decimal place.
iv. Display the remainder of 120 divided by7.
v. Remove all the expected leading and trailing spaces from a
column student_id of the table ‘student’.

Page 9 of
Page 10 of
के न्द्रीय विद्यालय संगठन, जयपुर संभाग
Kendriya Vidyalaya Sangathan, Jaipur Region
PRACTICE SET – 02
कक्षा/Class: 12िीं विषय/Subject: Informatics Practices(065)

समय/Time: 3 Hours अविकतम अंक/Max. Marks: 70

Q.No SECTION-A Marks


1. State whether True or False: 1
Boolean Indexing helps us to select the data from the DataFrames using a
boolean vector.
TRUE
2. In column “Margin “contains the data set(4,NULL,NULL,12). What will be 1
the output of after the execution of the given query?
SELECT AVG(Margin) FROM SHOP;
(A) 4.0 (B) 8.0
(C) 16.0 (D) 12.0
3. is a device which receives a weak signal and regenerates it. 1
a. Browser
b. Gateway
c. Modem
d. Repeater
4. command is used to modify records in the MySQL table. 1
(a) ALTER
(b) UPDATE
(c) MODIFY
(d) SELECT
5. An organization purchase new computers every year and dumps the 1
old one into the local dumping yard. Write the name of the most
appropriate category of waste that the organization is creating every
year, out of the following options:
(A) Business waste
(B) Commercial waste
(C) E-waste
(D) Green waste
6. what will be the output of following code: 1
import pandas as pd
a=pd.Series([2,3,4,5])
b=pd.Series([5,6,7,8,9])
c=a+b
print(c)
(A) (B) (C) (D) Error
0 7 0 7.0 0 7.0
1 9 1 9.0 1 9.0
2 11 2 11.0 2 11.0
3 13 3 13.0 3 13.0
4 0 4 0 4 NaN
dtype: float64 dtype: float64 dtype: float64
7. The command used to give a heading to a graph using matplot is 1
(a) plt.show()
(b) plt.plot()
(c) plt.xlabel()
(d) plt.title()
8. State whether the following statement is True or False: 1
In SQL, The HAVING clause is used to filter data on groups formed by
GROUP BY clause.
TRUE
9. What does CSV stands for:- 1
A. CommaSupportVariables
B. CommaSpreadsheetValues
C. CommaSeperatedValues
D. (iv) CommonSpecificValues
10. Stealing someone’s intellectual work and representing it as another 1
person’s work is known as .
(A) Phishing (B) Spamming
(C) plagiarism (D) hacking
11. Which one of the following is a string function? 1
A. COUNT()
B. SUBSTR()
C. MOD()
D. MAX()

12. Which protocol allow us to have voice and video calls over the internet? 1
(A) HTTP (B) VoIP
(C) VideoChat (D) SMTP
13. Given a Pandas series called Marks, the command which will display the 1
last 2 rows is :
A. print(Marks.tail(2))
B. print(Marks.Tail(2))
C. print(Marks.tails(3)
D. iv. print(Marks.tail())
14. Which of the following is not done by cyber criminals? 1
(A) Unauthorized account access
(B) Mass attack using Trojans as botnets
(C) Email spoofing and spamming
(D) Report vulnerability in any system
15. To create an empty Series object, you can use: 1
(a) pd.Series(empty)
(b) pd.Series( )
(c) pd.Series(np.NaN)
(d) all of these
16. Which MySQL function returns the week day name corresponding to Date 1
value supplied as argument.
(A) weekday()
(B) dayname()
(C) dayofweek()
(D) weekofday()
17. In Pandas which of the following dataframe attribute can be used to know 1
the number of rows and columns in a dataframe
a. size
b. index
c. count
d. shape
18. In order to draw charts in Python, which of the following statement will be 1
used:
(A) import pyplot.matplotlib as pl
(B) import matplotlib.pyplot as plt
(C) Import matplotlib.pyplot as plt
(D) import pyplot from matplotlib as plt
19. If different branches of a hospital in different state capitals are connected 1
together, which type of network it forms?
(a) LAN
(b) MAN
(c) WAN
(d) None of the above
Q-20 and Q-21 are Assertion (A) and Reason (R) Type questions.
Choose the correct option as:

(A) Both Assertion (A) and Reason (R) are true, and Reason (R) is
the correct explanation of Assertion (A)
(B) Both Assertion (A) and Reason (R) are true, but Reason (R) is
not the correct explanation of Assertion (A)
(C) Assertion (A) is True, but Reason (R) is False
(D) Assertion (A) is False, but Reason (R) is True
20. Assertion (A):- While creating a dataframe with a nested or 2D 1
dictionary, Python interprets the outer dict keys as the columns and the
inner keys as the row indices.
Reasoning (R):- A column can be deleted using remove command.
(C) Assertion (A) is True, but Reason (R) is False
21. Assertion (A):- SELECT INSTR(‘Python Program’, ‘thon’); will give an 1
output 2.
Reasoning (R):- INSTR() function takes two arguments as string and sub
string and returns the position of first occurance of a specifies substring
from a string.
(D) Assertion (A) is False, but Reason (R) is True
22. import pandas as pd 2
M1=pd.Series([45,65,24,89],index=['term1','term2','t erm3','term4'])
½ mark for import statement
½ mark for usage of Series ()
½ mark for stating index as a list
½ mark for creating object m1
OR
city={'AGRA':4, 'JHANSI':3, 'MATHURA':5, 'NOIDA':4}
kv=mypandas.Series(city)
1 mark for each correct python statement
23. A digital footprint – sometimes called a digital shadow or an electronic 2
footprint – refers to the trail of data you leave when using the internet. It
includes websites you visit, emails you send, and information you submit
online. Types are Active Digital Foot Print and Passive Digital Foot Print.
(1 Marks for definition)
(1 Marks for types)
24. This is because the column commission contains a NULL value and the 2
aggregate functions do not take into account NULL values. Thus
Command1 returns the total number of records in the table whereas
Command2 returns the total number of non NULL values in the column
commission.
(2 Marks for any correct explanation)
25. Expand the following terms related to Computer Networks: 2
a. URL : UNIFORM RESOURCE LOCATOR
b. PAN: PERSONAL AREA NETWORK
c. MODEM : MODULATOR DEMODULATOR
d. WWW : WORLD WIDE WEB
(1/2 Marks for each correct term)
OR
cookies are small files which are stored on a user’s computer and contains
information like which Web pages visited in the past, logging details
Password etc. They are designed to hold a small amount of data specific to
a particular client and website and can be accessed by the web server or
the client computer.
(2 Marks for correct definition)
26 Degree: No of columns in a table is called degree of a 2
table. Cardinality: No of rows in a table is called degree of a
table. I_ID SHOP_NAME QTY
PC01 Akhil Enterprises 10
LC01 Nihal and Sons 5
PC03 Renuka Technologies 12
PC01 Tanvi Techno and E-Waste firm 5
LC03 Akhil Enterprises 7
For example in the above STOCK table
Degree: 03 and Cardinality: 05
(1 Mark for correct definition)
(1 Mark for correct example)
27. Risk involved : It includes websites we visit emails we send, and any 2
information we submit online, etc., along with the computer’s IP address,
location, and other device specific details. Such data could be used for
targeted advertisement or could also be misused or exploited.
1 mark for naming the activity
1 mark for mentioning any one risk
OR
There are positive as well as negative impact on health due to the use of
these technologies.
● POSITIVE IMPACT ▪ Various health apps and gadgets are available
to monitor and alert Online medical records can be maintained.
● NEGATIVE IMPACT ▪ One may come across various health issues
like eye strain, muscle problems, sleep issues,etc ▪ Anti social
behaviour, isolation, emotional issues, etc.
(1 Marks for each)
28. import pandas as pd # ½ Marks 2
s=pd.Series( 3 , index=[1,2,3,4] ) #(1 Mark)
print(_s ) # ½ Mark
OR
import pandas as pd
Data= [[501,'Aromal',’Commerce’], [502,'Greeshma',’Science’],
[503,''Preeti”,’Humanities’], [504,' Rupin ',’Arts’]]
Toppers=pd.DataFrame(data,columns=['Rno','Name', 'Stream'])
print(Toppers)
( 1 Marks for each correction)
29. i. Proprietary Software. 3
( 1 Marks for correct answer)
ii. Intellectual property rights are the rights given to persons over the
creations of their minds like creativity concepts, inventions, industrial
models, trademarks, songs, literature, symbols, names, brands,.. .etc. They
also entitle him/her to prevent others from using, dealing or tampering with
his/her product without prior permission from him/her. It should be protected
since:
1. New innovations in all IPR domains lead to Human progress and
advancement. 2. Legal protection of new innovations encourages safe
spending on other innovations.
3. Caring for and protecting IPR contribute to achieving economic and social
development
( 1 Marks for definition)
( 1 Marks for any one use)
30. a. Column3 Res 3
T1 60.00 True
T2 59.22 True
T3 46.04 False
T4 58.62 False

b. Column1 Column2 Column3


T3 49.090140 100.0 46.04
T4 38.487265 85.4 58.62

c. Column3
T2 59.22
T3 46.04
1 mark for each correct output.
OR
import pandas as pd ½ mark D={'Arnab':[90,91,97],'Ramit':
[92,81,96],'Samridhi':[89,91,88] } 1 mark
Df=pd.DataFrame(D,index=['Maths','Science','Hindi']) 1 mark
print(Df) ½ mark
31. i)MONTH() GIVES MONTH IN Numbers. 3
example:
MONTH(‘2021-05-11’) GIVES 05
where as MonthName(‘2021-05-11’) gives ‘MAY’.
ii. DAYNAME(date)-Returns the name of the weekday for
date SELECT DAYNAME('2022-02-23'); -> 'Wednesday’;
iii. February
32. i. Select company, round(wheel-base,1) from 3
automobile; 1 mark each for correct usage of Select and
round()
ii. Select instr(body-style,’dan’) from automobile;
1 mark each for correct usage of Select and instr()
iii. Select year(dateofmanufacture) from automobile where
body- style=’sedan’;
1 mark each for correct usage of Select and year()
OR
Having clause is used in conjunction with group by clause in MySQL. It is
used to provide condition based
on grouped data. On the other hand, order by clause is an independent
clause used to arrange records of a table
in either ascending or descending order on the basis of one or more
columns
2 marks for correct explanation and 1 mark for example.
33. import matplotlib.pyplot as ……plt...................#statement 1 4
Player=['Rohit','Virat','Surya',’Rahul’]
Runs=[80,60,40,20]
plt…….plot(Player,Runs).......#statement 2
plt.ylabel('Runs')
plt….xlabel(Player)....('Player') #statement
3
plt.title('PERFORMANCE')
plt….show()......................#statement 4
plt.savefig("x.jpg")
( 1 Mark for each correct statement)

34. i. SELECT LCASE(LEFT(NAME,3)) FROM SALESPERSON; 4


ii. SELECT NAME FROM SALESPERSON WHERE DOB=MAX(DOB);
iii.SELECT RIGHT(PHONENO,4) FROM SALESPERSON;
iv.SELECT ZONE, COUNT(*) FROM SALESPERSON GROUP BY ZONE;
(1 Mark for each correct query)
OR
a) Select , from superarcade; (Maximum &
Minimum Rent)
Ans.: max(rent), min(rent)
b) Select from superarcade; (owner name into
capital) Ans.: ucase(owner)
c) Select FLR, avg(rent) from superarcade having >=2;
(Floor wise average rent where shops are more than 2)
Ans.: group by, count(agencyname)
d)
Select AgencyName, Owner from superarcade opening_date
(Display the shops as per by history (Latest to Oldest)).
Ans.: order by, desc

(1 Mark for each correct answer)


35. Suggest the most suitable place (i.e. block) to house the server of this 5
company with a suitable reason.
Ans.: Development block is best block to house the server for this company.
ii. Suggest the type of network to connect all the blocks with suitable
reason. Ans.: As the distance is given within 1 KM, LAN network will
connect all the blocks.
iii. The company is planning to link all the blocks through a secure and
high speed wired medium. Suggest a way to connect all the blocks.

iii)
a) Hub/Switch must be placed in every block
b) Modem is placed in Development to provide the internet connection
iv. Company is planning to purchase a new hardware to protect the
network fromnetwork from unauthorised access from outside the network.
Name the device.
Ans.: Firewall

(1 Mark for each correct answer)


36. i.(4, 2) 5
ii. df[1:3]
First Second
Salesman2 11000 15000
Salesman3 60000 40000
B.
print(df.loc['Salesman1': 'Salesman3', 'Second'])
C. print(df.First+df.Second)
D. print(df.loc['Salesman2': 'Salesdata', 'First'])
E. print(df.First - df.Second)
(1Mark for each answer)
37. i. select mid(INFORMATICS PRACTICES',7,7); 5
ii. select INSTR('WELCOME WORLD','COME');
iii. select round(2334.78,1);
iv. select mod(200,7);
v. select trim(userid) from users;
(1 mark for each correct query)
OR
i. select mid('INDIA RISING',3,5);
ii. select INSTR(‘PYTHON FUNDAMENTALS’,'FUNDA');
iii. select round(453.668.78,2);
iv. select mod(120,7);
v. select trim(student_id) from student;
(1 mark for each correct query)
अनुक्रम ांक/ROLL NO

कें द्रीय विद्य लय सांगठन ,जयपुर सांभ ग


KENDRIYA VIDYALAYA SANGATHAN, JAIPUR REGION
PRACTICE SET - 01
कक्ष / CLASS :XII
विषय /SUB : Informatics Practices(065)
अविकतम अिवि / Time Allowed :03 Hours अविकतम अांक Maximum
Marks : 70
स म न्य वनर्देश / General Instructions

सामान्य निर्दे श/General Instructions:


1. Please check this question paper contains 37 questions.
2. All questions are compulsory. However, internal choices have been
provided in some questions. Attempt only one of the choices in such
questions
3. The paper is divided into 5 Sections- A, B, C, D and E.
4. Section A consists of 21 questions (1 to 21). Each question carries 1 Mark.
5. Section B consists of 7 questions (22 to 28). Each question carries 2 Marks.
6. Section C consists of 4 questions (29 to 32). Each question carries 3 Marks.
7. Section D consists of 2 case study type questions (33 to 34). Each
question carries 4 Marks.
8. Section E consists of 3 questions (35 to 37). Each question carries 5 Marks.
9. All programming questions are to be answered using Python Language only.
10. In case of MCQ, text of the correct answer should also be written.
Q.No SECTION-A Marks
1. State whether the following statement is True or False. 1
E-waste increasing day by day is a blessings for environment.
2. The purpose of distinct clause in a SQL statement is to: 1
a) show all the rows in a column of table
b) show all duplicate values in a column
c) Remove all duplicate values in a column
d) sort all the results based on a column
3. NIC stands for 1
a) Network Information Centre
b) Network Integration Card
c) Network Interface Card
d) Network Initiate Card
4. SQL function to find the lowest among group of values 1
a) minimum( )
b) min( )
c) low( )
d) lowest( )

Page 1 of
5. Which of the following is the correct way to import the Pandas 1
library in Program?
a) import pd as pandas
b) import pandas
c) from pandas import pd
d) from pd import pandas
6. Which of the following is correct output of code given below – 1
S1 = pd.Series(range(5))
a) 0 1 b) 0 5 c) 0 1 d) None of the above
1 2 1 2
2 3 2 3
3 4 3 4
4 5
7. Which of the following function is used to save the figure/chart? 1
a) save()
b) savefigure()
c) savefig()
d) None of the above
8. Which clause is used with aggregate functions? 1
a) GROUP BY
b) ORDER BY
c) BETWEEN
d) IN
9. Which of the following Python Statements is used to export data 1
from Pandas Dataframe to a CSV file (Note: pd is an alias for
pandas and df as dataframe name)?
a) df.export_csv(‘filename.csv’)
b) pd.to_csv(‘filename.csv’)
c) df.to_csv(‘filename.csv’)
d) pd.load_csv(‘filename.csv’)
10. While surfing on Internet if your geo location is turned on, than it 1
makes –
a) Active digital footprint
b) Passive digital footprint
c) Active e footprint
d) Passive e footprint
11. If a column Fee contains the following data set (75, null, null, 1
100, 200), what will be theoutput of the following query.
select count(Fee) from emp;
a) 5
b) 2
c) 3
d) output cannot be predicted
12. Which topology in general uses less wire length compare to 1

Page 2 of
other network topologies?
a) Star Topology
b) Ring Topology
c) Bus Toplogy
d) All use same wire length

13. To display the last five rows of a Dataframe object df, we write 1
a) df.Tail()
b) df.tail()
c) df.tail(5)
d) Both b and c
14. Which of the following is/are examples of cybercrime? 1
a) Extracting money using a person's net banking details.
b) Posting/viewing child pornographic material.
c) Making online payment using someone else's credit
card without consent.
d) All of the above
15. Which of the following statement is wrong? 1
a) Can’t change the index of the Series.
b) We can easily convert the list,tuple and dictionary into
a series.
c) A series represent a single column in memory
d) We can create empty series.
16. 1
Match the following SQL functions/clauses with their descriptions:

a) P-2, Q-4, R-3, S-1


b) P-2, Q-4, R-1, S-3
c) P-4, Q-3, R-2, S-1
d) P-4, Q-2, R-1, S-3

Page 3 of
17. What will be the output of the given command: 1
df1.loc[:0,’Sal’]
Consider the given dataframe

EName Sal Bonus


0 Kavita 50000 3000
1 Sudha 60000 4000
2 Garima 55000 5000

a) 0 Kavita 50000 3000


b) 50000
c) 3000
d) Both a and b
18. 1
Which of the following is not a valid chart type ?
a) lineplot
b) bargraph
c) histogram
d) statistical
19. Which type of the following networks spread over small 1
geographical area of up to 1 km?
a) LAN
b) MAN
c) WAN
d) None of these
Q-20 and Q-21 are Assertion (A) and Reason (R) Type
questions. Choose the correct option
SQL Function as:
Description
P.(A) SUM()
Both Assertion1.To
(A) extract
and Reason (R) are
a substring true,
from and
a string
Q. Reason (R) is the
POWER() correctthe
2. Returns explanation of all
total value of Assertion
rows in a(A)
column.
(B) Both Assertion (A) and Reason (R) are true, but Reason
R. MID() 3. Returns the current date and time.
(R) is not the correct explanation of Assertion (A)
S. NOW() 4. Returns power of given values
(C) Assertion (A) is True, but Reason (R) is False
(D) Assertion (A) is False, but Reason (R) is True
20. Assertion (A):- df.loc(False) function can be used to find the 1
values where index valueis False.
Reason (R):- Boolean indexing is a type of indexing and can be
used to retrieve the data.

Page 4 of
21. Assertion (A): SUM() is an Aggregate function. 1
Reason (R) : Multiple row functions work upon group of rows and
return one result for the complete set of rows.

Q No. Section-B (7 x 2 = 14 Marks)


22. (A) Write a program to create a Series “s” as shown below. 2
0 1
1 3
2 5
3 67
4 8
dtype: int64
OR
(B) Write the name of any two data structures provided by Pandas
library in Python. Which python library is used in python for data
visualization.
23. (i) I: 2
 am a small text file
 created on user’s computer
 contains small piece of data-Like a username,
password and user’s browsing history as well as
preferences
 may help to improve user’s web browsing
experience. Who am I?
(ii) Name any two popular web browser’s.
24. Manisha is a Junior Data Analyst in an ecommerce company. 2
She has been assigned a task to find the average price of
product for categories available on the website of the company
but display only those where the average in the category is more
than 150. She wrote the following SQL query but she is getting
error in it.

Select PNAME, AVG(PRICE)


From product
Where AVG(Price)>150;

Help her in identifying the reason for the error and write the
correct query bysuggesting the possible correction.
25. (A) What is the difference between LAN and MAN? 2
OR
(B) What is a Gateway? Explain.
26. What is the purpose of WHERE clause? Explain with the help of 2
suitable example.

Page 5 of
27. Explain any two possible methods of e-waste management. 2
28. Carefully observe the following code: 2
import pandas as pd
data = {'col1' : pd.Series([1, 2, 3], index=['a', 'b', 'c']),
'col2' : pd.Series([0, 78, -25, 13], index=['a', 'b', 'c', 'd'])}

df = pd.DataFrame(data)
print(df)

Answer the following based on above code:


a) Print no. of rows and columns
b) print alternate rows and all the columns in reverse order
QNo Section-C (4 x 3 = 12 Marks)
29. Mention any four net etiquettes 3
30. (A) Write a Python code to create the a DataFrame stud using list 3
of dictionaries from the data given below :

OR
(B) Write python code to create a Series S1 as shown below
using a dictionary.
India New Delhi
France Paris
Switzerland Bern
Japan Tokya
31. (i) Write SQL Statement to create a database KVS. 3(1
(ii) Create a table ROJAIPUR with following specifications:
+2)
Column Name Datatype Key
SchoolID Numeric PrimaryKey
SchoolName Varchar(50)
No_of_St Numeric
Date0fEstablish Date

Page 6 of
32. Based on the table given below, write SQL queries 3
for the following :
Table Name: Gadget
I_ID ItemName Manufacturer Price
PC01 Personal Computer AB Corp 35000
LC05 Laptop AB Corp 55000
PC03 Personal Computer AZee 32000
PC06 Personal Computer COMPAQ 37000
LC03 Laptop Pacific 57000
PT04 Tablet AZee 28000

Table: STOCK
I_ID Name
SHOP_NAMEMarks QTY
0 Ramesh 78
PC01 Akhil Enterprises 10
1 Suresh 86
LC01 Nihal and Sons 5
2 Harish 92
PC03 Renuka Technologies 12
3 Jayesh 68
PC01 Tanvi Techno and E-Waste firm 5
LC03 Akhil Enterprises 7

i. Display number of minimum and maximum price for


each manufacturer.
ii. To show number of items namewise from Gadget table.
iii. Display Product name along their
corresponding name and quantity of that
product .
OR
Consider the table PRODUCT and CLIENT
given below:
TABLE:PRODUCT
PR_ID PR_NAME MANUFACTURER PRICE QTY
BS101 BATH SOAP PEARSE 45.00 25
SP201 SHAMPOO SUN SILK 320.00 10
SP235 SHAMPOO DOVE 455.00 15
BS120 BATH SOAP SANTOOR 36.00 10
TB310 TOOTH BRUSH COLGATE 48.00 15
FW422 FACE WASH DETOL 66.00 10
BS145 BATH SOAP DOVE 38.00 20
TABLE:CLIENT
C_ID C_NAME CITY PR_ID
01 DREAM MART COCHIN BS101
02 SHOPRIX DELHI TB310
03 BIG BAZAR DELHI SP235
04 LIVE LIFE CHENNAI FW422
Write appropriate SQL Queries for the following:
i) Display productwise average quantity required
ii) Display first five characters of Manufacturer name of all products.
iii) Display the product name, price, client name and city with their

Page 7 of
corresponding matching product Id.
Q No Section-D (2 x 4 = 8 Marks) Marks
33. (A) Write down the python code to draw the bar chart using the diagram 4
given below, alsosave the output as a svg.

Page 8 of
OR
(B)Write a python program to plot a line chart based on the given data
to showcase thetrend of loan applications received by the banks from
2014 to 2018.
Financial Year Number of Applications Received
2014-15 254420
2015-16 261257
2016-17 215422
2017-18 242433
2018-19 238989
34. 4
(A) Sunita is learning MySQL, she created a table to store
the details of Club members.
Table : Club
MemberID MName Sport Membership_Till Fee_Paid
1224 Sandeep GOLF 2022-12-23 1700
1242 Ravina GOLF 2022-10-15 1750
1277 Karan POLO 2023-01-15 1800
1249 Tarun SQUASH 2022-10-15 1800
1266 Zubin POLO 2023-02-02 3600

Help Sunita to write the following queries-


1. Display the last 2 characters of ‘Membership_Till’ for
all records.
2. Find the minimum and maximum fee from the Club table.
3. How many members are playing ‘GOLF’.
4. Display the Member name along with fees paid by them
in descending order of their fees paid.
OR
(B) Tulasi creates a table RESULT with a set of records to
maintain themarks secured by students in Term1, Term2, and
their divisions.After the creation of the table, he entered data of
7 students in the table.

Page 9 of
ADNO ROLLNO SNAME TERM1 TERM2 DIVISION
123 101 KARAN 366 410 I
245 102 NAMAN 300 350 I
128 103 ISHA 400 410 I
129 104 RENU 350 357 I
234 105 ARPIT 100 205 II
187 106 SABINA 100 205 II
181 107 NEELAM 470 450 I
Write the output of the following SQL Queries:
a) Identify the columns which can be considered as
candidate keys?
b) Select SNAME from STUDENT where TERM1 between 350
and 400;
c) Select DIVISION, MAX(TERM1),MIN(TERM2) form STUDENT
group by DIVISION;
d) Select MOD(Term1,10) from STUDENT;
QNo. Section-E (3 x 5 = 15 Marks) Marks
35. 5
Open University of India is starting its first campus in Bengaluru
with its centre, admission office in Bhopal. The university has
three major blocks comprising Office block, Science block and
Commerce block is in a 5 km area campus.
As a network expert, you need to suggest the network plan as per
(a) to (e) to the authorities keeping in mind the distance and other
given parameters.

Expected wire distance between various locations


Blocks distance

Office Block to Science Block 90 m

Office Block to Commerce Block 80 m

Science Block to Commerce Block 15 m

Bhopal Admission Office to Bengaluru Campus 1400 km


Expected number of computers to be installed at various
locations in the university areas follows:

Page 10 of
Blocks Number of Computers

Office Block 10

Science Block 140

Commerce Block 30

Bhopal Admission Office 8

a. Suggest the authorities, the cable layout amongst


various blocks inside universitycampus for connecting the
blocks.

b. Suggest the most suitable place (i.e. block) to house


the server for this universitywith a suitable reason.

c. Suggest an efficient device form the following to be


installed in each of the blocks toconnect all the computers.
(i) Modem (ii) Switch (iii) Gateway
d. Suggest the most suitable (very high speed) service to provide
data connectivity between admission office located in Bhopal
and the campus located in Bengaluru formthe following options:
● Telephone line
● Fixed Line dial-up connection
● Coaxial cable network
● GSM
● Leased line
● Satellite connection.

e. University is planning to connect its campus in Bhopal, which


is more than 1400 km.Which type of network will be formed?

Page 11 of
36. 5
Pooja, a student, has designed a DataFrame df_exam as
shown below. Consider thisDataFrame and answer the following
questions.

A. Predict the output for below


i. print(df_exam.ndim)
ii. print(df_exam.size)
B. Display the Days of English Exam for class X and XII.
C. Update the DataFrame to schedule an IP exam for XII
when the exam for X isSanskrit.
D. Rename the column name Day to Weekday.
37.
(A) Write SQL query for the following: 5
a. Display remainder of 75 divided by 45.
b. Display the current system Date and Time.
c. Display First 5 Characters of the String ‘Jaipur Region’.
d. Find Square of 17.
e. Display 1789.897 rounded off to 2 decimal places.
OR
(B) Explain the following SQL functions with an example in
each case.
a. MOD( )
b. MONTHNAME( )
c. TRIM( )
d. POWER( )
e. RIGHT( )

Day X XII
1 Monday Mathematics Accountancy
2 Tuesday Science Hindi/IP
3 Wednesday S. Studies English
4 Thursday English B. Studies
5 Friday Hindi Economics
6 Saturday Sanskrit NaN

Page 12 of
अनुक्रम ांक/ROLL NO

कें द्रीय विद्य लय सांगठन ,जयपुर सांभ ग


KENDRIYA VIDYALAYA SANGATHAN, JAIPUR REGION
MARKING SCHEME PRACTICE SET-01
कक्ष / CLASS :XII
विषय /SUB : Informatics Practices(065)
अविकतम अिवि / Time Allowed :03 Hours अविकतम अांक Maximum
Marks : 70
स म न्य वनर्देश / General Instructions

Q.N SECTION-A Marks


o
1. from pd import pandas 1
State whether the following statement is True or False.
E-waste increasing day by day is a blessings for environment.
False
2. The purpose of distinct clause in a SQL statement is to: 1
a) show all the rows in a column of table
b) show all duplicate values in a column
c) Remove all duplicate values in a column
d) sort all the results based on a column
3. NIC stands for 1
a. Network Information Centre
b. Network Integration Card
c. Network Interface Card
d. Network Initiate Card
4. SQL function to find the lowest among group of values 1
a. minimum( )
b. min( )
c. low( )
d. lowest( )
5. Which of the following is the correct way to import the Pandas library 1
in Program?
a. import pd as pandas
b. import pandas
c. from pandas import pd
6. a) 0 1 1
1 2
2 3
3 4
7. Which of the following function is used to save the figure/chart? 1
a) save()
b) savefigure()

Page 1 of
c) savefig()
d) None of the above
8. Which clause is used with aggregate functions? 1
a. GROUP BY
b. ORDER BY
c. BETWEEN
d. IN
9. Which of the following Python Statements is used to export data 1
from Pandas Dataframe to a CSV file (Note: pd is an alias for
pandas and df as dataframe name)?
a) df.export_csv(‘filename.csv’)
b) pd.to_csv(‘filename.csv’)
c) df.to_csv(‘filename.csv’)
d) pd.load_csv(‘filename.csv’)
10. While surfing on Internet if your geo location is turned on, than it 1
makes
a) Active digital footprint
b) Passive digital footprint
c) Active e footprint
d) Passive e footprint
11. If a column fee contains the following data set (75, null, null, 100, 1
200), what will be theoutput of the following query.
select count(Fee) from emp;
a) 5
b) 2
c) 3
d) output cannot be predicted
12. Which topology in general uses less wire length compare to 1
other ?
a) Star Topology
b) Ring Topology
c) Bus Toplogy
d) All use same wire length
13. To display the last five rows of a Dataframe object df, we write 1
a) df.Tail()
b) df.tail()
c) df.tail(5)
d) Both b and c
14. Which of the following is/are examples of cybercrime? 1
a) Extracting money using a person's net banking details.
b) Posting/viewing child pornographic material.
c) Making online payment using someone else's credit card

Page 2 of
without consent.
d) All of the above
15. Which of the following statement is wrong? 1
a) Can’t change the index of the Series.
b) We can easily convert the list,tuple and dictionary into
a series.
c) A series represent a single column in memory
d) We can create empty series.
16. 1
Match the following SQL functions/clauses with their descriptions:

SQL Function Description


P. SUM() 1.To extract a substring from a string
Q. POWER() 2. Returns the total value of all rows in a
column.
R. MID() 3. Returns the current date and time.
S. NOW() 4. Returns power of given values
A. P-2, Q-4, R-3, S-1
B. P-2, Q-4, R-1, S-3
C. P-4, Q-3, R-2, S-1
D. P-4, Q-2, R-1, S-3
17. What will be the output of the given command: 1
df1.loc[:0,’Sal’]
Consider the given dataframe
EName Sal Bonus
0 Kavita 50000 3000
1 Sudha 60000 4000
2 Garima 55000 5000
a) 0 Kavita 50000 3000
b) 50000
c) 3000
d) Both a and b
18. 1
Which of the following is not a valid chart type ?
a) lineplot
b) bargraph
c) histogram
d) statistical

Page 3 of
19. Which type of the following networks spread over small geographical 1
area of up to 1 km?
a) LAN
b) MAN
c) WAN
d) None of these
20. Assertion (A):- df.loc(False) function can be used to find the values 1
where index valueis False.
Reason (R):- Boolean indexing is a type of indexing and can be
used to retrieve thedata.
(c)Assertion (A) is True, but Reason (R) is False
21. Assertion (A): SUM() is an Aggregate function. 1
Reason (R) : Multiple row functions work upon group of rows and
return one result for the complete set of rows.
(A) Both Assertion (A) and Reason (R) are true, and Reason
(R) is the correct explanation of Assertion (A)

Q Section-B (7 x 2 = 14 Marks)
No.
22. import pandas as pd 2
s=pd.Series([1,3,5,67,8],index=[0,1,2,3,4])
print(s)
or Any correct code
OR
The two data structures provided by Pandas library in Python are
Series and Dataframe.
Python library is used in python for data visualization is matplotlib.
23. (i) cookies 2
(ii) any two web browsers like Google crom, Mozilla
Firefox, Microsoft edge etc.
24. Select PNAME, AVG(PRICE) 2
From product
group by PNAME
having AVG(Price)>150;
25. Local Area Network (LAN) and a Metropolitan Area Network (MAN) 2
A LAN is a network that connects devices in a small area, like a
home or office. LANs can be small or large, but they're usually
confined to a single building or campus
A MAN is a network that connects multiple LANs over a larger area,
like a city or metropolitan area. MANs are typically 10–50 km in size.
(Any two correct difference points)
OR
A network gateway is a device or software that connects networks

with different protocols by translating data between them.


Page 4 of
26. A "WHERE clause" in a SQL query is used to filter data within a table,
2
allowing you to retrieve only the rows that meet specific conditions.
eg:
select * from students where marks>75;
This query will show only those students records who scored above 75
marks.
27. feasible methods of e-waste management are reduce, reuse and recycle. 2
• Reduce: We should try to reduce the generation of e-waste by
purchasing the electronic or electrical devices only according to
our need.
• Reuse: It is the process of re-using the electronic or electric
waste after slight modification.
• Recycle: Recycling is the process of conversion of electronic
devices into something that can be used again and again in some or
the other manner.
28. a) print(df.shape) 2
b) print(df.iloc[::-2, ::-1])
QN Section-C (4 x 3 = 12 Marks)
o
29. • Be ethical – No copyright violation, share the expertise 3
• Be responsible – Don’t feed the troll, avoid cyber bullying
• Be respectful – Respect privacy, respect diversity
• Be Precise , or any other possible
30. import pandas as pd 3
d1={‘Name’: ‘Ramesh’, ‘Marks’:78}
d2={‘Name’: ‘Suresh’, ‘Marks’:86}
d3={‘Name’: ‘Harish’, ‘Marks’:92}
d4={‘Name’: ‘Jayesh’, ‘Marks’:68}
data=[d1,d2,d3,d4]
stud= pd.DataFrame(data)
print(df)
OR
import pandas as pd
data={“India”: “New Delhi”, “France”: “Paris”, “Switzerland”: “Bern”,
“Japan”: “Tokyo”}
S1=pd.Series(data)
print(S1)
31. (i) CREATE DATABASE KVS 3(1
(ii) CREATE TABLE ROJAIPUR
+2)
(SchoolID int(5) Primary key,
SchoolName Varchar(50),
No_of_St int(3),
DateOfEstablish date);
32. 3
i. SELECT MAX(PRICE), MIN(PRICE) FROM GADGET

Page 5 of
GROUP BY MANUFACTURER;
ii. SELECT ITEMNAME, COUNT(*) FROM
GADGET GROUP BY ITEMNAME;
iii. SELECT ITEMNAME,SHOP_NAME, QTY FROM
GADGET G, STOCK S WHERE G.I_ID=S.I_ID;
OR
i) SELECT PR_NAME,AVG(QTY) FROM PRODUCT
GROUP BY PR_NAME;
ii) SELECT LEFT(MANUFACTURER,5) FROM PRODUCT;
iii) SELECT PR_NAME, PRICE, C_NAME, CITY FROM
PRODUCT P, CLIENT C WHERE P.PR_ID=C.PR_ID;
Q Section-D (2 x 4 = 8 Marks) Mark
No s
33. import matplotlib.pyplot as plt 4
import numpy as np x=np.array([1,2,3])
state=['Rajasthan','Delhi','Punjab']
eligible=[13.7,2.6,4.1]
paid=[12.9,2.0,3.5]
plt.bar(x-.1,eligible,width=.2,label='Eligible')
plt.bar(x+.1,paid,width=.2,label='Paid')
plt.xticks(ticks=x,labels=state)
plt.xlabel('State--->')
plt.ylabel('No. of people in lacs--->')
plt.title('Health benefit distribution under Ayushman
Bharat (2017-2021)')
plt.legend()
plt.savefig('health.svg')
OR
import matplotlib.pyplot as plt
session=['2014-15','2015-16','2016-17','2017-18','2018-19']
loan_applications=[254420,261257,215422,242433,238989]
plt.plot(session,loan_applications,'r:x')
plt.xlabel('Session--->')
plt.ylabel('Applications--->')
plt.title('Loan applications received by the banks of India')
plt.show()
34. 1. SELECT RIGHT(Membership_Til, 2) FROM Club; 4
2. SELECT MAX(Fee_Paid), MIN(Fee_Paid) FROM Club;
3. SELECT COUNT(*) FROM Club WHERE Sport = ‘GOLF’;
4. SELECT MName,Fee_Paid FROM Club ORDER BY
Fee_paid;

OR
Tulasi creates a table RESULT with a set of records to maintain
themarks secured by students in Term1, Term2, and their
divisions.After the creation of the table, he entered data of 7
students in the table.

ADNO ROLLNO SNAME TERM1 TERM2 DIVISION

Page 6 of
123 101 KARAN 366 410 I
245 102 NAMAN 300 350 I
128 103 ISHA 400 410 I
129 104 RENU 350 357 I
234 105 ARPIT 100 205 II
187 106 SABINA 100 205 II
181 107 NEELAM 470 450 I

Write the output of the following SQL Queries:


a) ADNO, ROLLNO & NAME can be considered as candidate key.
b) SNAME
KARAN
ISHA
RENU
NEELAM
c) DIVISION MAX(TERM1) MIN(TERM2)
I 470 350
II 100 205
d) MOD(Term1,10)
6
0
0
0
0
0
QNo Section-E (3 x 5 = 15 Marks) Mark
. s
35. Ans. a. 5

or any similar layout (with proper justification)


b. The most suitable place to house the server is the Science
Block as it has a maximumnumber of computers. Thus, reducing
the cabling cost and increasing efficiency of the network.
c. (ii) Switch is the device to be installed in each of
the blocks to connect all thecomputers.
d. Satellite connection.
e. WAN
36. A. 5
i. 2
ii. 18
B. print(df_exam.loc[(df_exam.X == 'English') OR (df_exam.XII ==
'English'), 'Day'])

Page 7 of
O
R
C. df_exam.loc[df_exam.X == 'Sanskrit', 'XII'] = 'IP'
D. df.rename(columns={'Day': 'Weekday'}, inplace=True)

37. ANS: 5
a. Select Mod(75 , 45);
b. Select now();
c. Select left(‘Jaipur Region’,5);
d. Select pow(17,2);
e. Select round(1789.897,2);
OR
a. MOD() : Remainder of X/Y
select mod(13,5);
mod(13,5)
3
b. Monthname(): returns the name of the month for a
given date.
select monthname('2017-09-14');
+ +
| monthname('2017-09-14') |
+ +
| September |
+ +
c. Trim() : Removes both leading (left) and Trailing (right
)Spaces from given string.
Select Trim(### India Shining## ‘)
Output :
India Shining

d. Power(x,y): x raise to the power of


y. select power(2,3);
power(2,3)
8
e. Right() : extract N characters from the right side of a given
String. Syntax Right(String, No of Characters to be extracted)
Example:
Select Right ( ‘Orange’, 3)
Output :
nge

Page 8 of

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy