0% found this document useful (1 vote)
981 views84 pages

12 I Prevision Papers 2025

Uploaded by

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

12 I Prevision Papers 2025

Uploaded by

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

अनुक्रम ांक/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 12
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 12
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 12
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 12
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 Account
3
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 12
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 12
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 12
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 12
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.
S p o r t s : 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 12
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 12
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 12
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 12
केन्द्रीय विद्यालय सं गठन, जयपुर संभाग
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 way. 2
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 number 5
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 10
c) MODIFY
d) SELECT
5. An organization purchase new computers every year and dumps the old one into 1
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 10
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 10
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 10
Explain with suitable example.
27. (A) Priya is using her internet connection to book a train ticket. This is a classic 2
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 10
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 10
.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 for 4
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 10
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 10
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 10
Page 10 of 10
केन्द्रीय विद्यालय संगठन, जयपुर संभाग
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 old 1
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 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.
(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 table. 2
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 automobile; 3
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 11
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 the output 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 11
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:

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

Page 3 of 11
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 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):- df.loc(False) function can be used to find the 1
values where index value is False.
Reason (R):- Boolean indexing is a type of indexing and can be
used to retrieve the data.
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.

Page 4 of 11
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 by suggesting 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.
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'])}

Page 5 of 11
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 :
Name Marks
0 Ramesh 78
1 Suresh 86
2 Harish 92
3 Jayesh 68

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
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 SHOP_NAME QTY
PC01 Akhil Enterprises 10

Page 6 of 11
LC01 Nihal and Sons 5
PC03 Renuka Technologies 12
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
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, also save the output as a svg.

Page 7 of 11
OR
(B)Write a python program to plot a line chart based on the given data to
showcase the trend 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 8 of 11
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 are as follows:

Page 9 of 11
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 university campus for connecting the blocks.

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


server for this university with a suitable reason.

c. Suggest an efficient device form the following to be installed


in each of the blocks to connect 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 form the 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?
36. 5
Pooja, a student, has designed a DataFrame df_exam as
shown below. Consider this DataFrame and answer the following
questions.
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
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 is Sanskrit.
D. Rename the column name Day to Weekday.

Page 10 of 11
37. 5
(A) Write SQL query for the following:
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( )

Page 11 of 11
अनुक्रम ांक/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 8
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 the output 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 8
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 8
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 value is False.
Reason (R):- Boolean indexing is a type of indexing and can be
used to retrieve the data.
(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

Page 4 of 8
with different protocols by translating data between them.
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 8
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.

Page 6 of 8
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) 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 maximum number 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 the computers.
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 8
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 8

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