0% found this document useful (0 votes)
161 views172 pages

All in One Xii Ip Qp Ms 2024

This document is a sample question paper for Class XII in Informatics Practices for the session 2024-25, consisting of 37 questions divided into five sections with varying marks. The paper includes multiple-choice questions, programming tasks, and SQL queries, all primarily focused on Python and data handling concepts. It also emphasizes the importance of proper e-waste disposal and intellectual property rights in the digital world.

Uploaded by

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

All in One Xii Ip Qp Ms 2024

This document is a sample question paper for Class XII in Informatics Practices for the session 2024-25, consisting of 37 questions divided into five sections with varying marks. The paper includes multiple-choice questions, programming tasks, and SQL queries, all primarily focused on Python and data handling concepts. It also emphasizes the importance of proper e-waste disposal and intellectual property rights in the digital world.

Uploaded by

Vansh Beniwal
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/ 172

SAMPLE QUESTION PAPER (THEORY)

CLASS XII SESSION: 2024-25


INFORMATICS PRACTICES (065)

Time allowed: 3 Hours Maximum Marks:70

General 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 carries 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. Section-A (21 x 1 = 21 Marks) Marks


1 State whether the following statement is True or False:
1
Slicing can be used to extract a specific portion from a Pandas Series.

2 The purpose of WHERE clause in a SQL statement is to:


(A) Create a table
(B) Filter rows based on a specific condition 1
(C) Specify the columns to be displayed
(D) Sort the result based on a column

3 Identify the networking device responsible for routing data packets based on their
destination addresses.
(A) Modem
1
(B) Hub
(C) Repeater
(D) Router

Page 1 of 14
4 Identify the SQL command used to delete a relation (table) from a relational
database.
(A) DROP TABLE
1
(B) REMOVE TABLE
(C) DELETE TABLE
(D) ERASE TABLE

5 e-waste refers to:


(A) Software that has become obsolete
(B) Data that has been deleted from a storage device 1
(C) Viruses that infect computers
(D) Electronic devices that are no longer in use

6 Which of the following Python statements can be used to select a column


column_name from a DataFrame df ?
(A) df.getcolumn('column_name')
1
(B) df['column_name']
(C) df.select('column_name')
(D) df(column_name)

7 By default, the plot() function of Matplotlib draws a ______ plot.


(A) histogram
(B) column 1
(C) bar
(D) line

8 State whether the following statement is True or False:


In SQL, the HAVING clause is used to apply filter on groups formed by the GROUP 1
BY clause.

9 Which of the following Python statements is used to import data from a CSV file
into a Pandas DataFrame (Note: pd is an alias for pandas)?
(A) pd.open_csv('filename.csv')
1
(B) pd.read_csv('filename.csv')
(C) pd.load_csv('filename.csv')
(D) pd.import_csv('filename.csv')

10 What is plagiarism? 1

Page 2 of 14
(A) Using copyrighted material without giving proper acknowledgement to the
source
(B) Downloading illegal software.
(C) Spreading misinformation online.
(D) Hacking into computer systems.

11 Fill in the Blank


The COUNT(*) function provides the total number of __________ within a
relation (table) in a relational database.
(A) Columns 1
(B) Unique values
(C) Not-null values
(D) Rows

12 In which of the network topologies do all devices connect to a central point, such
as a switch or hub?
(A) Star
1
(B) Bus
(C) Tree
(D) Mesh

13 In a Pandas DataFrame, if the tail() function is used without specifying the


optional argument indicating the number of rows to display, what is the default
number of rows displayed, considering the DataFrame has 10 entries?
(A) 0 1
(B) 1
(C) 4
(D) 5

14 Identify the type of cybercrime that involves sending fraudulent emails to deceive
individuals into revealing sensitive information.
(A) Hacking
1
(B) Phishing
(C) Cyberbullying
(D) Cyberstalking

15 While creating a Series using a dictionary, the keys of the dictionary become:
1
(A) Values of the Series

Page 3 of 14
(B) Indices of the Series
(C) Data type of the Series
(D) Name of the Series

16 Match the following SQL functions/clauses with their descriptions:

SQL Function Description


P. MAX() 1. Find the position of a substring in a string.
Q. SUBSTRING() 2. Returns the maximum value in a column.
R. INSTR() 3. Sorts the data based on a column.
S. ORDER BY 4. Extracts a portion of a string. 1

(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 Fill in the Blank


Boolean indexing in Pandas DataFrame can be used for _______.
(A) Creating a new DataFrame
1
(B) Sorting data based on index labels
(C) Joining data using labels
(D) Filtering data based on condition

18 Which Matplotlib plot is best suited to represent changes in data over time?
(A) Bar plot
(B) Histogram 1
(C) Line plot
(D) Histogram & Bar plot

19 Which type of network covers a small geographical area like a single office,
building, or school campus?
(A) PAN
1
(B) MAN
(C) LAN
(D) WAN

Q-20 and Q-21 are Assertion (A) and Reason (R) Type questions. Choose
the correct option as:

Page 4 of 14
(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): We can add a new column in an existing DataFrame.


1
Reason (R): DataFrames are size mutable.

21 Assertion (A): In SQL, INSERT INTO is a Data Definition Language (DDL)


Command.
1
Reason (R): DDL commands are used to create, modify, or remove database
structures, such as tables.

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

22 (A) What is a Series in Python Pandas? Also, give a suitable example to support
your answer.
OR
(B) What does the term 'library' signify in Python? Mention one use for each of 2
the following libraries:
• Pandas
• Matplotlib

23 What are intellectual property rights (IPR), and why are they important in the
2
digital world?

24 Consider the string: "Database Management System". Write suitable SQL


queries for the following:
2
I. To extract and display "Manage" from the string.
II. Display the position of the first occurrence of "base" in the given string.

25 (A) What is Internet and how does it differ from World Wide Web (WWW)?
OR
2
Explain the concept of browser cookies and mention one advantage of using
(B) them.

Page 5 of 14
26 Define the term Primary Key in a database. Explain how it is different from a
2
Candidate Key.

27 Mention two health concerns associated with excessive use of Digital Devices. 2

28 (A) Sneha is writing a Python program to create a DataFrame using a list of


dictionaries. However, her code contains some mistakes. Identify the errors,
rewrite the correct code, and underline the corrections made.
import Pandas as pd
D1 = {'Name': 'Rakshit', 'Age': 25}
D2 = {'Name': 'Paul', 'Age': 30}
D3 = {'Name': 'Ayesha", 'Age': 28}
data = [D1,D2,D3)
df = pd.Dataframe(data)
print(df)
OR
(B) Complete the given Python code to get the required output (ignore the dtype
2
attribute) as
Output:
Tamil Nadu Chennai
Uttar Pradesh Lucknow
Manipur Imphal

Code:
import _______ as pd
data = ['Chennai','_______','Imphal']
indx = ['Tamil Nadu','Uttar Pradesh','Manipur']
s = pd.Series(_______, indx)
print(_______)

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

29 Ayesha's family is replacing their old computer with a new one. They decide to
throw the old computer in a nearby empty field/plot.
I. Explain any one potential environmental hazard associated with
improper e-waste disposal. 3
II. Suggest one responsible way to Ayesha's family for proper disposal of
their old computer.
III. Describe the importance of recycling in e-waste management.

Page 6 of 14
30 (A) Write a Python program to create the following DataFrame using a list of
dictionaries.
Product Price
0 Laptop 60000
1 Desktop 45000
2 Monitor 15000
3 Tablet 30000
3
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.
Russia Moscow
Hungary Budapest
Switzerland Bern
31 I. Write an SQL statement to create a table named STUDENTS, with the
following specifications:

Column Name Data Type Key


StudentID Numeric Primary Key
FirstName Varchar(20) 2+1=3
LastName Varchar(10)
DateOfBirth Date
Percentage Float(10,2)
II. Write SQL Query to insert the following data in the Students Table
1, Supriya, Singh, 2010-08-18, 75.5

32 (A) Consider the following tables:


Table 1:
EMPLOYEE which stores Employee ID (EMP_ID), Employee Name
(EMP_NAME), Employee City (EMP_CITY)
Table 2:
PAYROLL which stores Employee ID (EMP_ID), Department 3
(DEPARTMENT), Designation (DESIGNATION), and Salary (SALARY) for
various employees.
Note: Attribute names are written within brackets.
Table: EMPLOYEE
EMP_I EMP_CITY
EMP_NAME
D
Page 7 of 14
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 department-wise average Salary.
II. List all designations in the decreasing order of Salary.
III. Display employee name along with their corresponding
departments.
OR
Consider the following tables:
(B)
Table 1:
ATHLETE, which stores AthleteID, Name, Country. The table displays
basic information of the athletes
Table 2:
MEDALS, which stores AthleteID, Sport, and Medals. The table displays
the number of medals won by each athlete in their respective sports.
Table: ATHLETE
AthleteID Name COUNTRY
101 Arjun INDIA
102 Priya INDIA
103 Asif UAE
104 Rozy USA
105 David DENMARK
Table: MEDALS
AthleteID Sport Medals
101 Swimming 8
102 Track 3
103 Gymnastics 5
104 Swimming 2
105 Track 6
Write appropriate SQL queries for the following:

Page 8 of 14
I. Display the sports-wise total number of medals won.
II. Display the names of all the Indian athletes in uppercase.
III. Display the athlete name along with their corresponding sports

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

33 During a practical exam, a student Ankita has to fill in the blanks in a Python
program that generates a bar chart. This bar chart represents the number of
books read by four students in one month.

Books
Student Name Read
Karan 12
Lina 9
Raj 5
Simran 3

Help Ankita to complete the code.

import _____ as plt #Statement-1


students = ['Karan', 'Lina', 'Raj', 'Simran']
books_read = [12, 9, 5, 3]
plt.bar( students, _____, label='Books Read') #Statement-2
plt.xlabel('Student Name')
plt._____('Books Read') #Statement-3
plt.legend()
plt.title('_____') #Statement-4
plt.show()

Page 9 of 14
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 y-axis.
IV. Refer the graph shown above and fill the blank in Statement-4 with
suitable Chart Title.

34 (A) Rahul, who works as a database designer, has developed a database for a
bookshop. This database includes a table BOOK whose column (attribute)
names are mentioned below:

BCODE: Shows the unique code for each book.


TITLE: Indicates the book’s title.
AUTHOR: Specifies the author’s name.
PRICE: Lists the cost of the book.
Table: BOOK

PRIC
BCODE TITLE AUTHOR E
B001 MIDNIGHT’S CHILDREN SALMAN RUSHDIE 500
THE GOD OF SMALL
B002 THINGS ARUNDHATI ROY 450
B003 A SUITABLE BOY VIKRAM SETH 600
B004 THE WHITE TIGER ARAVIND ADIGA 399
KHUSHWANT 4
B005 TRAIN TO PAKISTAN SINGH 350

I. Write SQL query to display book titles in lowercase.


II. Write SQL query to display the highest price among the books.
III. Write SQL query to display the number of characters in each
book title.
IV. Write SQL query to display the Book Code and Price sorted by
Price in descending order.
OR
(B) Dr. Kavita has created a database for a hospital's pharmacy. The database
includes a table named MEDICINE whose column (attribute) names are
mentioned below:
MID: Shows the unique code for each medicine.

Page 10 of 14
MED_NAME: Specifies the medicine name
SUPP_CITY: Specifies the city where the supplier is located.
STOCK: Indicates the quantity of medicine available.
DEL_DATE: Specifies the date when the medicine was delivered.
Table: MEDICINE
MID MED_NAME SUPP_CITY STOCK DEL_DATE
M01 PARACETAMOL MUMBAI 200 2023-06-15
M02 AMOXICILLIN KOLKATA 50 2023-03-21
M03 COUGH SYRUP 120 2023-02-10
BENGALURU
M04 INSULIN CHENNAI 135 2023-01-25
M05 IBUPROFEN 30 2023-04-05
AHMEDABAD

Write the output of the following SQL Queries.


I. Select LENGTH(MED_NAME) from MEDICINE where STOCK >
100;
II. Select MED_NAME from MEDICINE where month(DEL_DATE)
= 4;
III. Select MED_NAME from MEDICINE where STOCK between 120
and 200;
IV. Select max(DEL_DATE) from MEDICINE;

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

35 ABC Pvt. Ltd., a multinational technology company, is looking to establish its


Indian Head Office in Bengaluru, and a regional office branch in Lucknow. The
Bengaluru head office will be organized into four departments: HR, FINANCE,
5
TECHNICAL, AND SUPPORT. As a network engineer, you have to propose
solutions for various queries listed from I to V.

Page 11 of 14
The shortest distances between the departments/offices are as follows:
HR TO FINANCE 65 M
HR TO TECHNICAL 80 M
HR TO SUPPORT 70 M
FINANCE TO TECHNICAL 60 M
FINANCE TO SUPPORT 75 M
TECHNICAL TO SUPPORT 50 M
BENGALURU OFFICE TO LUCKNOW 1900 KM

The number of computers in each department/office is as follows:


HR 175
FINANCE 35
TECHNICAL 50
SUPPORT 15
LUCKNOW OFFICE 40

I. Suggest the most suitable department in the Bengaluru Office Setup,


to install the server. Also, give a reason to justify your suggested
location.
II. Draw a suitable cable layout of wired network connectivity between the
departments in the Bengaluru Office.
III. Which networking device would you suggest the company to purchase
to interconnect all the computers within a department in Bengaluru
Office?
IV. The company is considering establishing a network connection
between its Bengaluru Head Office and Lucknow regional office. Which

Page 12 of 14
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 monitor their performance after login. Would you
recommend a static or dynamic website, and why?

36 Consider the DataFrame df shown below.


MovieID Title Year Rating
0 1 LAGAAN 2001 8.4
1 2 TAARE ZAMEEN PAR 2007 8.5
2 3 3 IDIOTS 2009 8.4
3 4 DANGAL 2016 8.4
4 5 ANDHADHUN 2018 8.3

Write Python statements for the DataFrame df to: 5

I. Print the first two rows of the DataFrame df.


II. Display titles of all the movies.
III. Remove the column rating.
IV. Display the data of the 'Title' column from indexes 2 to 4 (both
included)
V. Rename the column name 'Title' to 'Name'.

37 (A) Write suitable SQL query for the following:


I. To display the average score from the test_results column
(attribute) in the Exams table
II. To display the last three characters of the
registration_number column (attribute) in the Vehicles
table. (Note: The registration numbers are stored in the format
DL-01-AV-1234)
III. To display the data from the column (attribute) username in the 5
Users table, after eliminating any leading and trailing spaces.
IV. To display the maximum value in the salary column (attribute)
of the Employees table.
V. To determine the count of rows in the Suppliers table.
(B)
OR
Write suitable SQL query for the following:
I. Round the value of pi (3.14159) to two decimal places.

Page 13 of 14
II. Calculate the remainder when 125 is divided by 8.
III. Display the number of characters in the word 'NewDelhi'.
IV. Display the first 5 characters from the word 'Informatics
Practices'.
V. Display details from 'email' column (attribute), in the
'Students' table, after removing any leading and trailing
spaces.

Page 14 of 14
MARKING SCHEME
CLASS XII SESSION: 2024-25
INFORMATICS PRACTICES (065)

Time allowed: 3 Hours Maximum Marks:70

Q No. Section-A Marks


1 True
1
(1 mark for correct answer)

2 (B). Filter rows based on a specific condition


1
(1 mark for correct answer)

3 (D). Router
1
(1 mark for correct answer)

4 (A). DROP TABLE


1
(1 mark for correct answer)

5 (D). Electronic devices that are no longer in use


1
(1 mark for correct answer)

6 (B). df['column_name']
1
(1 mark for correct answer)

7 (D). line
1
(1 mark for correct answer)

8 True
1
(1 mark for correct answer)

9 (B). pd.read_csv('filename.csv')
1
(1 mark for correct answer)

10 (A) Using copyrighted material without giving proper acknowledgement to


the source 1
(1 mark for correct answer)

11 (D). Rows
1
(1 mark for correct answer)

12 (A). Star 1

Page 1 of 8
(1 mark for correct answer)

13 (D). 5
1
(1 mark for correct answer)

14 (B). Phishing
1
(1 mark for correct answer)

15 (B). Indices of the Series


1
(1 mark for correct answer)

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


1
(1 mark for correct answer)

17 (D). Filtering data based on condition


1
(1 mark for correct answer)

18 (C). Line plot


1
(1 mark for correct answer)

19 (C). LAN
1
(1 mark for correct answer)

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

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


1
(1 mark for correct answer)

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

22 (A) A Series is a one-dimensional array containing a sequence of values of any


data type (int, float, list, string, etc) which by default have numeric data
labels starting from zero.
We can imagine a Pandas Series as a column in a spreadsheet. An
example of a series containing the names of students is given below: 2
Index Value
0 Arnab
1 Samridhi
2 Ramit
3 Divyam
(1 mark for correct definition)

Page 2 of 8
(1 mark for correct example)
OR
(B) Library: A collection of modules providing functionalities for specific tasks.
Pandas: Used for data analysis
Matplotlib: Used for creating plots
(1 mark for correct definition)
(1/2 mark each for correct use of each library)

23 Intellectual Property Rights (IPR)


These are legal rights that protect the creations of the human intellect. The nature
of these works can be artistic, literary or technical etc.
Importance in the digital world
These rights help prevent the unauthorized use or reproduction of digital content 2
and ensure that creators are fairly compensated and incentivized for their original
work.
(1 mark for correct definition)
(1 mark for correct importance)

24 I. SELECT SUBSTRING('Database Management System', 10, 6);


II. SELECT INSTR('Database Management System', 'base'); 2
(1 mark for each correct query)

25 (A) The Internet is a vast network of interconnected computer networks


facilitating global communication and data exchange. The World Wide Web
(WWW), on the other hand, is a system of interlinked hypertext documents
accessed via the Internet.
(1 mark for correct definition)
(1 mark for correct difference)
OR 2
(B) Browser cookies: Small pieces of data stored on our digital devices by
websites to remember information and personalize our experience.
Advantage: Improve user experience by remembering preferences, like our
preferred language and other settings.
(1 mark for correct definition)
(1 mark for correct advantage)

Page 3 of 8
26 Primary Key : A set of attributes that can uniquely identify each row in a table
(relation). It must contain unique values and cannot be null.
How it differs from Candidate Key
There can be multiple Candidate Keys in a table (relation), but only one of them 2
is selected as Primary Key.
(1 mark for correct definition)
(1 mark for correct difference)

27 Two health concerns due to excessive use of Digital Devices:


a) Eye strain and vision problems.
2
b) Musculoskeletal issues like neck and back pain.
(1 mark for each correct health concern)

28 (A) import pandas as pd


D1 = {'Name': 'Rakshit', 'Age': 25}
D2 = {'Name': 'Paul', 'Age': 30}
D3 = {'Name': 'Ayesha', 'Age': 28}
data = [D1, D2, D3]
df = pd.DataFrame(data)
print(df)

Changes Made :
i. Changed Pandas to pandas.
ii. Corrected mismatched string quotation marks
iii. Corrected the closing parenthesis in the list data. 2
iv. Changed Dataframe to DataFrame.
(1/2 mark for each correct correction and underlining)

OR

(B) import pandas as pd


data = ['Chennai', 'Lucknow', 'Imphal']
indx = ['Tamil Nadu','Uttar Pradesh','Manipur']
s = pd.Series(data, indx)
print(s)
(1/2 mark for each correct fill in the blank)

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

29 I. E-waste can release harmful substances like lead and mercury into the
environment.
(1 mark for correct answer)
II. They can donate or sell it to a certified e-waste recycling center.
3
(1 mark for correct answer)
III. Recycling e-waste helps conserve natural resources and reduces
pollution.
(1 mark for correct answer)

30 (A) import pandas as pd


d1 = {'Product': 'Laptop', 'Price': 60000}
d2 = {'Product': 'Desktop', 'Price': 45000}
d3 = {'Product': 'Monitor', 'Price': 15000}
d4 = {'Product': 'Tablet', 'Price': 30000}
data = [d1, d2, d3, d4]
df = pd.DataFrame(data)
print(df)
(1 mark for correct import statement)
(1 mark for correct list of dictionary) 3
(1 mark for correct creation of DataFrame)
OR
(B) import pandas as pd
data = {'Russia':'Moscow','Hungary':'Budapest','Switzerland':'Bern'}
s = pd.Series(data)
print(s)
(1 mark for correct import statement)
(1 mark for correct dictionary)
(1 mark for correct creation of Series)

31 I.
CREATE TABLE STUDENTS (
3
StudentID NUMERIC PRIMARY KEY,
FirstName VARCHAR(20),

Page 5 of 8
LastName VARCHAR(10),
DateOfBirth DATE,
Percentage FLOAT(10,2)
);
(2 mark for correct creation of Table)

II.
INSERT INTO STUDENTS (StudentID, FirstName, LastName,
DateOfBirth, Percentage) VALUES (1, 'Supriya', 'Singh', '2010-08-18',
75.5);
(1 Mark for correct insert Query)

32 (A) I. SELECT DEPARTMENT, AVG(SALARY) FROM PAYROLL


GROUP BY DEPARTMENT;
II. SELECT DESIGNATION FROM PAYROLL ORDER BY SALARY
DESC;
III. SELECT EMP_NAME, DEPARTMENT FROM EMPLOYEE E,
PAYROLL P WHERE E.EMP_ID=P.EMP_ID;
(1 mark for each correct query)
OR
3
(B) I. SELECT SPORT,SUM(Medals) FROM MEDALS GROUP BY
SPORT;
II. SELECT UPPER(Name) FROM ATHLETE WHERE COUNTRY
= 'INDIA';
III. SELECT NAME, SPORT FROM ATHLETE A, MEDALS M
WHERE
A.AthleteID= M.AthleteID;
(1 mark for each correct query)

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

33 I. matplotlib.pyplot
II. books_read
III. ylabel 4
IV. Number of Books Read by Students
(1 mark for each correct answer)

Page 6 of 8
34 (A) I. SELECT LOWER(TITLE) FROM BOOK;
II. SELECT MAX(PRICE) FROM BOOK;
III. SELECT LENGTH(TITLE) FROM BOOK;
IV. SELECT BCODE, PRICE FROM BOOK ORDER BY PRICE DESC;
(1 mark for each correct answer)
OR
(B) I.
LENGTH(MED_NAME)
11
11
7

II.
4
MED_NAME
IBUPROFEN

III.
MED_NAME
PARACETAMOL
COUGH SYRUP
INSULIN

IV.
max(DEL_DATE)
2023-06-15
(1 mark for each correct answer)

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

35 I. The server should be installed in the HR department as it has the most


number of computers. 5
II. Star topology

Page 7 of 8
III. Switch/Hub
IV. WAN (Wide Area Network) will be created as the offices are located in
different cities.
V. A dynamic website is recommended as it can display the dynamic
performance data (which differs from employee to employee) of each
employee.
(1 mark for each correct answer)

36 I. print(df.head(2))
II. print(df['Title'])
III. df = df.drop(‘Rating’, axis=1)
5
IV. print(df.loc[2:4,'Title'])
V. df.rename(columns={'Title':'Name'}, inplace=True)
(1 mark for each correct answer)

37 (A) I. SELECT AVG(test_results) FROM Exams;


II. SELECT RIGHT(registration_number, 3) FROM Vehicles;
III. SELECT TRIM(username) FROM Users;
IV. SELECT MAX(salary) FROM Employees;
V. SELECT COUNT(*) FROM Suppliers;
(1 mark for each correct query)
OR 5
(B) I. SELECT ROUND(3.14159, 2);
II. SELECT MOD(125, 8);
III. SELECT LENGTH('NewDelhi');
IV. SELECT LEFT('Informatics Practices', 5);
V. SELECT TRIM(email) FROM Students;
(1 mark for each correct query)

Page 8 of 8
SAMPLE QUESTION PAPER
CLASS XII
INFORMATICS PRACTICES (065)
TIME: 03 HOURS M.M.: 70
General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A has 18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has 02 questions carrying 04 marks each.
7. Section E has 03 questions carrying 05 marks each.
8. All programming questions are to be answered using Python Language only.
SECTION A

1. A ____________is a device that connects the organisation’s network with the 1


outside world of the Internet.
i. Hub
ii. Modem
iii. Gateway
iv. Repeater

2. When e-waste such as electronic circuit boards are burnt for disposal, the 1
elements contained in them create a harmful chemical called ________which
causes skin diseases, allergies and an increased risk of lung cancer.
i. Hydrogen
ii. Beryllium
iii. Chlorine
iv. Oxygen

3. Copyright, Patent and Trademark comes under: 1


i. Intellectual Property Right
ii. Individual Property Right
iii. Industrial Property Right
iv. International Property Right

4. Predict the output of the following query: 1


SELECT MOD (9,0);
i. 0
ii. NULL
iii. NaN
iv. 9
5. Which of the following SQL functions does not belong to the Math functions 1
category?
i. POWER()
ii. ROUND()
iii. LENGTH()
iv. MOD()

6. ________ is not a FOSS tool. 1


i. Libre Office
ii. Mozilla Firefox
iii. Google Chrome
iv. Python

7. CSV stands for: 1


i. Column Separated Value
ii. Class Separated Value
iii. Comma Separated Value
iv. Comma Segregated Value

8. Raj, a Database Administrator, needs to display the average pay of workers 1


from those departments which have more than five employees. He is
experiencing a problem while running the following query:

SELECT DEPT, AVG(SAL) FROM EMP WHERE COUNT(*) > 5


GROUP BY DEPT;

Which of the following is a correct query to perform the given task?

i. SELECT DEPT, AVG(SAL) FROM EMP WHERE COUNT(*) > 5


GROUP BY DEPT;
ii. SELECT DEPT, AVG(SAL) FROM EMP HAVING COUNT(*) >
5 GROUP BY DEPT;
iii. SELECT DEPT, AVG(SAL) FROM EMP GROUP BY DEPT
WHERE COUNT(*) > 5;
iv. SELECT DEPT, AVG(SAL) FROM EMP GROUP BY DEPT
HAVING COUNT(*) > 5;

9. Predict the output of the following query: 1


SELECT LCASE (MONTHNAME ('2023-03-05'));
i. May
ii. March
iii. may
iv. march
10. Which of the following command will show the last 3 rows from a Pandas 1
Series named NP?
i. NP.Tail( )
ii. NP.tail(3)
iii. NP.TAIL(3)
iv. All of the above

11. With reference to SQL, identify the invalid data type. 1


i. Date
ii. Integer
iii. Varchar
iv. Month

12. In Python Pandas, while performing mathematical operations on series, index 1


matching is implemented and all missing values are filled in with _____by
default.
i. Null
ii. Blank
iii. NaN
iv. Zero

13. By restricting the server and encrypting the data, a software company's 1
server is unethically accessed in order to obtain sensitive information. The
attacker blackmails the company to pay money for getting access to the data,
and threatens to publish sensitive information unless price is paid. This kind
of attack is known as:
i. Phishing
ii. Identity Theft
iii. Plagiarism
iv. Ransomware

14. In SQL, the equivalent of UCASE() is: 1


i. UPPERCASE ()
ii. CAPITALCASE()
iii. UPPER()
iv. TITLE ()

15. Collection of hyper linked documents available on the internet is known 1


as_______________.
i. Website
ii. Webpage
iii. Web Server
iv. Web Hosting
16. _______________is a non-profit organization that aims to build a publicly 1
accessible global platform where a range of creative and academic work is
shared freely.
i. Creative Cost
ii. Critical Commons
iii. Creative Commons
iv. Creative Common

17. Assertion (A):- MODEM stands for modulator-demodulator. 1


Reasoning (R): - It is a computer hardware device that converts data from a
digital format to analog and vice versa.
i. Both A and R are true and R is the correct explanation for A
ii. Both A and R are true and R is not the correct explanation for A
iii. A is True but R is False
iv. A is false but R is True

18. Assertion (A):- To use the Pandas library in a Python program, one must 1
import it.
Reasoning (R): - The only alias name that can be used with the Pandas library
is pd.
i. Both A and R are true and R is the correct explanation for A
ii. Both A and R are true and R is not the correct explanation for A
iii. A is True but R is False
iv. A is false but R is True

SECTION B

19. Briefly explain the basic concepts of a web server and web hosting. 2
OR
Rati is doing a course in networking. She is unable to understand the concept of
URL. Help her by explaining it with the help of suitable example.

20. The python code written below has syntactical errors. Rewrite the correct code 2
and underline the corrections made.
Import pandas as pd
df ={"Technology":["Programming","Robotics","3D
Printing"],"Time(in months)":[4,4,3]}
df= Pd.dataframe(df)
Print(df)

21. Consider the given SQL string: 2


“12#All the Best!”
Write suitable SQL queries for the following:
i. Returns the position of the first occurrence of the substring “the” in
the given string.
ii. To extract last five characters from the string.
22. Predict the output of the given Python code: 2
import pandas as pd
list1=[-10,-20,-30]
ser = pd.Series(list1*2)
print(ser)

23. Differentiate between the active digital footprint and passive digital footprints. 2

24. Complete the given Python code to get the required output as: Rajasthan 2
import _________ as pd
di = {'Corbett': 'Uttarakhand', 'Sariska':
'Rajasthan', 'Kanha': 'Madhya Pradesh’,
'Gir':'Gujarat'}
NP = ___________. Series( _____ )
print(NP[ ___________ ])

25. What are aggregate functions in SQL? Name any two. 2

SECTION C

26. Based on the SQL table CAR_SALES, write suitable queries for the following: 3
+--------+-------------------+--------+-------+-------+
| NUMBER | SEGMENT | FUEL | QT1 | QT2 |
+--------+-------------------+--------+-------+-------+
| 1 | Compact HatchBack | Petrol | 56000 | 70000 |
| 2 | Compact HatchBack | Diesel | 34000 | 40000 |
| 3 | MUV | Petrol | 33000 | 35000 |
| 4 | MUV | Diesel | 14000 | 15000 |
| 5 | SUV | Petrol | 27000 | 54000 |
| 6 | SUV | Diesel | 18000 | 30000 |
| 7 | Sedan | Petrol | 8000 | 10000 |
| 8 | Sedan | Diesel | 1000 | 5000 |
+--------+-------------------+--------+-------+-------+
i. Display fuel wise average sales in the first quarter.
ii. Display segment wise highest sales in the second quarter.
iii. Display the records in the descending order of sales in the second
quarter.
OR
Predict the output of the following queries based on the table CAR_SALES
given above:
i. SELECT LEFT(SEGMENT,2) FROM CAR_SALES WHERE FUEL=
"PETROL";
ii.SELECT (QT2-QT1)/2 "AVG SALE" FROM CAR_SALES WHERE
SEGMENT= "SUV";
iii. SELECT SUM(QT1) "TOT SALE" FROM CAR_SALES WHERE
FUEL= "DIESEL";
27. Create a DataFrame in Python from the given list: 3
[[‘Divya’,’HR’,95000],[‘Mamta’,’Marketing’,97000],[‘Payal’,’IT’,980000],
[‘Deepak’,’Sales’,79000]]
Also give appropriate column headings as shown below:

28. Write MySQL statements for the following: 3


i. To create a database named FOOD.
ii. To create a table named Nutrients based on the following specification:
Column Name Data Type Constraints
Food_Item Varchar(20) Primary Key
Calorie Integer

29. Richa, recently started using her social media account. Within a few days, she 3
befriends many people she knows and some that she does not know. After
some time, she starts getting negative comments on her posts. She also finds
that her pictures are being shared online without her permission.
Based on the given information, answer the questions given below.
i. Identify the type of cybercrime she is a victim of.
ii. Under which act, she can lodge a complaint to the relevant authorities?
iii. Suggest her any two precautionary measures which she should take in
future while being online to avoid any such situations.
OR
Mention any three health hazards associated with inappropriate and excessive
use of gadgets.

30. Consider the given DataFrame ‘Genre’: 3


Type Code
0 Fiction F
1 Non Fiction NF
2 Drama D
3 Poetry P

Write suitable Python statements for the following:


i. Add a column called Num_Copies with the following data:
[300,290,450,760].
ii. Add a new genre of type ‘Folk Tale' having code as “FT” and 600
number of copies.
iii. Rename the column ‘Code’ to ‘Book_Code’.
SECTION D

31. Preeti manages database in a blockchain start-up. For business purposes, she 4
created a table named BLOCKCHAIN. Assist her by writing the following
queries:
TABLE: BLOCKCHAIN

i. Write a query to display the year of oldest transaction.


ii. Write a query to display the month of most recent transaction.
iii. Write a query to display all the transactions done in the month of May.
iv. Write a query to count total number of transactions in the year 2022.

32. Ekam, a Data Analyst with a multinational brand has designed the DataFrame 4
df that contains the four quarter’s sales data of different stores as shown below:
Store Qtr1 Qtr2 Qtr3 Qtr4
0 Store1 300 240 450 230
1 Store2 350 340 403 210
2 Store3 250 180 145 160
Answer the following questions:
i. Predict the output of the following python statement:
a. print(df.size)
b. print(df[1:3])
ii. Delete the last row from the DataFrame.
iii. Write Python statement to add a new column Total_Sales which is the
addition of all the 4 quarter sales.
OR
(Option for part iii only)
Write Python statement to export the DataFrame to a CSV file named data.csv
stored at D: drive.

SECTION E

33. Write suitable SQL queries for the following: 5


i. To calculate the exponent for 3 raised to the power of 4.
ii. To display current date and time.
iii. To round off the value -34.4567 to 2 decimal place.
iv. To remove all the probable leading and trailing spaces from the
column userid of the table named user.
v. To display the length of the string ‘FIFA World Cup’.
OR
Kabir has created following table named exam:
+-------+---------+------------------+-------+
| RegNo | Name | Subject | Marks |
+-------+---------+------------------+-------+
| 1 | Sanya | Computer Science | 98 |
| 2 | Sanchay | IP | 100 |
| 3 | Vinesh | CS | 90 |
| 4 | Sneha | IP | 99 |
| 5 | Akshita | IP | 100 |
+-------+---------+------------------+-------+
Help him in writing SQL queries to the perform the following task:
i. Insert a new record in the table having following values:
[6,'Khushi','CS',85]
ii. To change the value “IP” to “Informatics Practices” in subject
column.
iii. To remove the records of those students whose marks are less than
30 .
iv. To add a new column Grade of suitable datatype.
v. To display records of “Informatics Practices” subject.

34. XYZ Media house campus is in Delhi and has 4 blocks named Z1, Z2, Z3 and 5
Z4. The tables given below show the distance between different blocks and the
number of computers in each block.
The company is planning to form a network by joining these blocks.
i. Out of the four blocks on campus, suggest the location of the server that
will provide the best connectivity. Explain your response.
ii. For very fast and efficient connections between various blocks within the
campus, suggest a suitable topology and draw the same.
iii. Suggest the placement of the following devices with justification
(a) Repeater
(b) Hub/Switch
iv. VoIP technology is to be used which allows one to make voice calls
using a broadband internet connection. Expand the term VoIP.
v. The XYZ Media House intends to link its Mumbai and Delhi centers.
Out of LAN, MAN, or WAN, what kind of network will be created?
Justify your answer.

35. The heights of 10 students of eighth grade are given below: 5

Height_cms=[145,141,142,142,143,144,141,140,143,144]

Write suitable Python code to generate a histogram based on the given data,
along with an appropriate chart title and both axis labels.
Also give suitable python statement to save this chart.
OR
Write suitable Python code to create 'Favourite Hobby' Bar Chart as
shown below:

Also give suitable python statement to save this chart.


MARKING SCHEME
SAMPLE QUESTION PAPER
CLASS XII
INFORMATICS PRACTICES (065)
TIME: 03 HOURS M.M.: 70
General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A has 18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has 02 questions carrying 04 marks each.
7. Section E has 03 questions carrying 05 marks each.
8. All programming questions are to be answered using Python Language only.
SECTION A

1. iii. Gateway 1
(1 mark for correct answer)

2. ii. Beryllium 1
(1 mark for correct answer)

3. i. Intellectual Property Right 1


(1 mark for correct answer)

4. iv. NULL 1
(1 mark for correct answer)

5. iii. LENGTH () 1
(1 mark for correct answer)

6. iii. Google Chrome 1


(1 mark for correct answer)

7. iii. Comma Separated Value 1


(1 mark for correct answer)

8. iv. SELECT DEPT, AVG(SAL) FROM EMP GROUP BY DEPT HAVING 1


COUNT(*) > 5;
(1 mark for correct answer)

9. iv. march 1
(1 mark for correct answer)

10. ii. NP.tail(3) 1


(1 mark for correct answer)
11. iv. Month 1
(1 mark for correct answer)

12. iii. NaN 1


(1 mark for correct answer)

13. iv. Ransomware 1


(1 mark for correct answer)

14. iii. UPPER( ) 1


(1 mark for correct answer)

15. i. Website 1
(1 mark for correct answer)

16. iii. Creative Commons 1


(1 mark for correct answer)

17. i. Both A and R are true and R is the correct explanation for A 1
(1 mark for correct answer)

18. iii. A is True but R is False 1


(1 mark for correct answer)

SECTION B

19. Web server: A web server is used to store and deliver the contents of a website 2
to clients such as a browser that request it. A web server can be software or
hardware.
Web hosting: It is a service that allows to put a website or a web page onto
the Internet, and make it a part of the World Wide Web.
(1 mark each for each correct explanation)
OR
URL: It stands for Uniform Resource Locator. It provides the location and
mechanism (protocol) to access the resources over the internet.

URL is sometimes also called a web address. It not only contains the domain
name, but other information as well that completes a web address.

Examples:
https://www.cbse.nic.in, https://www.mhrd.gov.in, http://www.ncert.nic.in,
http://www.airindia.in, etc.
(1 mark for correct explanation)
(1 mark for correct example)
20. import pandas as pd 2
df ={"Technology":["Programming","Robotics","3D
Printing"],"Time(in months)":[4,4,3]}
df= pd.DataFrame(df)
print(df)
(1/2 mark for each correction)

21. i. SELECT INSTR("12#All the Best!","the"); 2


ii. SELECT RIGHT("12#All the Best!",5);
(1 mark for each correct query)

22. 0 -10 2
1 -20
2 -30
3 -10
4 -20
5 -30
(2 marks for correct output)

23. Active Digital Footprints: Active digital footprints include data that we 2
intentionally submit online. This would include emails we write, or responses or
posts we make on different websites or mobile Apps, etc.
Passive Digital Footprints: The digital data trail we leave online
unintentionally is called passive digital footprints. This includes the data
generated when we visit a website, use a mobile App, browse Internet, etc.
(2 marks for correct differentiation)

24. import pandas as pd 2


di = {'Corbett': 'Uttarakhand', 'Sariska':'Rajasthan', 'Kanha': 'Madhya
Pradesh','Gir':'Gujarat'}
NP = pd.Series( di)
print(NP[ 'Sariska'])
(1/2 mark for each correct fill-up)

25. Aggregate functions: These are also called multiple row functions. These 2
functions work on a set of records as a whole, and return a single value for each
column of the records on which the function is applied.

Max(), Min(), Avg(), Sum(), Count() and Count(*) are few examples of multiple
row functions.
(1 mark for correct explanation)
(½ mark each for two correct names)
SECTION C
26. i. SELECT FUEL, AVG(QT1) FROM CAR_SALES GROUP BY FUEL; 3
ii. SELECT SEGMENT, MAX(QT2) FROM CAR_SALES GROUP BY
SEGMENT;
iii. SELECT * FROM CAR_SALES ORDER BY QT2 DESC;
(1 mark for each correct query)
OR
i.
+-----------------+
| LEFT(SEGMENT,2) |
+-----------------+
| Co |
| MU |
| SU |
| Se |
+-----------------+
ii.
+------------+
| AVG SALE |
+------------+
| 13500.0000 |
| 6000.0000 |
+------------+
iii.
+----------+
| TOT SALE |
+----------+
| 67000 |
+----------+
(1 mark each correct output)

27. import pandas as pd #Statement 1 3


df=[["Divya","HR",95000],["Mamta","Marketing",97000
],["Payal","IT",980000], ["Deepak","Sales",79000]]
#Statement 2
df=pd.DataFrame(df,columns=["Name","Department",
"Salary"])#Statement 3
print(df) #Statement 4
(#Statement 1 & 4 – ½ mark each)
(#Statement 2 & 3 – 1 mark each)
28. i. CREATE DATABASE FOOD; 3
(1 mark for correct answer)
ii. CREATE TABLE NUTRIENTS(NAME VARCHAR(20) PRIMARY
KEY,CALORIES INTEGER);

(½ mark for CREATE TABLE NUTRIENTS


½ mark each for correctly specifying each column
½ mark for correctly specifying primary key)

29. i. She is a victim of Cyber Bullying. 3


ii. Information Technology Act, 2000 (also known as IT Act).
iii. a. Need to be careful while befriending unknown people on the
internet.
b. Never share personal credentials like username and password with
others.
(1 mark for each correct answer)
OR
Simran needs to be made aware of the following consequences:
i) Eye strain ii) Painful muscles and joints iii) Poor memory
iv) Lack of sleep v) Back pain and neck pain
(1 mark each for writing any 3 correct health hazards)

30. i. Genre["Num_Copies"]=[300,290,450,760] 3
ii. Genre.loc[4]=["Folk Tale","FT",600]
iii.Genre=Genre.rename({"Code":"Book_Code"},
axis=1)
OR
Genre=Genre.rename({"Code":"Book_Code"},
axis="columns")
(1 mark for each correct statement)

SECTION D

31. i. SELECT YEAR(MIN(TRANSACTION_DATE)) FROM 4


BLOCKCHAIN;
ii. SELECT MONTH(MAX(TRANSACTION_DATE)) FROM
BLOCKCHAIN;
iii. SELECT * FROM BLOCKCHAIN WHERE MONTHNAME
(TRANSACTION_DATE)='MAY';
iv. SELECT COUNT(ID) FROM BLOCKCHAIN WHERE
YEAR(TRANSACTION_DATE)=2022;
(1 mark for each correct query)
32. i. a. 15 4
b. Store Qtr1 Qtr2 Qtr3 Qtr4
1 Store2 350 340 403 210
2 Store3 250 180 145 160
( ½ mark for each correct output/statement)
ii. df=df.drop(2)
OR
df.drop(2,axis=0)
(1 mark for correct statement)
iii.
df["total"]=df["Qtr1"]+df["Qtr2"]+df["Qtr3"]+df["Qtr
4"]
OR
df.to_csv(“D:\data.csv”)
(2 mark for correct statement)

SECTION E

33. i. SELECT POWER(3,4); 5


ii. SELECT NOW();
iii.SELECT ROUND(-34.4567,2);
iv. SELECT TRIM(USERID) FROM USER;
v. SELECT LENGTH("FIFA World Cup");
(1 mark for each correct query)
OR
Ans:
i. INSERT INTO EXAM VALUES(6,'Khushi','CS',85);
ii. UPDATE EXAM SET subject= "Informatics
Practices" where subject = "IP";
iii. DELETE FROM EXAM WHERE marks<30;
iv. ALTER TABLE EXAM ADD COLUMN grade varchar(2);
v. Select * from exam where subject="Informatics
Practices";
(1 mark for each correct query)

34. i. Z2 as it has maximum number of computers. 5


ii. For very fast and efficient connections between various blocks within
the campus suitable topology: Star Topology
iii. Repeater: To be placed between Block Z2 to Z4 as distance between
them is more than 100 metres.
Hub/Switch: To be placed in each block as each block has many
computers that needs to be included to form a network.
iv. Voice Over Internet Protocol
v. WAN as distance between Delhi and Mumbai is more than 40kms.
(1 mark for each correct answer)

35. import matplotlib.pyplot as plt #Statement 1 5


Height_cms=[145,141,142,142,143,143,141,140,143,144]
#Statement 2
plt.hist(Height_cms) #Statement 3
plt.title("Height Chart") #Statement 4
plt.xlabel("Height in cms") #Statement 5
plt.ylabel("Number of people") #Statement 6
plt.show() #Statement 7
(½ mark each for each correct statement 1,2,4,5,6,7)
(1 mark for correct statement 3)

plt.savefig("heights.jpg")

(1 mark for the correct statement)


OR
import matplotlib.pyplot as plt #Statement 1
hobby = ('Dance', 'Music', 'Painting', 'Playing
Sports') #Statement 2
users = [300,400,100,500] #Statement 3
plt.bar(hobby, users) #Statement 4
plt.title("Favourite Hobby") #Statement 5
plt.ylabel("Number of people") #Statement 6
plt.xlabel("Hobbies") #Statement 7
plt.show() #Statement 8
(½ mark for each correct statement)
plt.savefig("hobbies.jpg")
(1 mark for the correct statement)
KENDRIYA VIDYALAYA SANGATHAN AGRA REGION
FIRST PRE BOARD EXAMINATION (Session 2023-24)
Class : XII Time : 03:00 Hours
Subject : (065) Informatics Practices Maximum Marks : 70

General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying02 marks each.
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has 02 Long Answer type questions carrying 04 marks each.
7. Section E has 03 questions carrying 05 marks each. One internal choice is
given in Q 35 against part c only.
8. All programming questions are to be answered using Python Language only.
9.

PART A
1. There are numerous websites, which provide search facility for searching the 1
contents on
a) Internet b) Website c)Web Page d) LAN
2. It is an act of copying another person’s data idea, words or work and pretended 1
that they are our own.
a) Copyright b) Virus c) Plagiarism d) IPR
3. Feasible method(s) to manage e-Waste. 1
a) Reducing b) Reusing c) Recycling d) All of these
4. Which type of values will not considered by SQL while executing the following 1
statement?
SELECT COUNT(column name) FROM INVENTORY;
a) Numeric value
b) Text value
c) Null value
d) Date value
5. In column “Margin “contains the data set(2.00,2.00,NULL,4.00,NULL,3.00,3.00) 1
what will be the output of after the execution of the given query?
SELECT AVG(Margin) FROM SHOP;
a) 2.9 b) 2.8 c)2.00 d) All of these

Page 1 of 10
6. ‘P’ in IPR stands for 1
a) Proprietary
b) Platform
c) Patent
d) Property
7. Which of the following is not a category of MySQL functions? 1
a) Text Functions
b) Mathematical Functions
c) Statistical Group Functions
d) Memory Handling Functions

8. What is the output of the following SQL Command : 1


SELECT ROUND(458.45,-1)
a) 460
b) 450
c) 458
d) 500
9. Which of the following function is the correct syntax of LCASE() function? 1
a) LCASE(row_name)
b) LCE(column_name)
c) LCASE(string/column_name)
d) None of the above
10. To display Third Element of a Series object S, you will write : 1
a) S[:3]
b) S[2]
c) S[3]
d) S[:2]
11. 1
Which of the following is a 2-dimensional array containing a sequence of
values in Python?
(a) Relation
(b) DataFrame
(c) Series

Page 2 of 10
(d) Square

12. What will be the output of the Python program mentioned below ? 1
import pandas as pd
df=pd.DataFrame(['Apple','Banana','Orange','Grapes','Guava'])
print(df[2:4:2])
a) 0
2 Orange
b) Empty DataFrame
Columns:[0]
Index:[ ]
c) 0
2 Banana
d) 0
2 Banana
4 Grapes
13. An online discussion group that allow direct live communication is known as 1
a) e-mail
b) Hyperlink
c) Chat group
d) Web Crawler
14. Which function extracts the year value from a date. 1
a) CURRENT( )
b) DAY-YEAR( )
c) YEAR( )
d) MONTH( )
15. What is the name of the IT law that India is having in the Indian Legislature? 1
a) India’s Technology(IT) Act,2000
b) India’s Digital Information Technology(DIT),Act,2000
c) India’s Information Technology(IT),Act ,2000
d) The Technology Act,2008
16. Which of the following are automatically granted to creators and authors? 1
a) Copyright
b) Patent
c) Trademark
d) Netiquette

Page 3 of 10
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the
correct choice as
i. Both A and R are true and R is the correct explanation for A
ii. Both A and R are true and R is not the correct explanation for A
iii. A is True but R is False
iv. A is false but R is True
17. ASSERTION (A): MODEM stands for modulator-demodulator 1
REASONING(R): It is a computer hardware device that converts data from a
digital format to analog and vice versa

18. ASSERTION(A):drop() function removes data from a Dataframe temporarily. 1

REASONING(R): Axis parameter is compulsory with drop() function.

PART B
19 What is a Website and Webpage? 2
OR
What is a network? Why is it needed?
20 Gopi Krishna is using a table Employee .it has the following Columns: 2
Code,Name,Salary,Deptcode

SELECT Deptcode,MAX(Salary) FROM Employee;


He wants to display maximum salary for each department. But he did not get the
desired result .Rewrite the above query with necessary change to help him get the
desired result.
21. What is NULL ? How it is different from Zero ? How are NULL values treated 2
by aggregate functions?
22. Consider the given Series object Subject: 2
Index Marks
English 75
Hindi 78
Math 82
Science 88

Page 4 of 10
Write a program in python pandas to create this series using a dictionary.

23. Name the methods for proper treatment of e-waste. 2


OR
What is meant by digital footprint and how to manage it suggest any two
guidelines.
24. What will be the output of the following code: 2

>>>import pandas as pd
>>>nums=pd.Series([9,8,7,6,5],index=range(0,10,2))
>>>print(nums[1:3])
25. Consider the code given below and answer the following question: 2
Ld=[{'a',10,'b':20},{'a':5,'b':10,'c':20}]
df=pd.DataFrame(Ld)
print(df)
i) Write the missing statement in the above code which will give error.
ii) How many columns will be there in the dataframe.
SECTION C

26 Consider a table “Salesman” with the following data: 3


Table : Salesman

Sno Sname Salary Bonus DOJ


A01 Beena Mehta 30000 45.23 2019-10-29
A02 K.L. Sahay 50000 25.34 2018-03-2013
B03 Nisha Thakkar 30000 35.00 2017-03-18
B04 Leela Yadav 80000 NULL 2018-12-31
C05 Gautam Gola 20000 NULL 1989-01-23

Write SQL queries using SQL functions to perform the following operations.
(i) Display salesman name and bonus after rounding off to zero decimal places.
(ii) Display the month name for the date of join of salesman.
(iii) Display the minimum salary of the Salesman.
OR
Page 5 of 10
What is the purpose of GROUP BY clause in MySQL? How is it different from
ORDER BY clause?
27. Write a python code to create a DataFrame with appropriate column headings 3
from the list given below:
[[201,’Gurmeet’,95],[202,’Praveen’,89],[203,’Suman’,97],[204.’Yogesh’,91]]

28. Consider the given DataFrame ‘Fees’: 3

Cname Fee
0 XII 3500
1 XI 3000
2 X 2700
3 VII 1800

Write suitable Python statements for the following:


i. Add a column called ‘Section’ with the following data:
[‘A’,’B’,’C’,’D’].
ii. Add a new Class Name named ‘IX' having price 1800 and Section “B”.
iii. Remove the column ‘Section’.
29 Samridh has recently changed his school so he is not aware of the people, but 3
someone is posting negative demeaning comments on his social media profile.
He is also getting repeated mails from unknown people. Every time he goes
online, he finds someone chasing him online.
i. Samridh is a victim of ___________.
ii. The action that Samridh should take to handle it.
iii. .......................... is a set of moral principles that governs the behavior of a
group or individual and regulates the use of computers.
OR
What Is the Difference Between a Patent, Copyright, and Trademark?
30. Write SQL commands for the statements (i) to (iii) which are based on the given 3
table PERSON.

Page 6 of 10
PI PINCO SALAR
SNAME FNAME GEN CITY
D DE Y
SHARM UDHAMW
1 GEET F 182141 50000
A ARA
SURINDE
2 SINGH M KUPWARA 193222 75000
R
3 JCOB PETER M BHAWANI 185155 45000
AHMED
4 ALVIS THOMAS M 380025 50000
NAGAR
COOLANG
5 MOHAN GAURAV M 390026 33000
ATTA
NEW
6 AZMI SIMI F 110021 40000
DELHI
MANPRE UDHAMW
7 KAUR F 182141 42000
ET ARA

i) SELECT SUM(SALARY) FROM PERSON WHERE GEN=’F’;


ii) SELECT GEN,COUNT(*) FROM PERSON GROUP BY
GENDER;
iii) SELECT MOD(SALARY,4000) FROM PERSON WHERE
CITY=‘UDHAMWARA’;

SECTION D
31 Naveen, a database administrator has designed a database for a Computer Stock. 4
Help her by writing answers of the following questions based on the given table:
TABLE: Stock
Pid Pname Category Qty Price
1 Keyboard IQ 15 450
2 Mouse IQ 10 350
3 Wi-fi router NW 5 2600
4 Switch NW 3 3000
5 Printer O 4 17000

i. Write a query to display product name in upper case.


ii. To display the records in descending order of the price.
iii. To display category and category wise highest price of product.
IV. To display the total quantity of all products.

Page 7 of 10
32. Mr. Ankit is working in an organization as data analyst. He uses Python Pandas
1+1+2
and Matplotlib for the same. He got a dataset of the passengers for the year 2010
to 2012 for January, March and December. His manager wants certain information
from him, but he is facing some problems. Help him by answering few questions
given below:
Year Month Passengers
0 2010 Jan 25
1 2010 Mar 50
2 2012 Jan 35
3 2010 Dec 55
4 2012 Dec 65

A. Predict the output of the following python statement:


i. df.tail(3)
ii. df[df.Passengers>50]
iii.Write Python statement to display the data of year column of indexes 1 to 3.
OR (Option for part iii only)

Write the Python code to rename the name of the column name is ‘mon_name’in
place of “Month” in the above Dataframe.

SECTION E

33. Write suitable SQL query for the following: 5


i. Display 7 characters extracted from 7th left character onwards from the
string ‘INDIA SHINING’.
ii. Display the position of occurrence of string ‘COME’ in the string
‘WELCOME WORLD’.
iii. Round off the value 78.779 to 2nd decimal place.
iv. Display the remainder of 149 divided by 6.
v. Remove all the expected leading and trailing spaces from a column userid
of the table ‘USERS’ and convert to lowercase.
OR

Page 8 of 10
Explain the following SQL functions using suitable examples.
i. LENGTH()
ii. TRIM()
iii. NOW()
iv. DAYNAME()
v. POWER()
v. POWER(
34. Trine Tech Corporation (TTC) is a professional consultancy company. The 5
company is planning to set up their new offices in India with its hub at Hyderabad.
As a network adviser, you have to understand their requirement and suggest them
the best available solutions. Their queries are mentioned as (i) to (v) below.
Physical location of the blocks of TTC

Human Conference
Resources Block Block

Finance Block

Blocks to block distance(in meter)


Block(From) Block(To) Distance
Human Resource Conference 110
Human Resource Finance 40
Conference Finance 80
Expected number of computers to be in each block
Block Computers
Human Resource 25
Finance 120

Conference 90
(i)Which will be the most appropriate block, where TTC should plan to install their
server?
(ii) Draw a block to block cable layout to connect all the buildings in the most
appropriate manner for efficient communication.

Page 9 of 10
(iii) Which of the following device will be suggested by you to connect each
computer in each of the buildings?
(a) Switch
(b) Modem
(c) Gateway
(iv) The company is planning to connect its admission office to Hyderabad which
is more than 1000 km from company. Which type of network will be formed?
(v)what will be the best possible connectivity out f the following you will suggest
to connect the new setup of offices in Hyderabad with its London based office.
a) Satellite Link
b) Infrared
c) Ethernet
35 Mr. Sharma is working in a game development industry and he was comparing the 5
given chart on the basis of the rating of the various games available on the play
store.

Write the python code for the above graph – each bar having a different color and
X – axis and Y – axis having a suitable lable. Also give suitable python statement
to save this chart.
OR
Write a python program to plot a line chart based on the given data to depict
the pass percentage of students in CBSE exams for the years 2015 to 2018 as
shown below.
Year=[2015,2016,2017,2018]
Pass_Percentage=[82,83,85,90]

END OF PAPER

Page 10 of 10
Page 11 of 10
KENDRIYA VIDYALAYA SANGTHAN AGRA REGION
First PREBOARD EXAMINATION 2023-24
MARKING SCHEME
CLASS XII
INFORMATICS PRACTICES(065)
TIME:3 HOURS M.M.70
General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
5. Section Chas 05 Short Answer type questions carrying 03 marks each.
6. Section D has 02 Long Answer type questions carrying 04 marks each.
7. Section E has 03 questions carrying 05 marks each.
8. All programming questions are to be answered using Python Language/SQL
only.

SECTION A
1. a)Internet 1
1 mark for correct answer
2. c)Plagiarism 1
1 mark for correct answer
3. d) All of these 1
1 mark for correct answer
4. c)Null value 1
1 mark for correct answer
5. b) 2.8 1
1 mark for correct answer
6. d) Property 1
1 mark for correct answer
7. d) Memory Handling Functions 1
1 mark for correct answer
8. a) 460 1
1 mark for correct answer
9. c)LCASE(str/column_name) 1
1 mark for correct answer
10. b) S[2] 1
1 mark for correct answer
11 (b) DataFrame 1
1 mark for correct answer

PAGE 1 OF 6
12. (a) 0 1
2 Orange
1 mark for correct answer
13. c)Chat group 1
1 mark for correct answer
14. c)YEAR() 1
1 mark for correct answer
15. c)India’s Information Technology(IT),Act ,2000 1
1 mark for correct answer
16. a) Copyright 1
1 mark for correct answer
Q17and18 are ASSERTION AND REASONING based questions. Mark the correct
choice as
i. Both A and R are true and R is the correct explanation for A
ii. Both A and R are true and R is not the correct explanation for A
iii. A is True but R is False
iv. A is false but R is True
17. i) Both A and R are true and R is the correct explanation for A 1

18. i) Both A and R are true and R is the correct explanation for A 1
.
SECTION B
19 Website: A group of related webpages that follow the same theme and 2
are connected together with hyperlinks is called a Website.
Webpage: web page is an electronic document designed using HTML.it
displays information in textual or graphical form.
1 mark for correct explanation of each term
OR
Network: A network is an interconnected collection of autonomous computers that
can share and exchange information.
1 mark for correct explanation

Need of Networking:
i. Resource sharing
ii. Reliability
iii. Cost effective
iv. Fast data sharing
½ mark for each (any two)
20 SELECT Deptcode, MAX(Salary) FROM Employee GROUP BY Deptcode; 2

1 Mark for error identification


1 Mark for writing correct query

PAGE 2 OF 6
21. Null is a Specifier / Constraint represents that the actual value is absent for the ½+1
particular column. Null is different from zero because zero is a Numeric Value that +½
can be used in Arithmetic / Logical operations but NULL can not be used like this.
None of the aggregate functions takes NULL into consideration. NULL is simply
Ignored by all the aggregate functions excepts COUNT(*).
2 marks for correct answer with example.
22. import pandas as pd 2
d={‘English’:75,’Hindi’:78,’Math’:82,’Science’:88}
Subject=pd.Series(d)
print(Subject)
½ marks for import statement
½ marks for using dictionary
1 mark for creating Series( )
23. 1.Recycling/recovery of valuable material. 2
2.Dismantling
3. Refurbishment and reuse
4. Disposal of dangerous materials and waste

½ mark for each correct answer


OR
On the internet, a digital footprint is the word used to describe the train, traces or
footprints that people leave online. This is information transmitted online, such as
forum registration-mails and attachments, uploading videos or digital images.
1mark for each correct answer
Guidelines of Digital Footprint
1.know what your digital footprints is
2.keep your digital foot print clean
½ mark for each correct point

24. 2 8 2
4 7
1 mark for each correct row
25. i) import pandas as pd 2
ii) 3 columns
1 mark for each correct answer

SECTION C
26 ANS: 3
(i) SELECT Sname, ROUND(Bonus,0)FROM Salesman;
(ii) SELECT MONTHNAME(DOJ) FROM Salesman;
(iii) SELECT MIN(SALARY) FROM Salesman;
1 mark for each correct query
OR
The GROUP BY clause can be used to combine all those records that have identical
value in a particular field or a group of fields. Whereas, ORDER BY clause is used
to display the records either in ascending or descending order based on a particular
field. For ascending order ASC is used and for descending order, DESC is used. The

PAGE 3 OF 6
default order is ascending order.
1 mark for correct significance 2 marks for correct example

27 import pandas as pd 3
data=[[201,’Gurmeet’,95],[202,’Praveen’,89],[203,’Suman’,97],[204.’Yogesh’,91]]
df=pd.DataFrame(data,columns=['Rno','Name', 'Marks'])
1 mark for each correct python statement
28 i. Fees['Section']= [‘A’,’B’,’C’,’D’]
ii. Fees.loc['4']=['IX',1800]
iii. Fees=Fees.drop('Section',axis=1)
1 mark for each correct statement
29 i. Cyber stalking 3
ii. He should bring to the notice of his parents and school authorities.
iii. Computer ethics

OR 3
A patent protects new inventions, processes.
A copyright protects original works of authorship.
A trademark includes words, phrases, designs, or any combination of
these that particularly identify a good or service.

30. Write SQL commands for the statements (i) to (iii) which are based on the given 3
table MASTER.
i)132000
ii)GEN COUNT(*)
F 3
M 4
ii) 2000
2000
SECTION D
31 i. SELECT UPPER(PNAME) FROM STOCK; 4
ii. SELECT * FROM STOCK ORDER BY PRICE DESC;
iii. SELECT CATEGORY,MAX(PRICE) FROM STOCK GROUP BY CATEGORY;
IV SELECT SUM(QTY) FROM STOCK;
1 mark for each correct query

PAGE 4 OF 6
32. A)
i) 2 2012 Jan 35 1+1+2
3 2010 Dec 55
4 2012 Dec 65
ii) 55
65
1 mark for each correct output
B ) Python statement:
print(df.loc[1: 3, 'year'])
OR
df.rename(columns={‘Month’ : ’mon_name’)

2 marks for correct Python statement

SECTION E
33. i. select mid('INDIA SHINING',7,7); 5
ii. select INSTR('WELCOME WORLD','COME');
iii. select round(78.779,2);
iv. select mod(149,6);
v. select lower(trim(userid)) from users;

1 mark for each correct query


OR
1. LENGTH():This function returns the length of the string in bytes. It includes the count of
blank spaces in the string.
Syntax
LENGTH(string/column_name)
EXAMPLE :
SELECT LENGTH('easycalculation');
Output:
15
2. TRIM(): It removes the leading and trailing spaces from the given string.
Example:
SELECT TRIM(‘ Welcome world ‘ );
Output:
Welcome world
3. This function returns the current date and time in the format ‘YYYY-MM-DD
HH:MM:SS’ or YYYYMMDDHHMMSS format.
Syntax NOW()
e.g. mysql> SELECT NOW()
Output:
‘YYYY-MM-DD HH:MM:SS’ or YYYYMMDDHHMMSS format of current date
4. DAYNAME(): It returns the weekday name for a given date
Example:
SELECT DAYNAME(‘2022-07-22’);
PAGE 5 OF 6
Output:
Friday
5. POWER(): It returns the value of a number raised to the power of another number.
Example:
SELECT POW(6,2);
Output:
36
½ mark for each correct explanation
½ mark for each correct example

34. i) TTC should install its server in finance block as it is having maximum number of 5
computers.
ii) Human Resources Conference Block
Block

Finance Block

The above layout is based on minimum cable length required which is 120 meter in
the above case.
iii) Switch
iv)WAN
v) Satellite Link
35 import matplotlib.pyplot as plt 5
Games=["Subway Surfer","TempleRun","CandyCrush","BottleShot","RunnerBest"]
Rating=[4.2,4.8,5.0,3.8,4.1]
plt.bar(Games,Rating,color = [“green”,”red”,”yellow”,”cyan”,”magenta”])
plt.xlabel("Games")
plt.ylabel("Rating”) plt.show()
½ mark for each correct statement
Python statement to save the chart:
plt.savefig("aa.jpg")
1 mark for the correct statement
OR
import matplotlib.pyplot as plt 1/2MARK
Year=[2015,2016,2017,2018] 1/2 MARK
Pass_Percentage=[82,83,85,90] 1 MARK
plt. plot(Year,Pass_Percentage) 1 MARK
plt.xlabel("Year") 1/2 MARK
plt.ylabel("Pass_Percentage”) 1/2 MARK
plt.show() 1 MARK

END OF PAPER

PAGE 6 OF 6
KENDRIYA VIDYALAYA SANGATHAN, CHENNAI REGION
PRE BOARD EXAMINATION 2023-24 12INF01 QP
CLASS XII SUBJECT: INFORMATICS PRACTICES (065)
TIME: 03 Hours M.M.:70

General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has 02 questions carrying 04 marks each.
7. Section E has 03 questions carrying 05 marks each.
8. All programming questions are to be answered using Python Language only.

SECTION A
1 ATM network of an bank in a city is an example of : 1
a) PAN b) LAN c)WAN d)MAN
2 Which of the following is NOT a type of a cyber-crime? 1
a) Identity theft
b) Software privacy
c) Installing antivirus software
d) Hacking
3 To display first four elements of a Series S 1
a) S[:4]
b) S.head[4]
c) S[4:]
d) both a) and b)
4 Which of the following SQL function will display the current time and date? 1
a) NOW() b)DATE() c)YEAR() d) Both a) & b)
5 Which of the following devices can connect different sub networks? 1
a) Hub b) Switch c) Repeater d) Router
6 Which of the following SQL function does NOT belong to the Math function category? 1
a) POWER() b)ROUND() c)LENGTH() d)MOD()
7 IPR stands for ____ 1
a) Interactive Property Resources
b) Intellectual Property Rights
c) Interactive Property Rights
d) Intellectual Property Resources
8 For which of the command the output will be 69.77 1
a) Select round(69.7654,3)
b) Select truncate(69.7654,3)
c) Select round(69.7654,2)
d) Select truncate(69.7654,2)
9 Which library is to be imported for creating DataFrame? 1
a) DataFrame b)Python c)Random d)Pandas
10 Which of the following is not the attribute of DataFrame? 1
a)empty b)size c)type d)columns
11 The _____________ function is used in SQL to find one string into another. 1
a)substr() b)instr() c)mid() d)left()
12 Code of the software will be protected by ___________ 1
a) Copyright b) Patent c) registered trademark d) none of these
13 ______ clause is used with SELECT statement to display data in a sorted form with respect to a 1
specified column
a) WHERE b)ORDER BY c) HAVING d) DISTINCT
14 What is an example of e-waste? 1
a) A ripened banana
b) An old computer
c) Old clothes
d) Empty soda cans
15 To remove the leading and trailing space from data values in a column of MySQL table, we use 1
a) Left() b) Right() c) Trim() d)Rtrim()
16 Which of the following is Net etiquette? 1
a) Be Ethical
b) Be Respectful
c) Be Responsible
d) All of the above
17 Assertion (A): Internet cookies are text files that contain small pieces of data like a username, 1
password while surfing the internet.
Reason (R): To make browsing the internet faster & easier, its required to store certain
information on the server’s computer.
a)Both A and R are true and R is the correct explanation for A
b)Both A and R are true and R is not the correct explanation for A
c) A is True but R is False
d)A is false but R is True
18 Assertion (A): To delete a column from Panda DataFrame, drop () method is used. 1
Reason (R) : Columns are deleted by dropping columns with index label.
a)Both A and R are true and R is the correct explanation for A
b)Both A and R are true and R is not the correct explanation for A
c) A is True but R is False
d)A is false but R is True
SECTION B
19 Differentiate between static and dynamic webpage. 2
Or
Mention any four networking goals.
20 The python code written below has syntactical errors. Rewrite the correct code and underline the 2
corrections made.
import Pandas as pd
Import numpy as np
s=pd.Series[1,2,3,4]
Print(s.index)
21 Consider the given SQL string: 2
“Informatics Practices Exam”
Write suitable SQL queries for the following:
i. Returns the position of the first occurrence of the substring “mat” in the given string.
ii. To extract last six characters from the string
22 What will be the output of the following code: 2
>>>import pandas as pd
>>>A=pd.Series(data=[16,25,45,20])
>>>print(A>30)
23 What is identity theft? Give example 2

24 Complete the given Python code: 2


import pandas as pd
import numpy as np
Name = _________ .array([‘Anil’,’Sumit’,’Akhil’,’Ananya’])
___________ = __________ . DataFrame(____)
print(DF)
25 Briefly explain the purpose of the following: 2
i. power()
ii. mod()
SECTION C
26 Based on the SQL table EXAM, write suitable queries for the following: 3

Adno SName Percentage clasection Stream


1001 Sai 80.5 12A Science
1002 Krish 90.5 12B Commerce
1003 Swathika 94.5 12A Science
1004 Malavika 76.7 12A Science
i. To display all information of the students of Commerce in descending order of
percentage
ii. To display Adno, SName, Percentage of those students whose name is less than 6
characters long.
iii. To insert a new row in the table EXAM (1005,’Ananya’,65.5,’12B’,’Commerce’)
OR
Predict the output of the following queries based on the table EXAM given above:
i. SELECT COUNT * FROM EXAM;
ii. SELECT SName, Percentage FROM EXAM WHERE Name LIKE “N%”;
iii. SELECT ROUND (Percentage, 0) FROM EXAM WHERE Adno = “1004”;

27 Create a DataFrame in Python from the given list: 3


[[‘Kavya’, 250],[‘Ananya’,150],[‘Malini’,185],[‘Raja’,320]]
Also give appropriate column headings as shown below:
Name Wages
0 Kavya 250
1 Ananya 150
2 Malini 185
3 Raja 320
28 Predict the output of the following SQL queries 3
i. SELECT TRIM (“ ALL THE BEST “);
ii. SELECT LEFT(‘INFORMATICS’,6);
iii. SELECT UPPER(MID(“START UP INDIA”,10));

29 Mr, Ram who is a business man by profession faced following situations. Identify the type of 3
crime for each situation/incident happened to him?
i. He was constantly receiving abusive emails.
ii. He clicked on an unknown link received as a result his personal sensitive information
was acquired by someone
iii. His identity was used by someone to steal money.
OR
What are some side effects of spending too much time on computers?
30 Consider the given DataFrame ‘ Stock’ 3

Name Price
0 BSE 250
1 NSE 150
2 INX 185
3 MCX 320

Write suitable Python statements for the following:


i. Add a column called Special_Price with the following data: [220,115,145,285].
ii. Add a new Stock of Name ‘NCDEX’ having Price as 280
iii. Remove the column Price.
SECTION D
31 Vijay manages a database with the latest price of Electronic Devices. He created a table named 4
DEVICES. Assist him by writing the following Queries:

TABLE: DEVICES
PID PName Category Qty Price
1 Keyboard IO 15 450
2 Mouse IO 10 350
3 Wifi-router NW 5 2600
4 Switch NW 3 3000
5 Monitor O 10 4500
6 Printer O 4 17000
i. To display the records in decreasing order of Price.
ii. To display category and category wise total quantities of products.
iii. To display the category and its average Price.
iv. To display category and category wise highest price of the products.
32 Ram designed the DataFrame df that contains the temperature of different cities as shown 4
below:
City Maxtemp Mintemp Avgtemp Rainfall
0 Delhi 40 32 35 24.1
1 Mumbai 31 23 27 32.6
2 Chennai 29 21 25 26.2
Answer the following Questions:
i. Predict the output of the following python statement:
a. Print(df.size)
b. Print(df[1:3])
ii. Delete the last row from the DataFrame.
iii. Write python statement to add a new city named ‘Calcutta’ having Maxtemp 28,
Mintemp 19, Avgtemp 24, Rainfall 20.1
SECTION E
33 Write suitable SQL queries for the following: 5
i. Display name of the month from your date of birth.
ii. Convert email-id to lowercase
iii. Count the number of characters in your name
iv. To remove leading spaces from the ‘ VANDE BHARAT ‘.
v. Display the string ‘CHEST’ from the string ‘MANCHESTER UNITED’.

OR
Sanya has created following table named exam:

RegNo Name Subject Marks


1 Dhanya Computer Science 98
2 Sanjay IP 100
3 Vimala CS 85
4 Sneha IP 75
5 Akshay IP 100

Help him in writing SQL queries to perform the following task:


i. Insert a new record in the table having following values: [6,’Aarav’,’CS’,65]
ii. To change the value “IP” to “Informatics Practices” in subject column.
iii. To remove the records of those students whose marks are less than 40
iv. To add a new column Grade of suitable datatype.
v. To display records of “ Computer Science” subject

34 Learn together classes, is setting up its new campus at Jabalpur for its web- based activities. The 5
campus has 4 compounds:

.
Center to center distance is as follows:

Number of computers:

(i) Suggest the cable layout of connections between the compounds


(ii) Suggest the most suitable place to house the server. Justify your answer.
(iii) Suggest the placement of following devices with justification:
a)repeater b)hub/switch
(iv) Classes is planning to establish connection with its International office situated at
Mumbai, which out of the following wired communication will give very high speed
connectivity?
a)Telephone lines b)Optical fiber c) Ethernet d) All of them
(v) What kind of network will it be:
a)LAN b)WAN c)MAN d)PAN
35 Consider that survey has to be done on how much distance the following vehicles have covered 5
in a span of five days. Write suitable Python code to generate a Line Plot based on the given
data, along with an appropriate chart title and both axis labels.

BIKES
DAYS DISTANCE COVERED IN KMS
ENFIELD HONDA YAMAHA KTM
DAY 1 50 80 70 80
DAY 2 40 20 20 20
DAY 3 70 20 60 20
DAY 4 80 50 40 50
DAY 5 20 60 60 60

OR
Write a Python code to the following data for plotting the bar graph. Add the title, label for X-
axis, Y-axis.

English : 56,78,90,34
Science: 65,77,54,32
Maths: 45,67,43,41
KENDRIYA VIDYALAYA SANGATHAN, CHENNAI REGION
PRE BOARD EXAMINATION 2023-24 12INF01 MS
CLASS XII SUBJECT: INFORMATICS PRACTICES (065)
TIME: 03 Hours M.M.:70

General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has 02 questions carrying 04 marks each.
7. Section E has 03 questions carrying 05 marks each.
8. All programming questions are to be answered using Python Language only.

SECTION A
1 c) WAN 1
2 c) Installing Antivirus software 1
3 a) S[:4] 1
4 a)Now() 1
5 b)Switch 1
6 c)LENGTH() 1
7 b) Intellectual Property Rights 1
8 c)Select round(69.7654,2) 1
9 d)Pandas 1
10 c) type 1
11 b)instr() 1
12 a)copyright 1
13 b)ORDER BY 1
14 b)An old computer 1
15 c)Trim() 1
16 d)All of the above 1
17 Option a) is correct. 1
18 Option c) is correct. Explanation: To delete a column from Pandas DataFrame, drop () method is 1
used. Columns are deleted by dropping columns with column names
SECTION B
19 Static web page: 2
 Content on the server is served upto any visitor the same(every time)
 Contains simple HTML code
 No additional software is required
Dynamic web page:
 Content on the server is the same, but displays different data depending on information searched
 Contains dynamic code along with simple HTML code
 Additional software must be installed on the server to create the web page.
(1 mark for each correct differentiation)
OR
Four networking goals
i. Resource sharing
ii. Reliability
iii. Cost effective
iv. Fast data sharing (1/2 mark for each goals)
20 import pandas as pd 2
import numpy as np
s=pd.Series([1,2,3,4])
print(s.index)
(1/2 mark for each correction)
21 i. SELECT INSTR(“Informatics Practices Exam”, “mat”); 2
ii. SELECT RIGHT(“Informatics Practices Exam”,6);
(1 mark for each correct query)
22 0 False 2
1 False
2 True
3 False
(2 marks for correct output)
23 Stealing someone’s personal identifying information and pretends to be that person in order to 2
gain some financial benefits. Eg.:- using stolen credit card information.
(2 marks for correct explanation)
24 import pandas as pd 2
import numpy as np
Name = np.array([‘Anil’,’Sumit’,’Akhil’,’Ananya’])
DF = pd. DataFrame(Name)
print(DF)
(1/2 mark for each correct fill-up)
25 i. pow(m,n) returns the value m raise to power n 2
ii. mod(a,b) returns the remainder after a divide by b
(1 mark for each correct explanation )
SECTION C
26 i. SELECT * FROM EXAM WHERE Stream =’Commerce’ ORDER BY Percentage 3
DESC;
ii. SELECT Adno, SName, Percentage FROM EXAM WHERE LENGTH (SName)<6;
iii. INSERT INTO EXAM VALUES (1005,’Ananya’,65.5,’12B’,’Commerce’);
(1 mark for each correct query)
OR
i.
COUNT (*)
4
ii. The given query will result in an error as there is no column named Name in table
EXAM
iii.

ROUND(Percentage ,0)
77
(1 mark for each output)
27 import pandas as pd # Statement 1 3
df=[[“Kavya”,250], [“Ananya”,150], [“Malini”, 185], [“Raja”,320]] #Statement 2
df=pd.DataFrame(df,columns=[“Name”, “Wages”]) #Statement 3
print(df) # Statement 4
(#Statement 1 & 4 – ½ mark each)
(#Statement 2 & 3 –1 mark each)
28 i. “ALL THE BEST “ 3
ii. INFORM
iii. INDIA
(1 mark for each output)
29 i. Cyber Bullying 3
ii. Phishing
iii. Identity theft
(1 mark for each correct answer)
OR
i. The Internet can be addictive
ii. Can have a negative impact on our physical and psychological well being
iii. Muscle and joint problems
iv. Overuse injuries like swelling, pain, joint stiffness, weakness and numbness.
v. Eyestrain
(3 mark for any 3 correct explanation)
30 i. Stock[‘Special_Price’] = [220,115,145,285] 3
ii. Stock.loc[4] =[‘NCDEX’,280]
iii. Stock.drop([‘Price’], axis=1,inplace=True)
(1 mark for each correct statement)
SECTION D
31 i. SELECT * FROM DEVICES ORDER BY PRICE DESC; 4
ii. SELECT CATEGORY, SUM(QTY) FROM DEVICES GROUP BY CATEGORY;
iii. SELECT CATEGORY, AVG(PRICE) FROM DEVICES GROUP BY
CATEGORY;
iv. SELECT CATEGORY, MAX(PRICE) FROM DEVICES GROUP BY
CATEGORY;
(1 mark for each correct query)
32 i. a.15 4
b. City Maxtemp Mintemp Avgtemp Rainfall
1 Mumbai 31 23 27 32.6
2 Chennai 29 21 25 26.2
(1 mark for each correct output)
ii. df=df.drop(2)
or
df,drop(2,axis=0)
(1 mark for correct statement)
iii. df.loc[4]=[‘Calcutta’, 28,19,24,20.1]
(1 mark for correct statement)

SECTION E
33 i. SELECT MONTHNAME(‘2022-10-12’); 5
ii. SELECT LOWER(‘[email protected]’);
iii. SELECT COUNT(‘SHAHEETH’);
iv. SELECT LTRIM(‘ VANDE BHARAT ‘);
v. SELECT MID(‘MANCHESTER UNITED’,4,5);
(1 mark for each correct query)
OR
i. INSERT INTO EXAM VALUES(6,'Aarav','CS',65);
ii. UPDATE EXAM SET subject= "Informatics Practices" where subject = "IP";
iii. DELETE FROM EXAM WHERE marks <40;
iv. ALTER TABLE EXAM ADD COLUMN Grade varchar(2);
v. Select * from exam where subject="Computer Science";
(1 mark for each correct query)
34 (i) 5

(ii) Training Compound


(iii) (a)Repeater – not required as distance is less than 100 m
(b)hub- training compound
(iv) Optical fiber
(v) WAN
(1 mark for each correct answer)
35 import matplotlib.pyplot as plt 5
x=[1,2,3,4,5]
y=[50,40,70,80,20]
y2=[80,20,20,50,60]
y3=[70,20,60,40,60]
y4=[80,20,20,50,60]
plt.plot(x,y,’g’,label=’Enfield’,linewidth=5)
plt.plot(x,y2,’c’,label=’Honda’,linewidth=5)
plt.plot(x,y3,’k’,label=’Yamaha’,linewidth=5)
plt.plot(x,y4,’y’,label=’KTM’,linewidth=5)
plt.title(‘bike details in line plot’)
plt.ylabel(‘Distance in kms’)
plt.xlabel(‘Days’)
plt.legend()
plt.show()
(5 mark for correct code)
OR
import matplotlib.pyplot as pp
eng = [56,78,90,34]
sci = [65,77,54,32]
maths = [45,67,43,41]
pp.bar(eng,sci,maths)
pp.title(‘Subject Analysis’)
pp.xlabel(‘Marks’)
pp.ylabel(‘Subjects’)
pp.show()
(5 mark for correct code)
KENDRIYA VIDYALAYA SANGATHAN, HYDERABAD REGION 2023-24
INFORMATICS PRACTICES(065) CLASS XII
PREBOARD-1 (MARKING SCHEME)
MM:70
TIME:3Hrs.

SECTION-A
1 B .25 (1 mark for correct answer) 1
2 C SUM 1
3 B INSTR (1 mark for each correct answer) 1
4 A Uniform resource Locator (1 mark for each correct answer) 1
5 B read_csv (1 mark for each correct answer) 1
6 A Phishing (1 mark for each correct answer) 1
7 D Kitchen waste (1 mark for each correct answer) 1
8 c) Browser settings and web server (1 mark for each correct answer) 1
9 D S.data (1 mark for each correct answer) 1
10 D matplotlib 1
11 C Python (1 mark for each correct answer) 1
12 D SELECT * FROM EMPLOYEE ORDER BY DOJ ; 1
13 b) Server 1
14 D Both a and b (1 mark for each correct answer) 1
15 C Digital foot print 1
16 D 6700.00 (1 mark for each correct answer) 1
17 ii.Both A and R are true and R is not the correct explanation for A 1
18 i) Both A and R are true and R is the correct explanation for A 1
SECTION-B
19 ▪ Switch works similarly like hub but in a more efficient manner. It creates 2
connections dynamically and provides information only to the requesting
port.
▪ Router is smartest and most complicated out of the three. It comes in all
shapes and sizes. Routers are located at gateway and forwards packets in a
network.
1 mark for each Switch and Router
OR
Any four differences ½ Mark each
20 import pandas as pd 2
d={“Productname”:[“monitor”,”Keyboard”],”Price”:[4500,500]}
df=pd.DataFrame(d)
print(df)
½ mark for each correction

21 i) 2 2
ii) IS W

22 import pandas as pd½ mark 2


S=pd.series({“ENG”:23,”ECO”:24,”IP”:24,”ACCT”:26,”BST”:21})
1mark for any other correct statement
print(S) ½ mark
a) product.drop(“B”) 1mark for any other correct statement
b) product[“Qty”]=[3,4] 1mark

23 IPR are the creations of mind. Ownership on the inventions, literary and 2
artistic expressions, designs and symbols, names and logos created by a
person possess rights on his work.1mark
Trademark, Patents, copy rights 1mark
24 i) print(Prices[Price<30]) ii) Price=Price+3 2
25 In database management an aggregate function is a function where the 2
values of multiple rows are grouped together as input on certain criteria
to form a single value of more significant meaning.

1m for proper explanation

Any two from given below . 1m for each aggregate function


1) Count()
2) Sum()
3) Avg()
4) Min()
5) Max()
SECTION-C
26 i) SELECT min(Hundreds),max(Hundreds) From PLAYERS; 3
ii) SELECT player FROM Players ORDER BY Avgrunsdesc
iii) SELECT LEFT(player,5) FROM PLAYERS;
OR
i) 2 ii) hli iii) Virat Kohli 57.6
kar M S Dhoni 50.2
27 Science Commerce Humanities 3
11A 30 20 12
11B 34 21 14
12A 40 19 16
12B 25 18 19

Science 34
Commerce 21
Humanities 14

30

11A 11B 12A 12B


Science 30 34 40 25
Commerce 20 21 19 18
Humanities 12 14 16 19
28 SELECT s.name AS "Salesman", c.cust_name, c.city FROM salesman s, 3
customer c WHERE s.city=c.city;
OR 1
SELECT salesman.name AS "Salesman", customer.cust_name,
customer.city
FROM salesman,customer WHERE salesman.city=customer.city;

b. write a SQL query to display ord_no, purch_amt, cust_name, city of


those orders where order amount exists between 500 and 2000.
Ans:
SELECT o.ord_no,o.purch_amt, c.cust_name,c.city FROM orders
o,customer c WHERE o.customer_id=c.customer_id AND o.purch_amt
BETWEEN 500 AND 2000; 1

c. Write a SQL query to display Customer Name, city, Salesman,


commission the all salesperson(s) and their respective the customer(s).
Ans:
SELECT c.cust_name AS "Customer Name", c.city, s.name AS "Salesman",
s.commission FROM customer c, salesman s WHERE
c.salesman_id=s.salesman_id; 1
29 i) Refers to the trail (evidences) of data you leave when using the 3
internet. It includes websites you visit, emails you send, and
information you submit online. 1mark
ii) Virus attack. Preventions keep backup , Install anti virus
update it at frequent intervals 1+1 marks
OR
i) 1 mark for defining netiquette and 1 mark each any two correct
netiquttes.
30 import pandas as pd1 mark correct case sensitive 3
D= _____ any valid statement using list of lists /dictionary of lists or
series 1 mark
df=pd.DataFrame(D) ½ mark
print(df) ½ mark

SECTION-D

31 Context Command 4
i) Add a new record to the table INSERT
ii) Add new column to the table ALTER TABLE
ADD
iii) Changing the value in a UPDATE -SET
particular record
iv) Removing the table from DROP TABLE
database completely

32 i) M.loc[3]={“Event”:Squash”,”Gold”:2,”Silver”: 1, “Bronze”: 2} 1mark 4


ii) M[[“Event”,”Gold”]] 1 mark
iii)M[total” ]=M[“Gold”]+M[“Silver”]+M[“Bronze”] 2 marks
or
M.to_csv(“E:\data.csv”)
2 marks
SECTION-E
33 i) SELECT * from ORDER where Month(OrderDate)=10; 5
ii) SELECT * from ORDER Order by Price Acs;
iii) SELECT DAY(Orderdate) from order where Item_desc=”shirt”;
iv) UPDATE Order set price= 210 where Item_desc=”Story Book”;
v) DELETE from ORDER where orderid=165 ;
OR
i) 154
ii) INSTR(Item_desc,”st”)
1
0
0
0
4
iii) 12
iv) OrderidMOD(price,Qty)
127 2
209 0
v) Item_desc,MONTH(OrderDate)
Shirt 09
Electronic gadget 08

34 i) Correct layout 1mark 5


ii) Suggest the placement of following devices with justification
a) SWITCH – All sections b) MODEM- admin
iii) Firewall iv)Wifi device v) Radiowave
35 import matplotlib.pyplot as plt1 mark for import library 5
import numpy as np
X=np.array([1,2,3,4,5])
I=[5,8,2,3,6]1mark for data in two lists
A=[4,6,5,3,2]
plt.bar(X,I,color="Blue", width=0.3,label="INDIA")1mark for correct
statement
plt.bar(X+0.3,A,color="red", width=0.3, label="AUSTRALIA")
plt.xlabel("OVERS")1mark for labels
plt.ylabel("RUNS")
plt.title("SCORES IN 5 OVERS")
plt.legend()
plt.show() I mark for show()
OR
import matplotlib.pyplot as plt # 1 mark for import library
import numpy as np
X=np.array([1,2,3,4,5])
I=[5,8,2,3,6] #1mark for data in two lists
A=[4,6,5,3,2]
plt.plot(X,I,color="Blue", linestyle='dotted',label="INDIA") # 1mark for
correct statement
plt.plot(X,A,color="red", linestyle='dashed', label="AUSTRALIA")
plt.xlabel("OVERS") #1mark for labels
plt.ylabel("RUNS")
plt.title("SCORES IN 5 OVERS")
plt.legend()
plt.show() 1 mark for show()

.
KENDRIYA VIDYALAYA SANGATHAN, JAIPUR REGION
FIRST PRE-BOARD EXAMINATION (Session 2023-24)
CLASS XII
INFORMATICS PRACTICES (065)
TIME: 03 HOURS M.M.: 70
General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A has 18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has 02 questions carrying 04 marks each.
7. Section E has 03 questions carrying 05 marks each.
8. All programming questions are to be answered using Python Language only

SECTION A
QUE MARK
S S
1 Which type of computer network formed from personal devices. 1
(A) LAN (B) MAN
(C) WAN (D) PAN
2 The information /art/work that exists in digital form is called________. 1
(A) e-work (B) e-asset
(C) digital property (D) e-property
3 Legal term to describe the right of creator of original creative or artistic work is 1
called_____.
(A) Copyright (B)Copyleft
(C) GPL (D) Trademark
4 Find the output for the below sql statement: 1
Select substr(“BoardExam@2021”, 4, 7);
(A) ardExam (B) dExam@2
(C) rdExam (D) rdExam@2
5 In column “Margin “contains the data set(2.00,2.00,NULL,4.00,NULL,3.00,3.00). 1
What will be the output of after the execution of the given query?
SELECT AVG(Margin) FROM SHOP;
(A) 2.9 (B) 2.8
(C) 2.00 (D) All of these
6 URL stands for 1
(A) Universal Resource Locator (B) Uniform Resource Locator
(C) Universal Range Limit (D) None of the above
7 To open a file c:\scores.csv for reading, we use _______ command. 1
(A) infile = open(“c:\scores.csv”, “r”)
(B) infile = open(“c:\\scores.csv”, “r”)
(C) infile = open(file = “c:\scores.csv”, “r”)
(D) infile = open(file = “c:\\scores.csv”, “r”)

8 Gopi Krishna is using a table Employee. It has the following columns: 1


Code, Name, Salary, Deptcode
He wants to display average salary department wise of those departments
which have more than six employees.he wrote the following command:
SELECT Deptcode, avg(Salary) FROM Employee ;
But he did not get the desired result. Which of the following is a correct query to
perform the given task?
(A) SELECT Deptcode, avg(Salary) FROM Employee WHERE count(*) > 6
GROUP BY Deptcode ;
(B) SELECT Deptcode, avg(Salary) FROM Employee HAVING count(*) > 6
GROUP BY Deptcode ;
(C) SELECT Deptcode, avg(Salary) FROM Employee GROUP BY Deptcode
WHERE count(*) > 6;
(D) SELECT Deptcode, avg(Salary) FROM Employee GROUP BY Deptcode
HAVING count(*) > 6;

9 Which MySQL function returns the week day name corresponding to Date value 1
supplied as argument.
(A) weekday() (B)dayname()
(C)dayofweek() (D)weekofday()
10 Given a Pandas series called p_series, the command which will display the last 1
4 rows is ________
(A) print (p_series.Tail(4)) (B) print (p_series.Tails(4))
(C) print (p_series.tail(4)) (D) print (p_series.Tails(4))
11 Which of the following is not MySQL Numeric Data Type? 1
(A) BIT(Size) (B) CHAR(Size)
(C) INTEGER(Size) (D) INT(Size)
12 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
13 Stealingsomeone’sintellectualworkandrepresentingitasanotherperson’sworkisk 1
nownas .
(A) Phishing (B) Spamming
(C) plagiarism (D) hacking
14 Which of the following function is the correct syntax of LCASE() function? 1
(A) LCASE(row_name) (B) LCE(column_name)
(C) LCASE(str/column_name) (D) None of the above
15 Whichprotocolallowustohavevoicecallsovertheinternet? 1
(A) HTTP (B) VoIP
(C) VideoChat (D) SMTP
16 Theterm Intellectualpropertyrightscover 1
(A) Trademark (B) Copyright
(C) Patents (D) Allof these
Q17 and 18 are ASSERTION AND REASONING based questions. Mark
the correct choice as
i. Both A and R are true and R is the correct explanation for A
ii. Both A and R are true and R is not the correct explanation for A
iii. A is True but R is False
iv. A is false but R is True
17 Assertion (A): - Antivirus should be installed in our compute system. 1
Reasoning (R):- It is used to detect and remove viruses and other kinds of
malicious software from your computer or laptop.
18 Assertion (A): - Series is a one-dimensional labeled array capable of holding 1
data of any type Reasoning (R):- Series has both row and column values.

SECTION B
QUES MARKS
19 ExplainthetermsWebpageandHomePage. 2

OR

ExpandthefollowingtermsrelatedtoComputerNetworks:
a.SMTP b. POP c. FTP d. TCP
20 The python code written below has syntactical errors. Rewrite the correct code 2
and underline the corrections made.
IMPORT pandas as pd
df ={"name":["satish","rahul","arvind"],"exp(in months)":[14,41,31]}
df= pd.dataframe(df)
print(df)
21 Consider “Winners never quit”. Write the queries for the following tasks. 2

i. Write a command to display “quit”.


ii. Write a command to check the first occurrence of letter ‘n’

22 Giventwoseries S1and S2 2
S1
S
2
A 39 A 10
B 41 B 10
C 42 D 10
D 44 F 10
Find the output for following
python pandas statements?
a. S1[ :2]*100
b.S1*S2
23 What do you understand by digital footprint? What are the different types of 2
digital footprints?
24 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
25 Define any two aggregate functions. 2

SECTION C
QUE MARK
S S
26 Basedontable Employeegivenhere, writesuitableSQLqueries forthefollowing: 3

i. Displaygenderwiseaveragesalary.
ii. Displaydesignationwisemaximumsalary.
iii. Dislaytotalnumberofemployeesineach Dept.

OR

Predict the output of the following queries based on the above table Employee:
i. SELECT LEFT (Name , 2) FROM Employee WHERE Gender = “F”;
ii. SELECT AVG(Salary) FROM Employee WHERE Dept = “Sales”;
iii. SELECT SUM(Salary) FROM Employee WHERE Designation =
“Clerk”;
27 WriteaPythoncodetocreateaDataFramewithcolumnheadingsas(stu_id,name,c 3
lass)and data labelsas (1,4,5,6)fromthelistgiven below:

L1=[[101,'Guru',10],[102,'Raj',9],[103,'Sam',12],[104,'Yuvraj',12]]
28 Write MySQL statements for the following: 3
i. To create a database named AUTOMOBILE.
ii. To create a table named VEHICLE based on the following
specification:

Column Name DataType Constraints


VehicleNumber INT Primary Key
VehicleName Char(40)
VehicleModel Char(50) UNIQUE
29 Samridh has recently changed his school so he is not aware of the people, but 3
someone is posting negative demeaning comments on his social media profile.
He is also getting repeated mails from unknown people. Every time he goes
online, he finds someone chasing him online. (i) Samridh is a victim of
___________. (ii) The action that Samridh should take to handle it. (iii)
..........................is a set of moral principles that governs the behavior of a group
or individual and regulates the use of computers.

OR

WhatdoyouunderstandbyNetEtiquettes?Explainanytwosuchetiquettes.
30 Consider the given DataFrame ‘Items’: 3
Name Price Quantity
0 CPU 7750 15
1 Watch 475 50
2 Key Board 225 25
3 Mouse 150 20
Write suitable Python statements for the following:
i) Add a column called Sale_Price which is 10% decreased value of Price
ii) Add a new item named “Printer” having price 8000 and Quantity as 10.
iii) Remove the column Quantity

SECTION D
QUES MARKS
31 ConsidertheTableCLUBgivenbelow: 4
COACH_ID COACHNAME AGE SPORTS DATOFAPP PAY SEX
1 KUKREJA 35 KARATE 1996-03-27 10000 M
2 RAVINA 34 KARATE 1997-01-20 12000 F
3 KARAN 34 SQUASH 1998-02-19 20000 M
4 TARUN 33 BASKETBALL 1998-01-01 15000 M

Answerthefollowingsbasedontheabovemysql table‘CLUB’
i. Writesqlquesrytodisplaytheaverage payfor karate coach
ii. Writesqlquerytodisplaymonthfordateofappointment’DATEOFAPP
iii. Writesqlquerytodisplaythe detailsofmalecoachinascendingorder oftheirage
iv. WriteSQLquerytodisplaygamewisemaximum payofall caoches.

32 Consider the following DataFrame, Class DF with row index St1, St2, St3, St4 4

Based on the above dataframe answer the followinsg:


A. Predict the output
i. ClassDF.T ii. ClasDF [ : : -2]
B. Write python statement to print Name,class and CGPA for Student St2 and St3

OR

write python Statement to print the name and class of students having CGPA more
than 9.0

SECTION E
QUES MARKS
33 Write suitable SQL query for the following: 5
i. Display 7 characters extracted from 7th left character onwards from the string ‘INDIA
SHINING’.
ii. Display the position of occurrence of string ‘COME’ in the string ‘WELCOME WORLD’.
iii. Round off the value 78.779 to 2 nd decimal place.
iv. Display the remainder of 149 divided by 6.
v. Remove all the expected leading and trailing spaces from a column userid of the
table ‘USERS’.

OR

Consider the following table TEACHER:


+-------+---------+------------------+-------+-----------------------
| TNo | TName | Dept | DOJ|
+-------+---------+-----------+-------+-----------------------
|1 | Tanu | CS | 05.09.2007 |
|2 | Sameer | MATHS | 10.09.2007|
|3 | Vineet | PHYSICS | 19.09.2014|
|4 | Sneh | BIO | 21.09.2014 |
|5 | Akshit | CHEM |18.09.2021 |
+-------+---------+------------------+-------+------------------
Help her in writing SQL queries to the perform the following task:
a) Insert a new record in the table having following values:
[6,'Abhinav','office',12.10.2023]
b) To change the value “CS” to “Computer Science” in subject column.
c) To remove the records of those teachers who belongs to physics department.
d) To add a new column Salary of suitable datatype.
e) To display records of “CS” department.
34 SHARMA Medicos Center has set up its new center in Delhi . It has four buildings as 5
shown in thediagramgiven below:

Distancebetween variousbuilding areasfollows:

Asanetwork expert, providethebest possibleanswer forthefollowing queries:

i. Suggestacablelayoutof connectionsbetweenthe buildings.


ii. Suggestthemost suitableplace(i.e. buildings)to housetheserverofthisorganization.
iii. Suggesttheplacementof the followingdevicewithjustification:
a) Repeater b)Hub/Switch
iv. Suggestasystem(hardware/software)topreventunauthorizedaccesstoorfromthenetwork.
v. Thecompanyis planningto linkitshead officesituatedinDelhi
withtheofficesinhillyareas.Suggestaway to connect it economically.
35 Generate random numbers from 1 to 70 and plot it on the histogram. Change the outline 5
color to black and the bar color should be yellow.

OR

Writepythoncodetoplotbarchartforsubjectwiseresultanalysisasshownbelow:
Alsogive suitablepythonstatementtosavethischartas‘Result.png’
KENDRIYA VIDYALAYA SANGATHAN, JAIPUR REGION
FIRST PRE-BOARD EXAMINATION (Session 2023-24)
CLASS XII
INFORMATICS PRACTICES (065)
MARKING SCHEME
TIME: 03 HOURS M.M.: 70
SECTION A
QUES MARKS
1 (D) PAN 1
2 (C)digital property 1
3 (A) Copyright 1
4 (D) rdExam@2 1
5 (B) 2.8 1
6 (B) Uniform Resource Locator 1
7 (B)infile = open(“c:\\scores.csv”, “r”) 1
8 (D) SELECT Deptcode, avg(Salary) FROM Employee GROUP BY Deptcode 1
HAVING count(*) > 6;
9 (B)dayname() 1
10 (C) print(p_series.tail(4)) 1
11 (B) CHAR(Size) 1
12 (C) 1
0 7.0
1 9.0
2 11.0
3 13.0
4 NaN
dtype: float64
13 (C) plagiarism 1
14 (C) LCASE(str/column_name) 1
15 (B) VoIP 1
16 (D)Allof these 1
17 i. Both A and R are true and R is the correct explanation for A 1
18 iii. A is True but R is False 1

SECTION B
QUES MARKS
19 WebPage:AWebPageisapartofawebsiteandiscommonlywritteninHTML.Itcan be 2
accessedthroughaweb browser.
HomePage: Itisthe firstweb pageyouseewhenyouvisit awebsite.
1markforcorrectexplanationofeachterm
OR
a. SMTP:SimpleMailTransfer Protocol
b. POP:PointtoPointProtocol
c. FTP:FileTransferProtocol
d. TCP: Transmission Control Protocol
½marksforeachcorrectfullform
20 import pandas as pd 2
df ={"name":["satish","rahul","arvind"],"exp(in months)":[14,41,31]}
df= pd.DataFrame(df)
print(df)
21 1. selectsubstr(“Winners never quit”,-4); 2
OR
select substr(“Winners never quit”,14);
You can also use mid function as well.
2. Select instr(“Winners never quit”,’n’)
22 a. A 3900 2
B 4100
b. A 390
B 410
C NaN
D 440
F NaN
23 A digital footprint is data that is left behind when users have been online. There 2
are two types of digital footprints which are passive and active.
24 import pandas as pd 2
s=pd.Series(3,index=[1,2,3,4])
print(s)
25 1 mark for each aggregate function 2

SECTION C
QUES MARKS
26 i. SELECTGENDER,AVG(SALARY)FROMEMPLOYEEGROUPBYGENDER; 3
ii. SELECTDESIGNATION,MAX(SALARY)FROMEMPLOYEEGROUPBYDESIGNATION;
iii. SELECTDEPT,COUNT(*)FROMEMPLOYEE GROUPBYDEPT;
OR
i. LEFT(Name,2)
Su
Ne
Ne
ii. AVG(Salary)
21500
iii. SUM(Salary)
32000
27 import pandasaspd 3
L1=[[101,'Guru',10],[102,'Raj',9],[103,'Sam',12],[104,'Yuvraj',12]]
df=pd.DataFrame(L1,columns=['stu_id','Name','class'])

1markforeachcorrectpythonstatement
28 (i) Create database AUTOMOBILE 3
(ii) Create table vehicle (vehiclenumberint primary key, vehiclename char(40),
vehiclemodel char(50))
29 i. Cyber stalking 3
ii. He should bring to the notice of his parents and school authorities.
iii.Computer ethics
OR
Net Etiquettes refers to the proper manners and behavior we need to exhibit while being
online.Theseinclude:
1. Nocopyrightviolation:weshouldnotusecopyrightedmaterialswithoutthepermissionof the
creator or owner. We should give proper credit to owners/creators of open
sourcecontentwhen using them.
2. Avoid cyber bullying: Avoid any insulting, degrading or intimidating
onlinebehaviorlikerepeated
posting of rumours, giving threats
online,postingthevictim’spersonalinformation,
orcommentsaimed topubliclyridicule avictim.Oranyother
relevantanswer.
1½ marksfordefinitions ofNet Etiquettes
1½mark eachforthe examplewithexplanation
30 i) Items['Sale_Price']=0.90 * Items[‘Price’] 3
ii) Items.loc['4']=[“Printer”, 8000, 10]
iii) Items=Items.drop('Quantity', axis=1)
1 mark for each correct statement

SECTION D
QUES MARKS
31 i. SELECTAGV(PAY)FROMCLUBWHERESPORTS=’KARATE’; 4
ii. SELECTMONTH(DATEOFAPP)FROMCLUB;1mark
for eachcorrectquery
iii. SELECT*FROMCLUBWHERESEX=’M’ORDERBYAGEASC;
OR
iv. SELECTSPORTS,MAX(PAY)ROMCLUBGROUPBYSPORTS;
2mark for eachcorrectquery
32 A. 1 mark for each correct answer 4
B. ClassDF.loc[St2:St3 , [‘Name’,’Class’,CGPA’]
OR
ClassDF[[‘Name’,’Class’][ClassDF.CGPA>9.0]
2 marks for each correct answer

SECTION E
S M
i. select mid('INDIA SHINING',7,7);
ii. select INSTR('WELCOME WORLD','COME');
iii. select round(78.779,2);
iv. select mod(149,6);
v. select trim(userid) from users; (1 mark for each correct query )
OR
a) insert into employee values(6,'Abhinav','office',’12.10.2023’)
b) Update employee set dept=”CS” where dept=”Computer Science”
c) Delete from employee where dept=’physics’
d) Alter table employee add salary decimal
e) Select * from employee where dept=”CS”
i. 1markforcorrect layout
ii. ResearchLab
iii. Repeater:BetweenAccountsandStore,Hub/Switchineachblock
iv. Firewall
v. RadioWave
1markforeachcorrect answerorforanyotherrelevantanswer
import matplotlib.pyplot as m
import numpy as np
x=np.random.randn(70)
m.hist(x,20,edgecolor=”black”,facecolor=”yellow”)
m.show()
OR
import matplotlib.pyplot as
pltsub=['ENGLISH','ACCOUNTS','BST','ECONOMICS','IP']per=[85,98,70,82,100]
plt.bar(sub,per,color='green',align='center') #1 markplt.xlabel("SUBJECT")
plt.ylabel("PERCENTAGE")plt.title("SUBJECTWISERESULTANALYSIS")
plt.show()plt.savefig(‘Result.png’)
Page: 1/7
KENDRIYA VIDYALAYA SANGATHAN JAIPUR REGION
FIRST PRE-BOARD EXAMINATION (Session 2023-24)
CLASS XII
INFORMATICS PRACTICES (065)
TIME: 03 HOURS M.M.: 70

General Instructions:
1. This question paper contains five sections, Section A to E.
2. There are internal choices in Q. No. 19, 26,29,32 (only part iii), 33 and 35
3. Section A has 18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has 02 questions carrying 04 marks each.
7. Section E has 03 questions carrying 05 marks each.

SECTION A
Q M
1 Which device connects an organization's network with the outside world of the 1
Internet?
a) Hub b) Modem
c) Gateway d) Repeater
2 E-waste contains Heavy metals such as ________ and _____which are highly toxic 1
when ingested.
a) Hydrogen and Mercury
b) Lead and Argon
c) Lead and Mercury
d) Hydrogen and Argon
3 It is an act of copying another person’s data idea, words or work and pretended that 1
they are our own.
a) Copyright
b) Virus
c) Plagiarism
d) IPR
4 Imagine you work as a data analyst for a retail company. The company provides you 1
with a large dataset of sales transactions in a CSV file. Your task is to import this data
and perform various data manipulation and analysis operations. Which Pandas
method should you use to read this CSV file and load it into a DataFrame for your
analysis?
a) Read_CSV() b) import_data()
c) load_csv() d) read_csv()
5 Predict the output of following query: 1
Select mod(12,3);
a) 2 b) 4
c) 0 d) The query will produce error
6 ‘P’ in IPR stands for 1
a) Proprietary b) Platform
c) Patent d) Property
7 What does CSV stand for in the context of data storage? 1
a) Column Separated Value
b) Class Separated Value
c) Comma Separated Value
d) Comma Segregated Value
8 A Database Administrator needs to display the average pay of workers from each 1
departments with more than five employees. Which SQL query is correct for this task?
Page: 2/7
a) SELECT DEPT, AVG(SAL) FROM EMP WHERE COUNT(*) > 5 GROUP BY
DEPT;
b) SELECT DEPT, AVG(SAL) FROM EMP HAVING COUNT(*) > 5 GROUP BY
DEPT;
c) SELECT DEPT, AVG(SAL) FROM EMP GROUP BY DEPT WHERE COUNT(*) >
5;
d) SELECT DEPT, AVG(SAL) FROM EMP GROUP BY DEPT HAVING COUNT(*) >
5;
9 The mid( ) function in MySQL is an example of _______________. 1
a) Math function b) Text function
c) Date Function d) Aggregate Function
10 Which command is used to display the last 3 rows from a Pandas Series named NP? 1
a) NP.Tail() b) NP.tail(3)
c) NP.TAIL(3) d) All of the above
11 In SQL, which of the following is an invalid data type? 1
a) Date b) Integer
c) Varchar d) Month
12 Which attribute is not used with the Dataframe? 1
a) Size b) column
c) Empty d) type
13 When a software company's server is unethically accessed to obtain sensitive info 1
and it is unreadable at companies end, the attacker demands payment to prevent the
release of that information, it's known as:
a) Phishing b) Identity Theft
c) Plagiarism d) Ransomware
14 Which of the following function is the correct syntax of LCASE() function? 1
a) LCASE(row_name) b) LCE(column_name)
c) LCASE(str/column_name) d) None of the above
15 Incognito mode of browser is used for: 1
a) public browsing b) Hides contents from web server
c) private browsing d) save cookies
16 While surfing on Internet if your geo location is turned on, than it makes 1
a) Active digital footprint b) Passive digital footprint
c) Active e footprint d) Passive e footprint
Q17 and 18 are ASSERTION AND REASONING based questions. Mark
the correct choice as
i. Both A and R are true and R is the correct explanation for A
ii. Both A and R are true and R is not the correct explanation for A
iii. A is True but R is False
iv. A is false but R is True
17 Assertion (A): A firewall is a device that allows unrestricted data flow in a network. 1
Reasoning(R): It serves as a barrier between a private internal network and external
networks, controlling and monitoring incoming and outgoing network traffic.
18 Assertion (A):- df.loc(False) function can be used to find the values where index value 1
is False. Reason (R):- Boolean indexing is a type of indexing and can be used to
retrieve the data

SECTION B
QUES MARK
S
19 You are tasked with creating a website for a small business. Outline the steps 2
you would take to launch the website. Provide at least two necessary steps.
OR
You are evaluating the performance of different web browsers for a company's
Page: 3/7
internal web-based application. Provide any two criteria you would use to
assess the browsers' performance.
20 The python code written below has syntactical errors. Rewrite the correct code 2
and underline the corrections made.

import pandas as pt
data = {'Name': ['Ramesh Pillai', 'Priya Nair', 'Suresh Menon'],
'Age': [28, 32, 26],
'City': ['Mcleodganj', 'Jalandhar', 'Sanchor']}
df = pd.DataFrame(data)
print(df.head)
21 Consider the given MySQL query: SELECT NOW(); 2
It returns the current Date and Time. Modify this query with help of suitable date
functions to :
A. Return the month from the current date and time.
B. Retrieve the day of the week for the current date and time.
22 Predict the output of python code based on series 2
import pandas as pd
temp = pd.Series([28, 32, 29, 35, 30, 31, 33])
ft = temp[temp > 30]
print(ft)
23 As a YouTube content creator, can you use background music for free without 2
worrying about copyright strike? If so, what type of licence is needed for that
piece of media?
24 Complete the given Python code to create a Pandas Series named "cu" with the 2
top five central universities in India and their respective states as data. Then,
display only those universities which are from the state of "Delhi."
import pandas as pd
cu_names = ['DU', 'JNU', 'BHU', 'AMU', 'JMI']
cu_states = ['Delhi', 'Delhi', UP', 'UP', 'Delhi']
cu = pd.Series(__________)
print(___________)
25 What is the difference between Aggregate Function and Scaler Function in 2
MySQL? Provide the name of one function from each.

SECTION C
QUES MARK
S
26 Consider the SQL table "PRODUCT_SALES" with the following data: 3
| Product | Segment | Region | SalesQ1 | SalesQ2 |
| P1 | High | A | 25000 | 32000 |
| P2 | Medium | B | 18000 | 20000 |
| P3 | Low | A | 8000 | 9000 |
| P4 | High | C | 35000 | 38000 |
| P5 | Medium | B | 22000 | 25000 |
| P6 | Low | C | 5000 | 5500 |
Write suitable SQL queries for the following:
1. Display the region-wise average sales in the first quarter.
2. Display the segment-wise highest sales in the second quarter.
3. Display the records in descending order of sales in the second quarter.
OR
Predict the output of the following queries based on the table
"PRODUCT_SALES" given above:
1. SELECT LEFT(Segment, 2) FROM PRODUCT_SALES WHERE Region =
'A';
Page: 4/7
2. SELECT (SalesQ2 - SalesQ1) / 2 AS Sale2 FROM PRODUCT_SALES
WHERE Segment = 'High';
3. SELECT SUM(SalesQ1) AS "TOTAL” FROM PRODUCT_SALES WHERE
Region = 'B';
27 You are tasked with creating a DataFrame to store information about gaming 3
apps available on various digital platforms. The DataFrame should have three
columns: Name, Genre, Type (Free or Paid), and Downloads.
To achieve this, you have the following data:
Name Genre Type Downloads(mil)
1 Call of Duty: Warzone FPS Free 20
2 The Witcher 3: Wild Hunt RPG Paid 5
3 Candy Crush Saga Puzzle Free 65
4 Among Us Arcade Free 50
5 Minecraft Sandbox Paid 10
Now create a dataframe with a dictionary of Series and index should be from 1
to 5.
28 Write MySQL statements for the following: 3
A. To use a database named Pets.
B. To see all the tables inside the database.
C. To see the structure of the table named horse.
29 Nisha loves online shopping and frequently makes purchases on various e- 3
commerce websites. One day, she received an email with an incredible
discount offer on a popular shopping platform. Excited about the deal, she
clicked on the provided link and made a payment. However, after the
transaction, she received neither a confirmation nor the product she ordered.
A few days later, she realized that the website was fake, and her money was
gone. She also found unauthorized transactions on her credit card. Distressed
and frustrated, Nisha decided to seek legal action.
Answer the following questions:
1. Identify the type of cybercrime Nisha is a victim of.
2. Is there a specific branch/division of police in which she can report the crime?
3. Suggest Nisha two precautionary measures she should take in the future
while shopping online to avoid falling victim to such situations.
OR
What are the positive impacts of ICT on physical and mental health? Describe
any two of such impacts.
30 Consider the given DataFrame ‘Anime’: 3
Name Genre Eps Year of Creation
1 Naruto Shounen 220 2002
2 One Piece Shounen 1300 1999
3 Attack on Titan Action 75 2013
4 Dragon Ball Z Shounen 291 1989
Write suitable Python statements for the following:
1. Add a row with the following data: [“Death Note“,“Mystery“,37,2006].
2. Rename the column ‘Eps’ to ‘Episodes’ and ‘Year of Creation‘ to ‘Year‘.
3. Drop the column ‘Genre‘.

SECTION D
QUES MARK
S
31 AlakhNiranjan is responsible for managing a database in a financial company. 4
The company stores financial transaction data in a table named FINE_TRNC.
Alakh needs your assistance in writing SQL queries to retrieve specific
information from the table. The attributes of the table are:
TransactionDate,TransactionAmount.
Page: 5/7
1. Write a query to display the date of the most recent transaction.
2. Write a query to retrieve the average transaction amount for the month of
June.
3. Write a query to list the maximum amount for the transaction that occurred in
the month of December.
4. Write a query to count the total number of transactions that took place in the
year 2023.
32 Riya, a Data Analyst working for a film studio, has created a DataFrame named 4
'movie_revenue_df' to store the revenue data of movies released by Viacom 18
in the year 2022. The DataFrame looks like this:
Movie Revenue (in crores)
A. GangubaiKathiawadi 125
B. The Kashmir Files 340
C. Bhediya 75
D. JugJuggJiyo 250
E. Bachchhan Pandey 120
An intern is working with her and has a few doubts. As Riya is busy with
analysis work. You answer on her behalf.
(i) Predict the output of the following python statement:
a. print(movie_revenue_df[‘Revenue (in crores)’].dtypes)
b. print(movie_revenue_df.iloc[2,0])
(ii) Delete the Second last row from the DataFrame.
(iii) Find out the total revenue.
OR(Option for part iii only)
Write Python statement to export the DataFrame to a CSV file named
“hit_movies_2022.csv” in the directory named ‘PMDB’ which is inside the
present working directory(PWD) of the project.

SECTION E
QUES MARK
S
33 Write suitable SQL queries for the following: 5
1. Write an SQL query to calculate 3 raised to the power of 4.
2. To round off the value 1969.5538 without any decimal part
3. Display the current date.
4. Convert the string 'After the test,take some rest’ to uppercase:
5. Return the length of the string 'To chaloshurukartehain'.
OR
Take a look at the table structure of the table ‘IndianAlbums’ and `Artist_Info`
IndianAlbums Artist_Info
Attribute Data Type Attribute Data Type

AlbumID INT ArtistID INT

AlbumName VARCHAR(100) ArtistNam VARCHAR(100)


e

ArtistID INT
Nationalit VARCHAR(50)
y
ReleaseYear INT
Page: 6/7

Genre VARCHAR(50)

Sales DECIMAL(10,
2)

Language VARCHAR(50)

Write SQL queries to perform the following tasks:


1. Insert a new record into the `IndianAlbums` table with the following details:
- AlbumName: "Lagaan"
- ReleaseYear: 2001
- Genre: "Soundtrack"
- Sales: 5000000
- Language: "Hindi"
2. Update the `IndianAlbums` table to modify the sales of the album with
`AlbumID` 3 to 1000000.
3. Delete the record of the album named "Dil Se" from the `IndianAlbums` table.
4. Alter the table structure of `IndianAlbums` to add a new column named
"Language" of data type VARCHAR(50).
5. Select all albums released in the year 1990 or later, and for each album,
retrieve the album name, release year, genre, and the name of the artist.
34 RajatParivahanUpkaramPvt. Ltd. has established its presence in two cities: 5
Kaithal and Sirsa. The Kaithal city office has 4 blocks named K1, K2, K3 and
K4 and Sirsa is a franchise 400 kms away. The tables given below show the
distance between different blocks and the number of computers in each block.

Distance
(in m) K1 K2 K3 K4

K1 0 70 150 60

50
K2 70 0 130

K3 150 130 0 100

K4 60 50 100 0

Block No. of Workstations (Computers)

K1 50

K2 150

K3 30

K4 70
Page: 7/7

The company is planning to form a network by joining these blocks and two
offices. Answer the following questions to help them out:

1. Suggest the most appropriate block for placing the network server out of four
blocks.

2. To ensure efficient communication among the three cities, propose a


suitable network topology and provide a network diagram illustrating the
structure.

3. Please specify which city branch you choose as the LAN and why?.

4. Suggest the optimal placem


placement of the following devices:
- Repeater
- Firewall

5. Company is planning to use VPN. Expand the term VPN and clarify its
significance within this network setup.
35 Month Wise sale of iphone 14 is given below: 5
data = { "Month": ["Sep22", "Oct22", "Nov22", "Dec22", "Jan23", "Feb23",
"Mar23", "Apr23"], "Sales": [1000000, 1200000, 1500000, 2000000, 1800000,
1700000, 1600000, 1500000] }
Draw a line plot based on this data to know the trend of sales in two quarters (8
months). Use appropriate customisat
customisations.
OR
Write suitable Python code to create a Bar Chart showcasing the medal
talley of top of countries in the asia cup 2023.

# medal count
medals = [88, 60, 58, 43, 35]
KENDRIYA VIDYALAYA SANGATHAN, JAIPUR REGION
FIRST PRE-BOARD EXAMINATION (Session 2023-24)
CLASS XII
INFORMATICS PRACTICES (065)
MARKING SCHEME
TIME: 03 HOURS M.M.: 70
General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A has 18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has 02 questions carrying 04 marks each.
7. Section E has 03 questions carrying 05 marks each.
8. All programming questions are to be answered using Python Language only

SECTION A
Q M
1 Which device connects an organization's network with the outside world of the 1
Internet?
a) Hub
b) Modem
c) Gateway
d) Repeater
2 E-waste contains Heavy metals such as ________ and _____which are highly toxic 1
when ingested.
a) Hydrogen and Mercury
b) Lead and Argon
c) Lead and Mercury
d) Hydrogen and Argon
3 It is an act of copying another person’s data idea, words or work and pretended that 1
they are our own.
a) Copyright
b) Virus
c) Plagiarism
d) IPR
4 Imagine you work as a data analyst for a retail company. The company provides you 1
with a large dataset of sales transactions in a CSV file. Your task is to import this data
and perform various data manipulation and analysis operations. Which Pandas
method should you use to read this CSV file and load it into a DataFrame for your
analysis?
a) Read_CSV()
b) import_data()
c) load_csv()
d) read_csv()
5 Predict the output of following query: 1
Select mod(12,3);
a) 2 b) 4
c) 0 d) The query will produce error
6 ‘P’ in IPR stands for 1
a) Proprietary b) Platform
c) Patent d) Property
7 What does CSV stand for in the context of data storage? 1
a) Column Separated Value
b) Class Separated Value
c) Comma Separated Value
d) Comma Segregated Value
8 A Database Administrator needs to display the average pay of workers from each 1
departments with more than five employees. Which SQL query is correct for this task?
a) SELECT DEPT, AVG(SAL) FROM EMP WHERE COUNT(*) > 5 GROUP BY
DEPT;
b) SELECT DEPT, AVG(SAL) FROM EMP HAVING COUNT(*) > 5 GROUP BY
DEPT;
c) SELECT DEPT, AVG(SAL) FROM EMP GROUP BY DEPT WHERE COUNT(*) >
5;
d) SELECT DEPT, AVG(SAL) FROM EMP GROUP BY DEPT HAVING COUNT(*)
> 5;
9 The mid( ) function in MySQL is an example of _______________. 1
a) Math function b) Text function
c) Date Function d) Aggregate Function
10 Which command is used to display the last 3 rows from a Pandas Series named NP? 1
a) NP.Tail()
b) NP.tail(3)
c) NP.TAIL(3)
d) All of the above
11 In SQL, which of the following is an invalid data type? 1
a) Date
b) Integer
c) Varchar
d) Month
12 Which attribute is not used with the Dataframe? 1
a) Size b) column
c) Empty d) type
13 When a software company's server is unethically accessed to obtain sensitive info 1
and it is unreadable at companies end, the attacker demands payment to prevent the
release of that information, it's known as:
a) Phishing
b) Identity Theft
c) Plagiarism
d) Ransomware
14 Which of the following function is the correct syntax of LCASE() function? 1
a) LCASE(row_name) b) LCE(column_name)
c) LCASE(str/column_name) d) None of the above
15 Incognito mode of browser is used for: 1
a) public browsing b) Hides contents from web server
c) private browsing d) save cookies
16 While surfing on Internet if your geo location is turned on, than it makes 1
a) Active digital footprint b) Passive digital footprint
c) Active e footprint d) Passive e footprint
Q17 and 18 are ASSERTION AND REASONING based questions. Mark
the correct choice as
i. Both A and R are true and R is the correct explanation for A
ii. Both A and R are true and R is not the correct explanation for A
iii. A is True but R is False
iv. A is false but R is True
17 Assertion (A): A firewall is a device that allows unrestricted data flow in a network. 1
Reasoning(R): It serves as a barrier between a private internal network and external
networks, controlling and monitoring incoming and outgoing network traffic.

Ans. iv
18 Assertion (A):- df.loc(False) function can be used to find the values where index value 1
is False. Reason (R):- Boolean indexing is a type of indexing and can be used to
retrieve the data
Ans. i

SECTION B
QUES MARK
S
19 You are tasked with creating a website for a small business. Outline the steps 2
you would take to launch the website. Provide at least two necessary steps.
Ans.
● Define the Purpose
● Choose a Domain Name
● Select a Hosting Provider
● Design and Develop the Website
OR
You are evaluating the performance of different web browsers for a company's
internal web-based application. Provide any two criteria you would use to
assess the browsers' performance.
Ans.
● Page Load Speed
● Compatibility with Web Standards
● Security Features
● Memory Usage
● Ease of Customization like availability of add-ons and extensions.
20 The python code written below has syntactical errors. Rewrite the correct code 2
and underline the corrections made.
import pandas as pt
data = {'Name': ['Ramesh Pillai', 'Priya Nair', 'Suresh Menon'],
'Age': [28, 32, 26],
'City': ['Mcleodganj', 'Jalandhar', 'Sanchor']}
df = pd.DataFrame(data)
print(df.head)

Ans.
Correct Code:
import pandas as pd
data = {'Name': ['Ramesh Pillai', 'Priya Nair', 'Suresh Menon'],
'Age': [28, 32, 26],
'City': ['Mcleodganj', 'Jalandhar', 'Sanchor']}
df = pd.DataFrame(data) # use pd instead of pt
print(df.head()) #head() instead of head
21 Consider the given MySQL query: SELECT NOW(); 2
It returns the current Date and Time. Modify this query with help of suitable date
functions to :
A. Return the month from the current date and time.
B. Retrieve the day of the week for the current date and time.

Ans.
A. SELECT MONTH(NOW()) AS current_month;
B. SELECT DAYNAME(NOW()) AS current_day_of_week;
22 Predict the output of python code based on series 2
import pandas as pd
temp = pd.Series([28, 32, 29, 35, 30, 31, 33])
ft = temp[temp > 30]
print(ft)
Ans.
1 32
3 35
5 31
6 33
dtype: int64
23 As a YouTube content creator, can you use background music for free without 2
worrying about copyright strike? If so, what type of licence is needed for that
piece of media?
Ans.
Yes. CC or Creative Commons License.
24 Complete the given Python code to create a Pandas Series named "cu" with the 2
top five central universities in India and their respective states as data. Then,
display only those universities which are from the state of "Delhi."

import pandas as pd
cu_names = ['DU', 'JNU', 'BHU', 'AMU', 'JMI']
cu_states = ['Delhi', 'Delhi', UP', 'UP', 'Delhi']
cu = pd.Series(__________)
print(___________)

Ans.
import pandas as pd
cu_names = ['DU', 'JNU', 'BHU', 'AMU', 'JMI']
cu_states = ['Delhi', 'Delhi', UP', 'UP', 'Delhi']
cu = pd.Series(cu_names,index=cu_states)
print(cu['Delhi'])
25 What is the difference between Aggregate Function and Scaler Function in 2
MySQL? Provide the name of one function from each.
Ans.
- Aggregate functions operate on a group of values and return a single result
(e.g., SUM, AVG, COUNT etc).
- Scalar functions work on individual values and return a modified individual
value (e.g., UPPER, LENGTH, NOW,MOD,POW etc).

SECTION C
QUES MARK
S
26 Consider the SQL table "PRODUCT_SALES" with the following data: 3

| Product | Segment | Region | SalesQ1 | SalesQ2 |


| P1 | High | A | 25000 | 32000 |
| P2 | Medium | B | 18000 | 20000 |
| P3 | Low | A | 8000 | 9000 |
| P4 | High | C | 35000 | 38000 |
| P5 | Medium | B | 22000 | 25000 |
| P6 | Low | C | 5000 | 5500 |

Write suitable SQL queries for the following:


1. Display the region-wise average sales in the first quarter.
2. Display the segment-wise highest sales in the second quarter.
3. Display the records in descending order of sales in the second quarter.

Ans.
1.
SELECT Region, AVG(SalesQ1) AS AvgSalesQ1
FROM PRODUCT_SALES
GROUP BY Region;

2.
SELECT Segment, MAX(SalesQ2) AS HighestSalesQ2
FROM PRODUCT_SALES
GROUP BY Segment;

3.
SELECT *
FROM PRODUCT_SALES
ORDER BY SalesQ2 DESC;

OR
Predict the output of the following queries based on the table
"PRODUCT_SALES" given above:
1. SELECT LEFT(Segment, 2) FROM PRODUCT_SALES WHERE Region =
'A';
2. SELECT (SalesQ2 - SalesQ1) / 2 AS Sale2 FROM PRODUCT_SALES
WHERE Segment = 'High';
3. SELECT SUM(SalesQ1) AS "TOTAL” FROM PRODUCT_SALES WHERE
Region = 'B';

Ans.
1. | LEFT(Segment, 2) |
| Hi |
| Lo |

2.
| Sale2 |
| 3500 |
| 1500 |

3.
| TOTAL |
| 40000 |
27 You are tasked with creating a DataFrame to store information about gaming 3
apps available on various digital platforms. The DataFrame should have three
columns: Name, Genre, Type (Free or Paid), and Downloads.

To achieve this, you have the following data:


Name Genre Type Downloads(mil)
1 Call of Duty: Warzone FPS Free 20
2 The Witcher 3: Wild Hunt RPG Paid 5
3 Candy Crush Saga Puzzle Free 65
4 Among Us Arcade Free 50
5 Minecraft Sandbox Paid 10

Now create a dataframe with a dictionary of Series and index should be from 1
to 5.

Ans.
import pandas as pd
data =
{
'Name': pd.Series(['Call of Duty: Warzone', 'The Witcher 3: Wild Hunt',
'Candy Crush Saga', 'Among Us', 'Minecraft']),
'Genre': pd.Series(['FPS', 'RPG', 'Puzzle', 'Arcade', 'Sandbox']),
'Type': pd.Series(['Free', 'Paid', 'Free', 'Free', 'Paid']),
'Downloads(mil)': pd.Series([2000000, 500000, 10000000, 500000000,
10000000])
}
df_game = pd.DataFrame(data, index=range(1, 6))
print(df_game)
28 Write MySQL statements for the following: 3
A. To use a database named Pets.
B. To see all the tables inside the database.
C. To see the structure of the table named horse.
Ans.
A. USE Pets;
B. SHOW TABLES;
C. DESCRIBE horse;
29 Nisha loves online shopping and frequently makes purchases on various e- 3
commerce websites. One day, she received an email with an incredible
discount offer on a popular shopping platform. Excited about the deal, she
clicked on the provided link and made a payment. However, after the
transaction, she received neither a confirmation nor the product she ordered.

A few days later, she realized that the website was fake, and her money was
gone. She also found unauthorized transactions on her credit card. Distressed
and frustrated, Nisha decided to seek legal action.

Questions:
1. Identify the type of cybercrime Nisha is a victim of.
2. Is there a specific branch/division of police in which she can report the crime?
3. Suggest Nisha two precautionary measures she should take in the future
while shopping online to avoid falling victim to such situations.

Ans.
1. Nisha is a victim of Online Shopping Fraud and Phishing.
2. She can report the crime to the Cyber Crime Division of the local police.
3. Nisha should verify the authenticity of discount offers in emails and
only make purchases on trusted and verified e-commerce websites.
Additionally, she should enable two-factor authentication for her online
payment methods to enhance security.
OR
What are the positive impacts of ICT on physical and mental health? Describe
any two of such impacts.

Ans.
1. Improved Access to Medical Information: ICT provides easy access to
health-related information, empowering individuals to make informed decisions
about their well-being.
2. Telehealth Services: ICT enables remote consultations with healthcare
professionals, increasing healthcare accessibility, especially in remote areas.
3. Mental Health Apps: ICT supports mental health with apps and platforms
offering therapy and coping tools for managing stress and anxiety.
4. Health Tracking Devices: Wearable devices and apps help monitor physical
activity and vital signs, promoting overall wellness.
5. Health Education: ICT aids in health education and awareness campaigns,
promoting healthier lifestyle choices and preventive care.
30 Consider the given DataFrame ‘Anime’: 3
Name Genre Eps Year of Creation
1 Naruto Shounen 220 2002
2 One Piece Shounen 1300 1999
3 Attack on Titan Action 75 2013
4 Dragon Ball Z Shounen 291 1989

Write suitable Python statements for the following:


1. Add a row with the following data: [“Death Note“,“Mystery“,37,2006].
2. Rename the column ‘Eps’ to ‘Episodes’ and ‘Year of Creation‘ to ‘Year‘.
3. Drop the column ‘Genre‘.

Ans.
# 1. Add a row using loc
anime_df.loc[4] = ['Death Note', 'Mystery', 37, 2006]

# 2. Rename columns
anime_df.rename(columns={'Episodes': 'Eps', 'Year of Creation': 'Year'},
inplace=True)

# 3. Drop the 'Genre' column


anime_df.drop(columns=['Genre'], inplace=True)

SECTION D
QUES MARK
S
31 Alakh Niranjan is responsible for managing a database in a financial company. 4
The company stores financial transaction data in a table named FINE_TRNC.
Alakh needs your assistance in writing SQL queries to retrieve specific
information from the table. The attributes of the table are:
TransactionDate,TransactionAmount.

1. Write a query to display the date of the most recent transaction.


2. Write a query to retrieve the average transaction amount for the month of
June.
3. Write a query to list the maximum amount for the transaction that occurred in
the month of December.
4. Write a query to count the total number of transactions that took place in the
year 2023.

Ans.
1. SELECT MAX(TransactionDate) FROM FINE_TRNC;
2. SELECT AVG(TransactionAmount) FROM FINE_TRNC
WHERE MONTH(TransactionDate) = 6;
3. SELECT MAX(TransactionAmount) FROM FINE_TRNC
WHERE MONTH(TransactionDate) = 12;
4. SELECT COUNT(*) FROM FINE_TRNC
WHERE YEAR(TransactionDate) = 2023;
32 Riya, a Data Analyst working for a film studio, has created a DataFrame named 4
'movie_revenue_df' to store the revenue data of movies released by Viacom 18
in the year 2022. The DataFrame looks like this:
Movie Revenue (in crores)
A. Gangubai Kathiawadi 125
B. The Kashmir Files 340
C. Bhediya 75
D. JugJugg Jiyo 250
E. Bachchhan Pandey 120
An intern is working with her and has a few doubts. As Riya is busy with
analysis work. You answer on her behalf.
(i) Predict the output of the following python statement:
a. print(movie_revenue_df[‘Revenue (in crores)’].dtypes)
b. print(movie_revenue_df.iloc[2,0])
(ii) Delete the Second last row from the DataFrame.
(iii) Find out the total revenue.
OR (Option for part iii only)
Write Python statement to export the DataFrame to a CSV file named
“hit_movies_2022.csv” in the directory named ‘PMDB’ which is inside the
present working directory(PWD) of the project.

Ans.
(i)
a. int64
b. Bhediya
(ii) movie_revenue_df = movie_revenue_df.drop(movie_revenue_df.index[-3])

(iii)
total_revenue = 0
for label, value in movie_revenue_df['Revenue (in crores)'].iteritems():
total_revenue += value
OR
(iii) movie_revenue_df.to_csv('PMDB/hit_movies_2022.csv', index=False)

SECTION E
QUES MARK
S
33 Write suitable SQL queries for the following: 5
1. Write an SQL query to calculate 3 raised to the power of 4.
2. To round off the value 1969.5538 without any decimal part
3. Display the current date.
4. Convert the string 'After the test,take some rest’ to uppercase:
5. Return the length of the string 'To chalo shuru karte hain'.

Ans.
1. SELECT POW(3, 4);
2. SELECT ROUND(1969.5538, 0);
3. SELECT CURDATE();
4. SELECT UPPER('After test,take rest');
5. SELECT LENGTH('To chalo shuru karte hain');
OR
Take a look at the table structure of the table ‘IndianAlbums’ and `Artist_Info`

IndianAlbums Artist_Info
Attribute Data Type Attribute Data Type

AlbumID INT ArtistID INT


AlbumName VARCHAR(100) ArtistNam VARCHAR(100)
e

ArtistID INT
Nationalit VARCHAR(50)
y
ReleaseYear INT

Genre VARCHAR(50)

Sales DECIMAL(10,
2)

Language VARCHAR(50)

Write SQL queries to perform the following tasks:

1. Insert a new record into the `IndianAlbums` table with the following details:
- AlbumName: "Lagaan"
- ReleaseYear: 2001
- Genre: "Soundtrack"
- Sales: 5000000
- Language: "Hindi"

2. Update the `IndianAlbums` table to modify the sales of the album with
`AlbumID` 3 to 1000000.

3. Delete the record of the album named "Dil Se" from the `IndianAlbums` table.

4. Alter the table structure of `IndianAlbums` to add a new column named


"Language" of data type VARCHAR(50).

5. Select all albums released in the year 1990 or later, and for each album,
retrieve the album name, release year, genre, and the name of the artist.

Ans.

1. Insert a new record into the `IndianAlbums` table:


INSERT INTO IndianAlbums (AlbumName, ReleaseYear, Genre, Sales,
Language)
VALUES ('Lagaan', 2001, 'Soundtrack', 5000000, 'Hindi');

2. Update the sales of the album with `AlbumID` 3:


UPDATE IndianAlbums
SET Sales = 1000000
WHERE AlbumID = 3;

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


DELETE FROM IndianAlbums
WHERE AlbumName = 'Dil Se';
4. Alter the table structure to add a new column "Language":
ALTER TABLE IndianAlbums
ADD Language VARCHAR(50);

5. 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 I.ArtistID = A.ArtistID;
34 Rajat Parivahan Upkaram Pvt. Ltd. has established its presence in two cities: 5
Kaithal and Sirsa. The Kaithal city office has 4 blocks named K1, K2, K3 and
K4 and Sirsa is a franchise 400 kms away. The tables given below show the
distance between different blocks and the number of computers in each block.

Distance
(in m) K1 K2 K3 K4

K1 0 70 150 60

K2 70 0 130 50

K3 150 130 0 100

K4 60 50 100 0

Block No. of Workstations (Computers)

K1 50

K2 150

K3 30

K4 70

The company is planning to form a network by joining these blocks and two
offices. Answer the following questions to help them out:
1. Suggest the most appropriate block for placing the network server out of four
blocks.
2. To ensure efficient communication among the three cities, propose a
suitable network topology and provide a network diagram illustrating the
structure.
3. Please specify which city branch you choose as the LAN and why?.
4. Suggest the optimal placement of the following devices:
- Repeater
- Firewall
5. Company is planning to use VPN. Expand the term VPN and clarify its
significance within this network setup.

Ans.
1. K2 (Most no. of Workstations)
2. Star Topology (Draw the layout with K2 in the centre)

Kaithal Office

400 Kms

R epeater

Sirsa Branch

3. Kaithal, as all 4 blocks are in the same city and within few meters.
4.
- Repeater between K2 and K3 as the distance is >100 m to amplify the
signal
- Firewall should be placed at K2 as it forms the network perimeter
5. Virtual Private Network. It encrypts the communication thus making it
secure.
35 Month Wise sale of iphone 14 is given below: 5
data = { "Month": ["Sep22", "Oct22", "Nov22", "Dec22", "Jan23", "Feb23",
"Mar23", "Apr23"],
"Sales": [1000000, 1200000, 1500000, 2000000, 1800000, 1700000, 1600000,
1500000] }
Draw a line plot based on this data to know the trend of sales in two quarters (8
months). Use appropriate customisations.

Ans.
import pandas as pd
import matplotlib.pyplot as plt
data = {
"Month": ["Sep22", "Oct22", "Nov22", "Dec22", "Jan23", "Feb23", "Mar23",
"Apr23"],
"Sales": [1000000, 1200000, 1500000, 2000000, 1800000, 1700000,
1600000, 1500000]
}
df = pd.DataFrame(data)

# Create the line plot


plt.plot(df['Month'], df['Sales'], marker='o', linestyle='-')

# Customize the plot


plt.title('Monthwise Sales of iPhone 14 (Sep22 - Apr23)')
plt.xlabel('Month')
plt.ylabel('Sales')
plt.grid(True, linestyle='--', linewidth=0.5) #Optional
# Rotate the x-axis
axis labels for better readability
plt.xticks(rotation=45, ha="right") #Optional
#

plt.show()

OR
Write suitable Python code to create aBar Chart showcasing the medal
talley of top of countries in the asia cup 2023.

# medal count
medals = [88, 60, 58, 43, 35]

Ans.

import matplotlib.pyplot as plt


countries = ["China", "India", "Japan", "South Korea", "Iran"]
medals = [88, 60, 58, 43, 35]
plt.bar(countries, medals, color=['blue', 'green', 'red', 'purple', 'orange'])
plt.title("Top 5 Medal Winner Countries in Asia Cup Tournament 2023")
plt.xlabel("Countries")
plt.ylabel("Number of Medals")
plt.xticks(rotation=45, ha="right")
ha="rig #Optional
plt.grid(True, linestyle='--',', linewidth=0.5) #Optional
plt.show()
KENDRIYA VIDYALAYA SANGATHAN, JAIPUR REGION
FIRST PREBOARD EXAMINATION 2023-24
CLASSXII
INFORMATICS PRACTICES(065)
TIME:3 HOURS M.M.70

General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying02 marks each.
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has03 Long Answer type questions carrying 05marks each.
7. Section E has02 questions carrying 04 marks each. One internal choice is given in Q 34
and 35 against part c only.
8. All programming questions are to be answered using Python Language only.
9. 3333333333

PARTA
1. It is a world-wide network which is a collection of many other networks 1
a) Internet
b) Website
c) Web Page
d) LAN
2. It is an act of copying another person’s data idea, words or work and pretended that they 1
are our own.
a) Copyright
b) Virus
c) Plagiarism
d) IPR
3. Choose the method(s) used for managing e-Waste. 1
a) Reducingb) Reusingc) Recycling d) All of these
4. Which type of values will not be considered by SQL while executing the following 1
statement?
SELECT COUNT(column name) FROM STOCK;
a) Null value
b) Text value
c) Numeric value
d) Date value
5. In a table SHOP, column “Margin” contains the data 1
set(2.00,2.00,NULL,4.00,NULL,3.00,3.00).What will be the output after the execution of the
query given below?
SELECT AVG(Margin) FROM SHOP;
a) 2.9 b) 2.8 c)2.00 d) None of these
6. ‘P’ in IPR stands for 1
a) Proprietary
b) Platform
c) Patent
d) Property
7. Which of the following is not a category of MySQL functions? 1
a) Text Functions
b) Mathematical Functions
c) Aggregate Functions
d) Arithmetic Functions
8. Select the output of the following SQL Command : - 1
SELECT ROUND(568.45,-1)
a) 570
b) 550
c) 568
d) 600
9. Which of the following function is similar to LCASE () function? 1
a) Lowercase()
b) Lower()
c) Lower_case()
d) All of the these
10 To display Third Element of a Series object S,you will write : 1
. a) S[:3]
b) S[2]
c) S[3]
d) S[:2]
11 Choose statement from the statements given below which is not correct in the context of a 1
. DataFrame?
a) size is Mutable
b) Can perform Arithmetic operators on rows and columns.
c) Homogeneous tabular data structure
d) Two dimensional
12 Which attribute is not used with the Dataframe? 1
. a) size
b) column
c) empty
d) type
13 A computer program designed to simulate conversation with human users especially is 1
. known as
a) e-mail
b) Chat group
c) Whatsapp
d) Chat bot
14 Suppose you have a DATETIME “2023-11-10 12:50:10” value. Which function extracts the 1
. date part of the given DATETIME value.
a) CURRENT()
b) NOW()
c) SYSDATE()
d) DATE()
15 What is the name of the IT law that India is having in the Indian Legislature? 1
. a) India’s Technology(IT) Act,2000
b) India’s Digital Information Technology(DIT),Act,2000
c) India’s Information Technology(IT),Act ,2000
d) The Technology Act,2008
16 Which of the following are automatically granted to creators and authors? 1
. a) Copyright
b) Patent
c) Trademark
d) Netiquette
Q17and18areASSERTIONANDREASONING basedquestions. Mark thecorrect choiceas
i. BothAand Raretrue andRisthecorrectexplanationforA
ii. BothAand Raretrueand Ris not the correctexplanation forA
iii. Ais Truebut Ris False
iv. Ais false butR is True
17 ASSERTION (A):E-waste can be toxic and harmful for nature 1
. REASONING(R):E-Waste that do not organically break down can, over time, can seep
directly into the environment
18 ASSERTION(A):drop() function removes data from a Dataframe temporarily. 1
. REASONING(R): Axis parameter is compulsory with drop() function.
PARTB
19 What do you understand by a website? Mention any two points of difference between 2
aWebsite and Webpage?
OR
“Switch is an intelligent Hub”. State Yes or No with reason.
20 Gopi Krishna is using a table Employee which has columns - 2
Code,Name,Salary,Deptcode. He wants to display maximum salary department wise but
he did not get the desired result. Rewrite the query given below with necessary change to
help him get the desired result.
SELECT Deptcode,MAX(Salary) FROM Employee;
21 In SQL, differentiate HAVING and WHERE clause? 2
.
22 Consider the given data and write a python program to create a series named Subject 2
. using a dictionary.
English 75
Hindi 78
Math 82
Science 88

23 Explain any two physical problems of using technology excessively. 2


. OR
What is meant by digital footprint? Give example of one active and one passive digital
footprint?

24 What will be the output of the following code: 2


.
import pandas as pd
numbers=pd.Series([9,8,7,6,5],index=range(0,10,2))
print(numbers[1:3]

25 Answer the following questions based on the code given below : - 2


. …………………….... # Statement 1
Ld=[{'a',10,'b':20},{'a':5,'b':10,'c':20}]
df=pd.DataFrame(Ld)
print(df)
i) Write the statement 1 in the above code.
ii) How many columns will be there in the dataframe.
SECTION C
26 Write a python code to create a DataFrame with appropriate column headings from the list 3
. given below:
[[201,’Gurmeet’,95],[202,’Praveen’,89],[203,’Suman’,97],[204.’Yogesh’,91]]

27 Consider the given DataFrame ‘Fees’: 3


.
Cname Fee
0 XII 3500
1 XI 3000
2 X 2700
3 VII 1800

Write suitable Python statements for the following:


i. Add a column called ‘Section’ with the data: [‘A’,’B’,’C’,’D’]
ii. Add a new Class Name named ‘IX' having price 1800.
iii. Remove the column ‘Section’.
28 Write SQL commands for the statements (i) to (iii) which are based on the given table 3
. WORKER.
PI GE PINCO SALA
SNAME FNAME CITY
D N DE RY
SHARM
1 GEET F JAMMU 182141 50000
A
SURINDE
2 SINGH M KANPUR 193222 75000
R
3 JCOB PETER M MUMBAI 185155 45000
4 ALVIS THOMAS M GURUGRAM 380025 50000
MOHA
5 GAURAV M KOLKATA 390026 33000
N
6 AZMI SIMI F NEW DELHI 110021 40000
MANPRE
7 KAUR F JAMMU 182141 42000
ET

i) SELECT SUM(SALARY) FROM PERSON WHERE GEN=’F’;


ii) SELECT GEN,COUNT(*) FROM PERSON GROUP BY GEN;
iii) SELECT MOD(SALARY,4000) FROM PERSON WHERE CITY=‘JAMMU’;

29 NISHA has recently changed his school so she is not aware of the people, but someone is 3
posting negative demeaning comments on his social media profile. She is also getting
repeated mails from unknown people. Every time she goes online, she finds someone
chasing him online.
i. Nisha is a victim of ___________.
ii. The action that Nisha should take to handle it.
iii. .......................... is a set of moral principles that governs the behavior of a group or
individual and regulates the use of computers.
OR
What do you understand by plagiarism? Why is it a punishable offence? Mention any two
ways to avoid plagiarism.
30 Consider a table “AGENT”” with the following data: 3
Table : AGENT
SNO ANAME SALAR BONU DOJ
Y S
A01 Beena Mehta 30000 45.23 29-10-2019
A02 K.L. Sahay 50000 25.34 13-03-2018
B03 Nisha Thakkar 30000 35.00 18-03-2017
B04 Leela Yadav 80000 NULL 31-12-2018
C05 Gautam Gola 20000 NULL 23-01-1989
Write SQL queries to
perform the following operations.
(i) Display Agent name and bonus after rounding off to zero decimal places.
(ii) Display the month name of the date of join (DOJ) of all the agents who have no bonus.
bonus
(iii) Display the
e minimum salary of all the agents
agents.
OR
What is the purpose of GROUP BY clause in MySQL? How is it different from ORDER BY
clause?
SECTION D
31 Write suitable SQL query for the following: 5
. i. Display 7 characters extracted from 7 th characterharacter onwards from the string
‘INDIASHINING’.
ii. Display the position of occurrence of string ‘COME’ in the string‘WELCOME WORLD’.
iii. Round off the value 78.779 to 2nd decimal place.
iv. Display the remainder of 1 149 divided by 6.
v. Remove all the expected leading and trailing spaces from a column USERID of the table
‘USERS’.
OR
Explain the following SQL functions using suitable examples.
i. LENGTH()
ii.RTRIM()
iii. NOW()
iv. DAYNAME()
v. POWER()
v. POWER(
32 VIKRAMA UNIVERSITY, Allahabad is setting up the network between its different wings. 5
. There are four wings named as Science(S), Journalism(J), Arts(A) and Home Science(H).

Distance between various wings

a. Suggest a suitable layout for networking the computers in each wing.


b. Name the wing where server needs to be installed.
c. Suggest the placement of Hub/Switch in the network.
d. Suggest type of wired media to provide internet accessibility to all wings.
e. University is planning to get its website designed which will allow students to see their
results after registering themselves on its server. Out of the static or dynamic, which type of
website will you suggest?

33 Mr. Gupta is working in a game development industry and he was comparing the given chart 5
on the basis of the rating of the
various games available on
the play store.

Write the python code for the above graph and Also give suitable python statement to save
this chart.
OR
Write a python program to plot a line chart based on the given data to depict the pass
percentage of students in CBSE exams for the years 2018 to 2022 as shown below.

Year=[2018,2019,2020,2021,2022]
Pass_Percentage=[85,83,90,82,92]

SECTION E
34 Naveen, a database administrator has designed a database for a Computer Stock. Help him 1+
by writing answers of the following questions based on the given table: 1+
2
TABLE: INVENTORY

Pid Pname Categor Qty Price


y
1 Keyboard IQ 15 450
2 Mouse IQ 10 350
3 Wi-fi router NW 5 2600
4 Switch NW 3 3000
5 Printer O 4 17000

i. Write a query to display product name in upper case.


ii. To display the records in descending order of the price.
iii. To display category and category wise highest price of product.
OR (Option for part iii only)
To display category and category wise total quantities of product.

35 Assume a DataFrame df has following data of passengers for the year 2010 to 2012 for
. January, March and December. Find output of the following python statements given 1+
below: - 1+
2
Year Mont Passengers
h
0 2010 Jan 25
1 2010 Mar 50
2 2012 Jan 35
3 2010 Dec 55
4 2012 Dec 65

i. df.columns
ii. df.shape
iii. df[df.Passengers>50]
OR (Option for part iii only)
df.tail(3)
KENDRIYA VIDYALAYA SANGATHAN, JAIPUR REGION
FIRST PREBOARD EXAMINATION 2023-24
CLASSXII
INFORMATICS PRACTICES(065)
TIME:3 HOURS M.M.70

General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying02 marks each.
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has03 Long Answer type questions carrying 05marks each.
7. Section E has02 questions carrying 04 marks each. One internal choice is given in Q 35
against part c only.
8. All programming questions are to be answered using Python Language only.
9.

PARTA
1. It is a world-wide network which is a collection of many other networks 1
a) Internet
b) Website
c) Web Page
d) LAN
An a) Internet
s
2. It is an act of copying another person’s data idea, words or work and pretended that 1
they are our own.
a) Copyright
b) Virus
c) Plagiarism
d) IPR
An b) Plagiarism
s
3. Choose the method(s) used for managing e-Waste. 1
a) Reducingb) Reusingc) Recycling d) All of these
An d) All of these
s
4. Which type of values will not be considered by SQL while executing the following 1
statement?
SELECT COUNT(column name) FROM STOCK;
a) Null value
b) Text value
c) Numeric value
d) Date value
An a) Null value
s
5. In a table SHOP, column “Margin” contains the data 1
set(2.00,2.00,NULL,4.00,NULL,3.00,3.00).What will be the output after the execution of
the query given below?
SELECT AVG(Margin) FROM SHOP;
a) 2.9 b) 2.8 c)2.00 d) None of these

An b) 2.8
s
6. ‘P’ in IPR stands for 1
a) Proprietary
b) Platform
c) Patent
d) Property
An d) Property
s
7. Which of the following is not a category of MySQL functions? 1
a) Text Functions
b) Mathematical Functions
c) Aggregate Functions
d) Arithmetic Functions
An d) Arithmetic Functions
s
8. Select the output of the following SQL Command : - 1
SELECT ROUND(568.45,-1)
a) 570
b) 550
c) 568
d) 600
An a) 570
s
9. Which of the following function is similar to LCASE () function? 1
a) Lowercase()
b) Lower()
c) Lower_case()
d) All of the these
An b) lower()
s
10. To display Third Element of a Series object S,you will write : 1
a) S[:3]
b) S[2]
c) S[3]
d) S[:2]
An b) S[2]
s
11. Choose statement from the statements given below which is not correct in the context of 1
a DataFrame?
a) size is Mutable
b) Can perform Arithmetic operators on rows and columns.
c) Homogeneous tabular data structure
d) Two dimensional
An c) Homogeneous tabular data structure
s
12. Which attribute is not used with the Dataframe? 1
a) size
b) column
c) empty
d) ndim
An b) column
s
13. A computer program designed to simulate conversation with human users especially is 1
known as
a) e-mail
b) Chat group
c) Whatsapp
d) Chat bot
An d) Chat bot
s
14. Suppose you have a DATETIME “2023-11-10 12:50:10” value. Which function extracts 1
the date part of the given DATETIME value.
a) CURRENT()
b) NOW()
c) SYSDATE()
d) DATE()
An d) DATE()
s
15. What is the name of the IT law that India is having in the Indian Legislature? 1
a) India’s Technology(IT) Act,2000
b) India’s Digital Information Technology(DIT),Act,2000
c) India’s Information Technology(IT),Act ,2000
d) The Technology Act,2008
An c) India’s Information Technology(IT),Act ,2000
s
16. Which of the following are automatically granted to creators and authors? 1
a) Copyright
b) Patent
c) Trademark
d) Netiquette
An a) Copyright
s
Q17and18areASSERTIONANDREASONING basedquestions. Mark thecorrect
choiceas
i. BothAand Raretrue andRisthecorrectexplanationforA
ii. BothAand Raretrueand Ris not the correctexplanation forA
iii. Ais Truebut Ris False
iv. Ais false butR is True
17. ASSERTION (A):E-waste can be toxic and harmful for nature 1
REASONING(R):E-Waste that do not organically break down can, over time, can seep
directly into the environment
An i) Both A and R are true and R is the correct explanation for A
s
18. ASSERTION(A):drop() function removes data from a Dataframe temporarily. 1
REASONING(R): Axis parameter is not compulsory with drop() function.
An iv) A is false but R is True
s
PARTB
19 What do you understand by a website? Mention any two points of difference between 2
aWebsite and Webpage?
OR
“Switch is an intelligent Hub”. State Yes or No with reason.
An Website
s A website is a collection of webpages and related content that is identified by a
common domain name and published on a web server.
- Website is a collection of webpage whereas web page is an individual page and
part of a website
- Website has domain name whereas webpage URL to access it
- Website is larger than a webpage
- Website takes longer to develop as compared to web page
1 mark for definition and 1 mark for any two correct point of difference
OR
Yes, switch is an intelligent hub because it sends received or incoming data/packets to
its recipient node only and provide point-to–point communication using MAC address.
1 mark for Yes and 1 mark for correct reason

20 Gopi Krishna is using a table Employee which has columns - 2


Code,Name,Salary,Deptcode. He wants to display maximum salary department wise
but he did not get the desired result. Rewrite the query given below with necessary
change to help him get the desired result.
SELECT Deptcode,MAX(Salary) FROM Employee;
An SELECT Deptcode, MAX(Salary) FROM Employee Group by Deptcode
s 2 marks for correct answer (Partial mark may be awarded)
21. In SQL, differentiate HAVING and WHERE clause? 2
An HAVING Clause
s - It is used only with GROUP BY clause to specify conditions on whole group or
aggregate function.
WHERE Clause
- It is used to specify condition on individual attribute(s) to filter the tuples/records, it
has no relation with GROUP BY clause
1 mark each for two correct point of differences

22. Consider the given data and write a python program to create a series named Subject 2
using a dictionary.
English 75
Hindi 78
Math 82
Science 88
An import pandas as pd ½ mark
s D={“English”:75,”Hindi”:78,”Math”:82,”Science”:88} ½ mark
Subject=pd.Series(D) ½ mark
print(Subject) ½ mark
23. Explain any two physical problems of using technology excessively. 2
OR
What is meant by digital footprint? Give example of one active and one passive digital
footprint?

An i. Sleep problem
s ii. Eyestrain
iii. Neck pain
iv. Headaches
v. Muscular pain
2 marks for any two correct point of differences

OR
Digital foorprints
A digital footprint is the trail of data created as a result of you online activity.
[1 mark]
Active Digital footprint – Logging in, posting comments, liking someone’s image etc [
½ mark]
Passive footprint – Your IP address, Browser history, clicking on a link or surfing on net
[ ½ mark]
24. What will be the output of the following code: 2

import pandas as pd
numbers=pd.Series([9,8,7,6,5],index=range(0,10,2))
print(numbers[1:3]

An 2 8
s 4 7
½ mark for each correct value of output ( ½ x 4 = 2 marks)
25. Answer the following questions based on the code given below : - 2
…………………….... # Statement 1
Ld=[{'a',10,'b':20},{'a':5,'b':10,'c':20}]
df=pd.DataFrame(Ld)
print(df)
i) Write the statement 1 in the above code.
ii) How many columns will be there in the dataframe.

An i) import pandas as pd [1 mark]


s ii) 3 columns [1 mark]
SECTION C
26. Write a python code to create a DataFrame with appropriate column headings from 3
the list given below:
[[201,’Gurmeet’,95],[202,’Praveen’,89],[203,’Suman’,97],[204.’Yogesh’,91]]
An import pandas as pd
s [½ mark]
data=[[201,'Gurmeet',95],[202,'Praveen',89],[203,'Suman',97],[204,'Yogesh',91]]
[ ½ mark]
df=pd.DataFrame(data,index=["S1","S2","S3","S4"],columns=["Rollno","Name","Marks"
]) [ 1 ½ marks]
print(df)
[ ½ mark]
27. Consider the given DataFrame ‘Fees’: 3

Cname Fee
0 XII 3500
1 XI 3000
2 X 2700
3 VII 1800

Write suitable Python statements for the following:


i. Add a column called ‘Section’ with the data: [‘A’,’B’,’C’,’D’]
ii. Add a new Class Name named ‘IX' having price 1800.
iii. Remove the column ‘Section’.
An i. Fees[“Section”]= [‘A’,’B’,’C’,’D’] [1 mark]
s ii. Fees.loc[4]=[“IX”1800] [1 mark]
iii. Fees.pop(“Section”) or Fees=Fees.drop(“Section”,axis=1) [1 mark]
28. Write SQL commands for the statements (i) to (iii) which are based on the given table 3
WORKER.
PID SNAME FNAME GEN CITY PINCODE SALARY
1 SHARMA GEET F JAMMU 182141 50000
2 SINGH SURINDER M KANPUR 193222 75000
3 JCOB PETER M MUMBAI 185155 45000
4 ALVIS THOMAS M GURUGRAM 380025 50000
5 MOHAN GAURAV M KOLKATA 390026 33000
6 AZMI SIMI F NEW DELHI 110021 40000
7 KAUR MANPREET F JAMMU 182141 42000

i) SELECT SUM(SALARY) FROM PERSON WHERE GEN=’F’;


ii) SELECT GEN,COUNT(*) FROM PERSON GROUP BY GEN;
iii) SELECT MOD(SALARY,4000) FROM PERSON WHERE CITY=‘JAMMU’;

An i) [1 mark]
s Sum(Salary)
132000
ii) [1 mark]
GEN COUNT(*)
F 3
M 4
iii) [1 mark]
MOD(Salary,4000)
2000
2000
29 NISHA has recently changed his school so she is not aware of the people, but 3
someone is posting negative demeaning comments on his social media profile. She is
also getting repeated mails from unknown people. Every time she goes online, she
finds someone chasing him online.
i. Nisha is a victim of ___________.
ii. The action that Nisha should take to handle it.
iii. .......................... is a set of moral principles that governs the behavior of a group or
individual and regulates the use of computers.
OR
What do you understand by plagiarism? Why is it a punishable offence? Mention any
two ways to avoid plagiarism.

An i) Cyber bullying/Cyber stalking [1 mark]


s ii) She should tell to her parents/guardians about it and lodge an FIR to nearest
police station under IT Act of India, 2000 [1 mark]
iii) Netiquettes [1 mark]

OR
Plagiarism
It means using someone else’s work without giving them proper credit or showing it your
own creations.
It is a punishable offence because it may result in a financial loss to the creator or an
intellectual property and also violating IPR is also a punishable offence.
Ways to avoid plagiarism: -
1. Give credit to the creator
2. Mention the source of the information
3. Create your own content
4. Do not copy paste
1 mark for definition 1 mark for two correct points ( ½ each)
30 Consider a table “AGENT” with the following data: 3
Table : AGENT
SNO ANAME SALARY BONUS DOJ
A01 Beena Mehta 30000 45.23 29-10-2019
A02 K.L. Sahay 50000 25.34 13-03-2018
B03 Nisha Thakkar 30000 35.00 18-03-2017
B04 Leela Yadav 80000 NULL 31-12-2018
C05 Gautam Gola 20000 NULL 23-01-1989
Write SQL queries to perform the following operations.
(i) Display Agent name and bonus after rounding off to zero decimal places.
(ii) Display the month name of the date of join (DOJ) of all the agents who have no
bonus.
(iii) Display the minimum salary of all the agents.
OR
What is the purpose of GROUP BY clause in MySQL? How is it different from ORDER
BY clause?
Ans i) SELECT ANAME,ROUND(BONUS,2) FROM AGENT[1 mark]
ii) SELECT MONTHNAME(DOJ) FROM AGENT WHERE BONUS IS NULL[1
mark]
iii) SELECT MIN(SALARY) FROM AGENT[1 mark]
OR
Group By
Is used to create group of rows having similar values in the specified column.[1 mark]
Example : - SELECT DEPT, COUNT(*) FROM EMPLOYEE GROUP BY DEPT
ORDER BY is used to arrange tuples/rows in ascending or descending order according
to the values in a given column.
Example : - SELECT * FROM EMPLOYEE ORDER BY DEPT[1 mark]
SECTION D
31. Write suitable SQL query for the following: 5
i. Display 7 characters extracted from 7th character onwards from the string
‘INDIASHINING’.
ii. Display the position of occurrence of string ‘COME’ in the string‘WELCOME
WORLD’.
iii. Round off the value 78.779 to 2nd decimal place.
iv. Display the remainder of 149 divided by 6.
v. Remove all the expected leading and trailing spaces from a column USERID of the
table ‘USERS’.
OR
Explain the following SQL functions using suitable examples.
i. LENGTH()
ii.RTRIM()
iii. NOW()
iv. DAYNAME()
v. POWER()
v. POWER(
An i) SELECT SUBSTR(‘INDIASHINING’,7,7)/ SELECT
s SUBSTRING(‘INDIASHINING’,7,7) /
SELECT MID(‘INDIASHINING’,7,7)
[1 mark]
ii) SELECT INSTR(‘WELCOME WORLD’,’COME’)
[1 mark]
iii) SELECT ROUND(78.779,2)
[1 mark]
iv) SELECT MOD(149,6)
[1 mark]
v) SELECT TRIM(USERID) FROM USERS
[1 mark]
OR
i) LENGTH() Returns
Returns length/number of characters of a given string.
ii) RTRIM()  Returns a string by removing all trailing spaces from a given string
iii) NOW()  Return current date and time of the system
iv) DAYNAME() Returns day name of the day of given date
v) POWER()  Return x raise to the power of y
1 mark each for correct definition
32. VIKRAMA UNIVERSITY, Allahabad is setting up the network between its different 5
wings. There are four wings named as Science(S), Journalism(J), Arts(A) and Home
Science(H).

Distance between various wings

a. Suggest a suitable layout for networking the computers in each wing.


b. Name the wing where server needs to be installed.
c. Suggest the placement of Hub/Switch in the network.
d. Suggest type of wired media to provide internet accessibility to all wings.
e. University is planning to get its website designed which will allow students to see their
results after registering themselves on its server. Out of the static or dynamic, which
w
type of website will you suggest?

An a. [1 mark star or bus topology ]


J
s A

S
H
b. Wing A [1mark]
c. In all the wings [1 mark]
d. Ethernet cable [1 mark]
e. Dynamic website [1 mark]

33 Mr. Gupta is working in a 5


game development industry
and he was comparing the
given chart on the basis of
the rating of the various
games available on the
play store.

Write the python code for the above graph and Also give suitable python statement to
save this chart.
OR
Write a python program to plot a line chart based on the given data to depict the pass
percentage of students in CBSE exams for the years 2018 to 2022 as shown below.

Year=[2018,2019,2020,2021,2022]
Pass_Percentage=[85,83,90,82,92]

An import matplotlib.pyplot as plt [ ½ mark]


s rating=[4.2,4.8,5.0,3.6,4.0]
games=["Subway surfer”,"Temple Run","Candy Crush","Bottle shot","Runner Best"]
plt.bar(rating,games) [1 mark]
plt.xticks([0,1,2,3,4],games)
plt.title("Rating of games") [½ mark]
plt.xlabel("Games") [½ mark]
plt.ylabel("Rating") [½ mark]
plt.show() [1 mark]
plt.savefig(‘games.jpg’) [1 mark]
OR
import matplotlib.pyplot as plt [ ½ mark]
Year=[2018,2019,2020,2021,2022]
Pass_Percentage=[85,83,90,82,92]
plt.plot(Year,Pass)[ 2 mark]
plt.title("Pass percentages in CBSE ")[ ½ mark]
plt.xlabel("Year")[ ½ mark]
plt.ylabel("Percentage")[ ½ mark]
plt.show()[ 1 mark]

SECTION E
34 Naveen, a database administrator has designed a database for a Computer Stock. Help 1+1+
him by writing answers of the following questions based on the given table: 2

TABLE: INVENTORY

Pid Pname Category Qty Price


1 Keyboard IQ 15 450
2 Mouse IQ 10 350
3 Wi-fi router NW 5 2600
4 Switch NW 3 3000
5 Printer O 4 17000

i. Write a query to display product name in upper case.


ii. To display the records in descending order of the price.
iii. To display category and category wise highest price of product.
OR (Option for part iii only)
To display category and category wise total quantities of product.

An i. SELECT UPPER(Pname) FROM INVENTORY [1 mark]


s ii. SELECT * FROM INVENTORY ORDER BY PRICE DESC [1
mark]
iii. SELECT CATEGORY, MAX(PRICE) FROM INVENTORY GROUP BY
CATEGORY; OR
SELECT CATEGORY, SUM(Qty) FROM INVENTORY GROUP BY
CATEGORY; [2 marks]
35. Assume a DataFrame df has following data of passengers for the year 2010 to 2012 for
January, March and December. Find output of the following python statements given 1+1+
below: - 2

Year Month Passengers


0 2010 Jan 25
1 2010 Mar 50
2 2012 Jan 35
3 2010 Dec 55
4 2012 Dec 65

i. df.columns
ii. df.shape
iii. df[df.Passengers>50]
OR (Option for part iii only)
df.tail(3)

An i) [“Year”,”Month”,”Passengers”]
s ii) (5,3)
iii)
Year Month Passengers
3 2010 Dec 55
4 2012 Dec 65
OR

Year Month Passengers


2 2012 Jan 35
3 2010 Dec 55
4 2012 Dec 65
General Instructions:
B and C.
question paper is divided into 3 Sections A,
-

(1) This
2 marks.
(1) Section A, consists 7 questions (1-7). Each question carries
(11) Section B, consists 3 questions (8-10). Each question Carries

3 marks.
Each question carries
(iv) Section C, consists 3 questions (11-13)
4 marks.
numbers - 1, 3, 7, 8 and 12.
(o) Internal choices have been given for question

SECTION - A

(Each question carries 2 marks)


Rushil thought "wwW and "Internet" are synonyms i.e., they meant
1 same and can be used interchangeably. But the teacher said that they are
not same. Help him to understand the meaning of both the terms with the

help of a suitable example of each.


OR
What are Cookies ? How can we disable Cookies ?

i) What is the function of a Gateway?


i) Give examples of any two plug-ins. 1

Find the output ofthe following SQL Queries: 2


3.
i) SELECT ROUND (7658.345,2);

ii) SELECT MODROUND (13.9,0),3);


OR
Give any two differences between the POWER() and SUM() SQL
functions.

Give one advantage and disadvantage each of Bus and Star topology.
4.

5. Find the output of the following SQL. queries


(i) SELECT sUBSTR("FIT INDIA MOVEMENT",5);
(i) SELECT INSTR("ARTIFICIAL INTELLIGENCE", "IA");

90 Page 2
6. Srikanth created the following table STUDENT in his database. 2
Table STUDENT
RollNo Name Class Marks
1 Ritika 12 40
2 Angad 12 35
3 Kaveri 11 42
4 Lalitha 12 21

Daniel 11 44
6 Rabindra 11 39
7 Rabia 11 28
He now wants to count number of students in each class where thhe
number of students is than 3. He has executed the
more
following query:
SELECT MAX (Marks) FROM STUDENT WHERE COUNT (*) >3 GROUP BY
Class
But, he got an error. Identify the error(s) and rewrite the query. Also
underline the correction(s) done.

7. Ms. Mohini is working in a school and stores the details of all students in
a table SCHOOLDATA.
TABLE : SCHOOLDATA
Admno Name Class House Percent Gender Dob
20150001 Aditya Das 10 Green 86 Male 2006-02-20
20140212 Harsh Sharma 11 Red 75 Male 2004-10-05
20090234 Swapnil Pant 10 Yellow 84 Female 2005-11-21
20130216 Soumen Rao 9 Red 91 Male 2006-04-10
20190227 Rahil Arora 10 Blue 70 Male 2005-05-14
20120200 Akasha Singh 11 Red 64 Female 2004-12-16
Write SQL statements from the above given table to:
() To remove leading spaces from the column Name.
(ii) Display the names of students who were born on Sunday.
OR
90 Page 3 P.T.O.
O

Predict the output of the following SQL queries from the given table
SCHOOLDATA
)SELECT MAX(Percent)FROM
i) SCHOOLDATA;
SELECT LEFT(Gender,1), Name FROM SCHOOLDATA WHERE YEAR
(ii)
(Dob)=2005;

SECTION - B

(Each question carries 3 marks)


8.
S. Predict the output of the following SQL queries 3
) SELECT TRIM(" ALL THE BEST ");
ii) SELECT POWER(5,2);
(ii) SELECT UPPER (MID("start up india",10);
OR
Consider a table "MYPET" with the following data:
Table: MYPET
Pet_id Pet_Nam Breed LifeSpan Price Discount
101 Rocky Labrador Retriever 12 16000 5

202 Duke German Shepherd 13 22000 10

303 Oliver Bulldog 10 18000 7

404 Cooper Yorkshire Terrier 16 20000 12

505 Oscar Shih Tzu NULL 25000 8

Write SQL queries for the following:


(i) Display the Breed of all the pets in uppercase.
(ii) Display the total price of all the pets.
(iii) Display the average life span of all the pets.

Write the names of SQL functions to perform the following operations 3


) Display name of the Month from your date of birth.
ii) Convert email-id to lowercase.
(iii) Count the number of characters in your name.

90 NNU Page 4
10. Consider the following table PRODUCT 3
Table: PRODUCT
PID PNAME PRICE QUANTITY
P1001 Eraser 10.50 5
P1002 Ball Pen 15.00 2
P1003 Gel Pen 25.1 3
P1004 Ruler 5.00
Find the output of the following SQL queries
SELECT 10+MOD(QUANTITY,3) FROM PRODUCT WHERE PNAME =

"Eraser";
)
i) SELECT ROUND(PRICE,2)*QUANTITY FROM PRODUCT WHERE
QUANTITY > 2;

(iii) SELECT UCASE (RIGHT(PNAME,2)) FROM PRODUCT;

SECTION - C

(Each question carries 4 marks)


11. Consider the table: ITEM 4
Table: ITEM
SNo Itemname Type Price Stockdate
1 Chaises Living 11500.58 2020-02-19
2 Accent Chairs Living 31000.67 2021-02-115
3 Baker Racks Kitchen 25000.623 2019-01-01
4 Sofa Living 7000.3 2020-10-18
5 Nightstand Bedroom NULL 2021-07-23

Write SQL queries for the following:


(i) Display all the records in descending order of Stockdate.
(ii) Display the Type and total number of items of each Type.
(iii) Display the least Price.
(iv) Display the Itemname with their price rounded to 1 decimal place.

90 Page 5 P.T.O
12. Consider the following table
Table : SALESMAN
Scode Sname Area Qtysold Dateofjoin
S001 Ravi |North 120 2015-10-001
SO02 Sandeep South 105 2012-08-01
S003 Sunil NULL 68 2018-02-01
S004 Subh West 280 2010-04-01
SO05 Ankit East 90 2018-10-01
SO06 Raman | North NULL 2019-12-01
Predict the output for the following SQL queries:
)) SBLECT MAX(Qtysold), MIN(Qtysold) FROM SALESMAN;
(i) SELECT cOUNT (Area) FROM SALESMAN;
111) SELECT LENGTH (Sname) FROM SALESMAN WHERE
MONTH(Dateofjoin)=10
iv) SELECT Sname FROM SALESMAN WHERE RIGHT(Scode, 1)=5;
OR
Based on the given table SALESMAN write SQL queries to perform the
followingoperations:
) Count the total number of salesman.
(i) Display the maximum qtysold from each area.
(ii) Display the average qtysold from each area where number of
salesman is more than 1.
(iv) Display all the records in ascending order of area.

13. ABC International School, Delhi has different wings Administrative Wing
(W1), Primary Wing (W2), Middle Wing(W3) and Secondary Wing(W4) as
shownin the diagram:
ADMINISTRATIVE/ PRIMARYY
WING (W1) WING (W2)/
MUMBAI
BRANCH
MIDDLE SECONDARY
WING (W3)/ WING (W4)

The school also has a branch in Mumbai. The school management wants
to connect all the wings as well as all the computers of each wing
(W1, W2, W3, W4).

90 Page 6
Distance between the wings are as follows:
-

W3 to W1 85 m
W1 to W2 40 m
W2 to W4 25 m

W4 to W3 120 m
W3 to W2 150 m
W1 to W4 170 m
Number of computers in each of the wing:

W1 125

W2 40

W3 42

W4 60

answer the following questions:


Based on the above specifications,
for
suitable cable layout
and draw the most
(i) Suggest the topology
all the wings of Delhi branch.
connecting
MAN, WAN) for
kind of network required (out of LAN,
(ii) Suggest the
connecting
Middle Wing (W3)
Administrative Wing (W1) with
(a)
(a)
with the Mumbai
branch.
Administrative Wing (W1)
(b) devices withjustification:
of the following
the placement
(iii) Suggest
(a) Repeater
(b) Switch/Hub

classes. Suggest the


to adopt Online
school had internet. Also,
(iv) Due to pandemic sending the voIce signals o v e r
is used for WwW that helped
the teachers
protocol that application
of
example of
an
an students.
give instantly to the
messages
to send

Page 7

90
CBSE Additional Practice Question Paper
Class: XII Session: 2023-24
Informatics Practices (065)
Time allowed: 3 Hours Maximum Marks: 70

General Instructions:

1. This question paper contains five sections, Section A to E.


2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has 02 questions carrying 04 marks each.
7. Section E has 03 Long Answer type questions carrying 05 marks each.
8. All programming questions are to be answered using Python Language only.
SECTION A
1 How can individuals protect themselves from identity theft? 1
a. Share personal information freely on social media
b. Use the same password for all online accounts
c. Shred sensitive documents, use strong passwords, and monitor
financial accounts
d. Never check bank statements
2 Which environmental issue is associated with electronic waste? 1
a. Ocean Acidification
b. Air Pollution
c. Noise Pollution
d. Water Scarcity
3 __________ is a networking device which can analyse the data being carried over 1
a network, decide or alter how it is packaged, and send it to another network of a
different type.
a. Modem
b. Hub
c. Router
d. Switch
4 You have a table called "sales" that contains sales data for a retail store. Which 1
SQL aggregate function can be used to calculate the total number of rows or
records in the "sales" table?
a. MAX()
b. MIN()
c. AVG()
d. COUNT()
5 Which Python command can be utilised to create a histogram using the data in a 1
list named 'values' that represents scores of students in an exam.
a. plt.hist(values)
b. seaborn.histplot(values)
c. plt.plot_histogram(values)
d. numpy.histogram(values)
6 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;

7 Which network topology typically results in less wire length usage as compared to 1
others?
a. Star topology
b. Mesh topology
c. Bus topology
d. Hybrid topology
8 Which of the following is not protected through Intellectual Property Rights (IPR)? 1
a. Literary works
b. Real estate properties
c. Trademarks
d. Patented inventions
9 __________ is a cyber-attack method that involves sending fraudulent emails or 1
messages to trick individuals into revealing sensitive information, such as login
credentials or financial data?
a. Malware Infection
b. DDoS Attack
c. Phishing
d. SQL Injection
10 Assertion (A): Cookies are small text files, stored locally by the client’s web 1
browser to remember the “name-value pair” that identifies the client.
Reason (R): Cookies are primarily used to track users' physical locations.
a. Both A and R are true and R is the correct explanation for A
b. Both A and R are true but R is not the correct explanation for A
c. A is True but R is False
d. A is false but R is True
11 Assertion (A): DataFrame and its size is mutable in Pandas. 1
Reasoning (R): Data in a Series is organised in a single column.
a. Both A and R are true and R is the correct explanation for A
b. Both A and R are true but R is not the correct explanation for A
c. A is True but R is False
d. A is false but R is True
12 You have a table called "employees" with columns "department" and "salary." 1
You want to find the highest salary in each department and display the results in
descending order of salary. Which SQL clauses should you use for this query?
a. GROUP BY, HAVING, ORDER BY
b. GROUP BY, ORDER BY
c. HAVING, ORDER BY
d. HAVING, GROUP BY
13 Which of the following function is used in Pandas to display the first few rows of 1
a specific column in a DataFrame?
a. show()
b. display()
c. head()
d. view()
14 Which SQL function can be used to convert a text string to uppercase? 1
a. UCASE()
b. LENGTH()
c. MID()
d. LTRIM()
15 A Series is a one-dimensional array containing a sequence of values of any data 1
type (int, float, list, string, etc), having by default have ______data labels.
a. alphanumeric
b. string
c. decimal
d. numeric
16 You are working with a database that stores employee information. You need to 1
retrieve the current date and time. Which SQL function would you use for this
purpose?
a. DATE()
b. MONTH()
c. DAY()
d. NOW()
17 Predict the output of the following query: 1
SELECT ROUND(15.789, 2);
a. 15.79
b. 15.789
c. 16
d. 15.8

18 Identify FOSS from the following: 1


a. MS-Windows
b. CorelDraw
c. Photoshop
d. Linux

SECTION B
19 Rashi has just started using internet. Mention her any four net-etiquette which she 2
should follow in order to become a good netizen.
OR
Mention any four communication etiquette, which one should follow while
communicating on the internet.
20 Consider the given dataframe: 2
Dataf1
F1 F2 F3
D1 20 30 5
D2 40 50 10
D3 60 70 15
D4 80 90 25
Fill in the blanks to get the given output:
F1 F3
D1 20 5
D3 60 15
a. print ( Dataf1.loc[______,_______])

F3 F2
D4 25 90
D3 15 70
b. print ( Dataf1.loc[______,_______])

21 Consider the given SQL QUERIES: 2


i. To retrieve the length of the given string "CBSE BOARD SQP @ 2023!", which
SQL function should you use?
a. LCASE()
b. MID()
c. LENGTH()
d. TRIM()
ii. To findout if ‘@’ symbol is present in the values of email id column or not, which
function out of the following should be used?
a. Find()
b. Instr()
c. FindStr()
d. OnStr()

22 Gaytri, a data analyst has stored four employee’s name and their employee code 2
in four dictionaries. Structure of one such dictionary is as follows:
Emp1={'Ename': 'Emp Name', 'Ecode’:Employee code}
She clubbed these four dictionary into a list.
Write suitable Python code to store the required data of four employees in the
form of list of dictionaries and create a DataFrame with appropriate column
headings as shown below:
23 Briefly explain the term URL. Also give one example of it. 2

24 Find the output of the following code: 2


import pandas as pd
lst1=[20,35,40]
ser1=pd.Series([20,35,40])
print(lst1+ lst1)
print(ser1+ser1)
25 Clarify the role of the HAVING clause highlighting its distinctions from the WHERE 2
clause in SQL.
SECTION C
26 Consider the following records in 'Cars' table and answer the given questions: 3

a. Write SQL query that will give the output as:


Blu
Bla
Bro
Blu
b. Write command for the following:
To change the color of Model with code as 103 to 'Green'.
c. How many tuples are present in the cars table?
Also identify the most suitable column of the cars table to mark as primary
key column.
OR
a. SELECT Make, Model FROM Cars WHERE Price > 30000.00;
b. SELECT COUNT(*) AS ‘TotalCars’ FROM Cars WHERE Year = 2022;
c. SELECT CarID, Make, Model FROM Cars where price<22000;
27 Complete the given Python code to get the required output as "California": 3
import _____________ as pd
data = {'Yosemite': 'California', 'Yellowstone': 'Wyoming', 'Glacier':
'Montana', 'Rocky Mountain': 'Colorado'}
national_parks = pd.Series(_____________)
print(national_parks_____________)
28 Suppose you already have “Nutrients" table in the "FOOD" database, as described 3
below:
Table Name: Nutrients
Column Name: Food_Item (VARCHAR)
Column Name: Calorie (INT)
Write SQL statements to perform the following tasks:
i. Add a new column named “Plan_Start_Date” (Date) to the
"Nutrients" table.
ii. ii. Modify the "Calorie" column to change its data type to Float.

29 Imagine a scenario where an individual, Alex, is concerned about his online privacy. 3
Alex has a social media presence and frequently posts updates, photos, and
comments on various platforms. Additionally, Alex frequently uses mobile apps
and visits websites for shopping and information.
a. Explain the concept of an active digital footprint, providing examples from Alex's
online activities.
b. Describe the concept of a passive digital footprint and provide examples of how
it is generated in Alex's online interactions.
c. Discuss the implications of both active and passive digital footprints for Alex's
online privacy and security.
OR
With reference to 3R’s, describe three essential approaches to manage electronic
waste. Also, provide practical examples of how individuals can actively participate
in each approach.
30 Consider the given DataFrame 'Employees': 3
Name Employee_ID Department
Alice EMP001 HR
Bob EMP002 Sales
Carol EMP003 IT
David EMP004 Marketing
Write suitable Python statements for the following operations:
i) Add a column called 'Salary' with the following data:
[55000, 60000, 65000, 58000].
ii) Include a new employee named 'Eve' with Employee_ID 'EMP005',
working in the 'Finance' department, and a salary of 62000.
iii) Change the name of the 'Employee_ID' column to 'ID'.

SECTION D
31 Imagine you are assigned a task to manage the inventory of an online store. The 4
store uses an SQL database to track product information in a table named
'Products.' The 'Products' table has columns for 'ProductID' (Primary Key),
‘ProductName', ‘Category’, 'QuantityInStock,' and 'PricePerUnit.'
The following scenarios represent different inventory management tasks:
i) Restocking: Due to a recent sale, the 'QuantityInStock' of a product
with 'ProductID' 101, named "Laptop," needs to be increased by 10
units.
ii) Product Availability Check: You need to check the availability of a
product named "Wireless Mouse" in the 'Electronics' category.
iii) Product Update: The price of all products in the 'Electronics' category
should be increased by 5% to account for market changes.
iv) Out of Stock: Identify and list the products that are currently out of
stock (QuantityInStock is 0).
For each scenario, provide the SQL statements to perform the
necessary action.
32 Wizbiz Corporation is recording the quarterly sales data of its three products 4
through different departments. The data is as follows:
Qtr1 Qtr2 Qtr3 Qtr4
Product1 3500 4200 4800 5100
Product2 2800 3100 3600 3900
Product3 1500 1800 2100 2400

The company stores this information in a CSV file named "Quarterly_Sales.csv."


Mr. Raj is tasked for writing a Python program to visualise this data. He wrote the
following Python code but encountered some difficulties. Help him by providing
solutions to the following situations:

import pandas as pd
import _______________ as plt #line 1
df = _________________ #line 2
df.plot(_________='bar', color=['purple', 'orange', 'green', 'yellow']) #line 3
plt.title ('Quarterly Sales Report') #line 4
plt.xlabel('Product')
plt.ylabel('Sales')
plt.show()
i. Choose the correct Python library from the following options to import in line
1:
A. matplotlib
B. matplotlib.plot
C. py.plot
D. matplotlib.pyplot
ii. Choose the correct option to specify the type of graph in line 3:
A. type
B. kind
C. style
D. graph
iii. Write suitable python statement to fetch the data from 'Quarterly_Sales.csv'
into the datafarme in line 2.
OR
Write Python statement to display total sales done in 'Qtr1' and 'Qtr2' for each
product.
SECTION E
33 Attempt the following questions: 5
(i) Write a SQL query to calculate the remainder when 15 is divided by 4.
(ii) Write a SQL query to retrieve the current year.
(iii) Write a SQL query to extract the first three characters from the string
'Hello, World!'.
(iv) Write a SQL query to convert the text in the 'description' column of
the 'product' table to uppercase.
(v) Write a SQL query to display the position of '-' in values of ACC_NO
column of table Bank.
OR
Observe the given tables carefully and attempt the following questions: 5

(i) Identify the column based on which both the tables can be related or
joined. Also justify your answer.
(ii) Write a SQL query to list names of all customers with their Amount in
ascending order:
(iii) Write a SQL query to find the total amount of money across all
branches.
(iv) Write a SQL query to count the total records in CUSTOMER table.
(v) Write a SQL query to find the minimum amount in a bank.
34 A large educational campus with multiple departments and buildings is planning 5
to establish an efficient network infrastructure to connect its various facilities. The
campus comprises five main buildings, each with specific distance and computer
requirements:
Distance between various buildings:
Building A to Building B: 50 meters
Building B to Building C: 30 meters
Building C to Building D: 30 meters
Building D to Building E: 35 meters
Building E to Building C: 40 meters
Building D to Building A: 120 meters
Building D to Building B: 145 meters
Building E to Building B: 65 meters
Each building hosts a varying number of computers:
Building A: 55 computers
Building B: 180 computers
Building C: 60 computers
Building D: 55 computers
Building E: 70 computers
Based on the above specifications, answer the following questions:
(a) Suggest a possible cable layout for connecting the buildings in an efficient
and effective way.
(b) Name the topology used for above cable layout.
(c) Suggest the most suitable place to install the server of this organisation.
(d) Suggest the placement of the following devices.
(i) Hub/Switch
(ii) Repeater
(e) The company wants to link its head office in ‘A’ building to its Office in
Sydney. What type of network this connection result into?
35 District wise total number of houses are represented in the following table: 5

Dist VII Dist VIII Dist IX Dist X


40 45 35 44
Draw the following bar graph representing the number of houses in each
District(Dist VII, Dist VIII, Dist IX, Dist X).

Also, give suitable python statement to save this chart in E: drive of the computer
with name ‘house.png’.
OR
Write a python program to plot a line chart based on the given data to depict the
weekly study patterns for all the seven days.
Day=[1,2,3,4,5,6,7]
Study_Hours=[5,4,6,5,7,8,10]
Also, give suitable python statement to save this chart in d: drive of the
computer with name ‘study.png’.
CBSE MARKING SCHEME ADDITIONAL PRACTICE PAPER
Class: XII Session: 2023-24
Informatics Practices (065)
Time allowed: 3 Hours Maximum Marks: 70
1 c. Shred sensitive documents, use strong passwords, and monitor financial 1
accounts
(1 mark for correct answer)

2 b. Air Pollution 1
(1 mark for correct answer)

3 c. Router 1
(1 mark for correct answer)

4 d. COUNT() 1
(1 mark for correct answer)

5 a. plt.hist(values) 1
(1 mark for correct answer)

6 d. SELECT * FROM customers WHERE email IS NULL; 1


(1 mark for correct answer)

7 c. Bus topology 1
(1 mark for correct answer)

8 b. Real estate properties 1


(1 mark for correct answer)

9 c. Phishing 1
(1 mark for correct answer)

10 c. A is True but R is False 1


(1 mark for correct answer)

11 b. Both A and R are true but R is not the correct explanation for A 1
(1 mark for correct answer)
12 b. GROUP BY, ORDER BY 1
(1 mark for correct answer)

13 c. head() 1
(1 mark for correct answer)

14 a. UCASE() 1
(1 mark for correct answer)

15 d. numeric 1
(1 mark for correct answer)

16 d. NOW() 1
(1 mark for correct answer)

17 a. 15.79 1
(1 mark for correct answer)

18 d) Linux 1
(1 mark for correct answer)

19 Net-etiquette: 2
 No copyright violation
 Share the expertise with others on the web
 One should respect the privacy of others on the web
 One should respect the diversity of others
( ½ mark for each correct net-etiquette)
OR
Communication-etiquette:
 One should be precise in communication on the web
 One should be polite in communication
 One should respect the data limits
 One should be credible
( ½ mark for each correct communication-etiquette)

20 a. print(Dataf1.loc[['D1', 'D3'], ['F1', 'F3']]) 2


b. print(Dataf1.loc[['D4', 'D3'], ['F3', 'F2']])
(1 mark for each correct answer )
21 i. c. LENGTH() 2
ii. b. Instr()
(1 mark for each correct option )

22 import pandas as pd 2
data=[{'Ename':'John', 'Ecode':88}, {'Ename':'Emily', 'Ecode':92},
{'Ename':'Michael', 'Ecode':78}, {'Ename':'Sophia','Ecode':95}]
df=pd.DataFrame(data)
print(df)

( ½ mark for each correct Python statement)

23 URL stands for Uniform Resource Locator. It provides the location and 2
mechanism (protocol) to access the resource, available on the web. URL is
sometimes also called a web address.
Example:
http://www.ncert.nic.in
(1 mark for URL explanation, and 1 mark for any one example)

24 [20, 35, 40, 20, 35, 40] 2


0 40
1 70
2 80

(1 marks for list output and 1 marks for series output )

25 HAVING clause in SQL is used to filter the results of a GROUP BY query based 2
on aggregated values.
Distinction of having clause from where clause:
The WHERE clause is applied to individual rows in the original dataset before
any grouping is performed. It filters rows based on specific column
conditions.
While HAVING clause is applied to grouped results after the GROUP BY
operation. It filters groups based on aggregated values, such as SUM, COUNT,
AVG, etc.

(1 mark for correct clarification of role of having clause)


(1 mark for correct distinction of having clause from where clause)
26 a. SELECT LEFT(COLOR, 3) FROM Cars WHERE COLOR='Blue' OR 3
COLOR='Black' OR COLOR='Brown';
b. UPDATE Cars SET Color = 'Green' WHERE CarID = 103;
c. Number of tuples: 6
Primary key column: CarID

( 1 mark for each correct answer)


OR
a.
Make Model
-------------------
Ford Mustang
BMW X5
-------------------
b.
TotalCars
---------
2
---------
c.
CarID Make Model
----------------------------------------------
106 Volkswagon Golf
----------------------------------------------
(1 mark for each correct answer)

27 import pandas as pd 3
data = {'Yosemite': 'California', 'Yellowstone': 'Wyoming', 'Glacier':
'Montana', 'Rocky Mountain': 'Colorado'}
national_parks = pd.Series(data)
print(national_parks['Yosemite'])
(1 mark for filling each blank correctly)

28 i: ALTER TABLE Nutrients ADD Plan_Start_Date DATE; 3


(0.5 mark for alter command and 1 mark for add column)
ii: ALTER TABLE Nutrients MODIFY Calorie FLOAT;
(0.5 mark for alter command and 1 mark for modifying column)
29 a. Active Digital Footprint: Alex's active digital footprint includes actions like 3
posting photos and comments on social media platforms, making his
intentional online activities visible to others.
b. Passive Digital Footprint: Alex's passive digital footprint is created when
websites and mobile apps collect data about his browsing habits and
preferences without his direct input, often for purposes like targeted
advertising.
c. implications of both active and passive digital footprints for Alex's online
privacy and security: Alex's active digital footprint may expose him to privacy
risks if he shares sensitive information publicly. His passive digital footprint,
when mishandled, can lead to data privacy concerns and potentially put his
personal information at risk, emphasising the need for cautious online
behaviour and data protection measures.
( 1 mark for answering each part correctly)
OR
1. Reduce: Individuals can minimise e-waste by making mindful purchasing
decisions, such as buying longer-lasting electronic devices and only acquiring
what is genuinely needed. For example, opting for modular smartphones
with replaceable components can extend the lifespan of the device.
2. Reuse: Encouraging the reuse of electronic devices involves selling,
donating, or trading-in old gadgets. For instance, individuals can refurbish
and sell their old laptops to extend their use.
3. Recycle: To recycle e-waste responsibly, individuals can participate in e-
waste recycling programs or drop-off centers. For instance, recycling old cell
phones at designated collection points prevents them from ending up in
landfills.
(1 mark for each approach explained correctly)

30 i. Add a column 'Salary' 3


df['Salary'] = [55000, 60000, 65000, 58000]
ii. Include a new employee named 'Eve' with Employee_ID 'EMP005',
working in the 'Finance' department, and a salary of 62000.
Employees.loc[4] = ['Eve', 'EMP005', 'Finance', 62000]
iii. Rename the 'Employee_ID' column to 'ID'
df = df.rename(columns={'Employee_ID': 'ID'})
(1 mark for each part answered correctly)
31 i) UPDATE Products SET QuantityInStock = QuantityInStock + 10 4
WHERE ProductID = 101;
ii) SELECT * FROM Products WHERE ProductName = 'Wireless Mouse'
AND Category = 'Electronics';
iii) UPDATE Products SET PricePerUnit = PricePerUnit * 1.05 WHERE
Category = 'Electronics';
iv) SELECT ProductName FROM Products WHERE QuantityInStock = 0;
(1 mark for each part answered correctly)

32 i) D. matplotlib.pyplot 4
ii) B. kind
(1 mark for each part answered correctly)
iii) pd.read_csv('Quarterly_Sales.csv')

OR
print(df['Qtr1']+df['Qtr2'])
(2 marks for correct answer)

33 i. SELECT MOD(15, 4) AS Remainder; 5


ii. SELECT YEAR(NOW()) AS CurrentYear;
iii. SELECT LEFT('Hello, World!', 3) AS ExtractedString;
iv. SELECT UPPER(description) AS UppercaseDescription FROM product;
v. SELECT INSTR(acc_no, '-') FROM bank;
OR
i) ACC_NO as it is present in both the tables having related values.
ii) SELECT C.CUSTOMER_NAME, B.AMOUNT FROM CUSTOMER C
JOIN BANK B ON C.ACC_NO = B.ACC_NO ORDER BY B.AMOUNT
ASC;
iii) SELECT SUM(AMOUNT) AS TOTAL_AMOUNT FROM BANK;
iv) SELECT COUNT(*) from CUSTOMER;
v) SELECT MIN(AMOUNT) from BANK;
(1 mark for each part answered correctly)
34 5

A.
(1 mark correct answer)
B. Star
(1 mark for correct answer)
C. Building B as it has maximum number of computers.
(1 mark for correct answer)
D.
I) Hub/Switch should be placed in each building.
II) Repeater is placed between Building B to building D
(1/2 mark for each part answered correctly)
E. WAN
(1 mark correct answer)

35 import matplotlib.pyplot as plt 5


district = ['VII','VIII','IX','X']
houses = [40,45,35,44]
plt.bar(district, houses)
plt.savefig('e:\house.png')
plt.show()

1 mark for the import statement


1 mark for creating both the list
1 mark for appropriate usage of bar()
1 mark for savefig()
1 mark for show()
OR
import matplotlib.pyplot as plt
Day=[1,2,3,4,5,6,7]
Study_Hours=[5,4,6,5,7,8,10]
plt.plot(Day,Study_Hours)
plt.savefig('d:\study.png')
plt.show()

1 mark for the import statement


1 mark for creating both the list
1 mark for appropriate usage of plot()
1 mark for savefig()
1 mark for show()

You might also like