Class Xii Ip SQP 2024 - Set 1
Class Xii Ip SQP 2024 - Set 1
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.
Page 1 of 12
(D) Bridge
4 Identify the SQL command used to update existing records in a relation 1
within a relational database.
(A) MODIFY
(B) UPDATE
(C) ALTER
(D) CHANGE
5 Which of the following substances commonly found in e-waste is toxic to 1
humans and affects the kidneys, brain, and central nervous system?
(A) Beryllium
(B) Mercury
(C) Lead
(D) Cadmium
6 Which of the following Python statement can be used to select 1
column_name1 and column_name2 from the dataframe df?
(A) df.loc[:,‘column_name1’,column_name2’]
(B) df[ ‘column_name1’,column_name2’]
(C) df[:,[ ‘column_name1’,column_name2’]]
(D) df[[‘column_name1’,column_name2’]]
7 The _____________ module of matplotlib contains a collection of 1
functions that can be used to work on a plot.
(A) plot
(B) pyplot
(C) panel
(D) pandas
8 State whether the following statement is True or False: 1
The SQL function TRIM() is used to remove all occurrences of a
specified character from both ends of a string.
9 Which of the following statements is used to access the first five rows of 1
the DataFrame DF?
(A) DF.Head(5)
(B) DF.heads()
(C) DF.head()
(D) DF.Heads(5)
10 Ramu has downloaded an image from the internet and used it in his 1
project. However, the owner of the image does not permit its free usage.
What kind of violation has Ramu committed?
(A) Trademark Infringement
(B) Licensing
(C) Plagiarism
(D) Copyright Violation
11 Predict the output for the following SQL statement: 1
SELECT INSTR(‘Board Exam’, ‘BE’);
(A) 1
(B) 5
(C) 0
(D) Empty Set
12 In which network topology do all devices share a single communication 1
line, with data transmitted in both directions along that line?
(A) Star
Page 2 of 12
(B) Bus
(C) Ring
(D) All the above
13 In a Pandas DataFrame, if the shape attribute returns a tuple with the first 1
value as five and the second as six, what does this dimensionality
indicate?
(A) Five columns and six rows in the DataFrame
(B) The sixth row of the fifth column in the DataFrame
(C) Five rows and six columns in the DataFrame
(D) The fifth row of the sixth column in the DataFrame
14 Gaurav, an employee at a financial company, receives an email that 1
appears to be from the company’s IT department. The email requests that
Gaurav verify his login credentials due to "suspicious activity" on his
account. It contains a link labeled "Account Verification," which redirects
to a page closely resembling the company’s login portal. The email also
states that failure to respond within 24 hours may result in account
suspension. What type of cybercrime is involved in this scenario?
(A) Hacking
(B) Identity theft
(C) Plagiarism
(D) Phishing
15 Match the following SQL functions/clauses with their descriptions: 1
SQL
Description
Clauses
P ALTER 1 Delete an entire table or database.
Q OPEN 2 Change data within a table.
R DROP 3 Change the name of a column.
Page 3 of 12
18 When comparing the performance of different teams in a league, which 1
type of plot is ideal for showing their scores?
(A) Line plot
(B) Bar plot
(C) Histogram
(D) Bar plot and histogram
19 The type of network that links various branches of government 1
organizations across multiple global locations is ___________.
(A) PAN
(B) LAN
(C) MAN
(D) WAN
Q-20 and Q-21 are Assertion (A) and Reason (R) Type questions.
Choose the correct option as:
(A) Both Assertion (A) and Reason (R) are true, and Reason (R) is the
correct explanation of Assertion (A)
(B) Both Assertion (A) and Reason (R) are true, but Reason (R) is not
the correct explanation of Assertion (A)
(C)Assertion (A) is True, but Reason (R) is False
(D)Assertion (A) is False, but Reason (R) is True
20 Assertion (A): The number of columns in a DataFrame is determined by 1
the maximum number of keys in any dictionary within a list of dictionaries.
Reason (R): If a dictionary does not contain a corresponding value for a
column, a NaN (Not a Number) is inserted in its place.
21 Assertion (A): SQL functions like UPPER() and LOWER() are examples 1
of multiple-row functions.
Reason (R): Functions like UPPER() and LOWER() modify each row's
value individually without aggregating them.
Q No. Section-B (7 x 2 = 14 Marks) MARKS
22 (A) Neha is analyzing a dataset stored in a Pandas Series, where each 2
data entry is associated with a unique label rather than a default
numeric index. While exploring ways to retrieve specific data points,
she comes across two methods - loc and iloc - but isn’t sure how they
differ. Neha needs clarity on how each method operates, allowing her
to access data precisely by either label or position within the Series.
Briefly explain the difference between loc and iloc based on the
example provided.
OR
Page 4 of 12
24 Consider the string “World Economic Forum”. Write suitable SQL queries 2
for the following:
I. To display the position of the first occurrence of "For" in the
given string as 'Position'.
II. To extract and display “Forum” from the string.
25 Explain any two differences between Internet & WWW. 2
OR
Ravi, a college student, is very active on social media and often shares
his thoughts and experiences online. He frequently posts photos from his
travels, comments on friends’ posts, and participates in various online
forums. However, after hearing about privacy concerns related to digital
footprints, Ravi becomes worried about the information he is leaving
behind on the internet. To better understand the implications of his online
activities, Ravi decides to research digital footprints.
Help Ravi by defining digital footprints and explaining their significance in
the context of online privacy.
26 What is the term "primary key" in a database? Explain how it is different 2
from a unique key.
27 As technology advances, Ravi, a technology enthusiast, frequently 2
upgrades his gadgets. Over the past few years, he has accumulated
several old smartphones, laptops, and other electronic devices that he no
longer uses. Concerned about the environmental impact of electronic
waste, Ravi decides to take action.
Suggest any two methods Ravi can implement to manage his electronic
waste effectively.
28 (A) Surabhi is writing a Python program to create a DataFrame using a 2
list of dictionaries. However, her code contains some mistakes.
Identify the errors, rewrite the correct code, and underline the
corrections made.
import Pandas as pa
D1 = {'Name': 'Rakshit', 'Age': 25}
D2 = {'Name': 'Paul', 'Age': 30,'Grade':'A' }
D3 = {'Name': 'Ayesha", 'Age': 28}
DF = pa.Dataframe(D1,D2,D3)
print(DF)
OR
Page 5 of 12
Code:
import pandas as pd
Bookdf = ______ (pd.Series(['B01','PYTHON',500], ______ ), _______)
print(_________)
Q No. Section-C (4 x 3 = 12 Marks) MARKS
29 Aman received an email claiming that he had won a grand prize in an 3
online lottery and needed to provide his bank details, personal
identification, and a small processing fee to claim the prize. The email
also contained a link directing him to a page to fill out the required
information.
Answer the following questions:
I. Should Aman provide his bank details and personal information
on the link provided? Why or why not?
II. What is this type of message called, and how does it pose a
threat?
III. Suggest any two precautionary measures Aman should take in
the future while handling online messages or emails from
unknown sources.
30 Pranav, a botanist, needs to organize information about several plants in 3
the form of two series: one containing the common names of the plants
and the other containing their scientific names. He wants to combine this
data into a structured format and display it as a DataFrame, as illustrated
below:
OR
Page 6 of 12
PName Varchar 25
Gender Char 1 Not Null
DateofBirth Date
Fee Float 10 digits, with 2
decimal points
II. Write SQL Query to insert the following data in the PATIENT Table
P111, Gautam Raghav, M, 18-08-1995, 250
32 Consider the following relations: 3
Relation 1:
STUDENT which stores Student ID (STU_ID), Student Name
(STU_NAME), and Student City (STU_CITY).
Relation 2:
GRADES which stores Student ID (STU_ID), Subject (SUBJECT), and
Marks (MARKS) for various students.
Note: Attribute names are written within brackets.
Relation: STUDENT
STU_ID STU_NAME STU_CITY
1 AARAV MUMBAI
2 MEERA DELHI
3 ARJUN BANGALORE
4 PRIYA KOLKATA
5 VIKRAM CHENNAI
Relation: GRADES
STU_ID SUBJECT MARKS
1 MATH 88
1 SCIENCE 90
2 MATH 75
2 SCIENCE 80
3 MATH 95
4 SCIENCE 85
5 MATH 65
OR
Page 7 of 12
COACH, which stores CoachID, Name, and Country. The relation
displays basic information about the coaches.
Relation 2:
TEAMS, which stores TeamID, CoachID, and TeamName. The relation
displays the team names associated with each coach.
Relation: COACH
CoachID Name COUNTRY
201 Rajesh INDIA
202 Emma USA
203 Ahmed UAE
204 Sophia UK
205 Li CHINA
Relation: TEAMS
TeamID CoachID TeamName
301 201 Tigers
302 201 Panthers
303 202 Eagles
304 203 Falcons
305 204 Lions
306 205 Dragons
Page 8 of 12
import _____ as plt # Statement-1
I. Write the suitable code for the import statement in the blank
space in the line as Statement-1
II. Refer to the graph shown above and fill in the blank in
Statement-2
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 Priya, who works as a database designer, has developed a database for 4
an art gallery. This database includes a table called PAINTING with
columns (attributes) as described below:
PCODE: Shows the unique code for each painting.
TITLE: Indicates the title of the painting.
ARTIST: Specifies the name of the artist.
PRICE: Lists the cost of the painting.
Table: PAINTING
PCODE TITLE ARTIST PRICE
P001 STARRY NIGHT VAN GOGH 1200
P002 THE SCREAM EDVARD MUNCH 1500
Page 9 of 12
P003 MONA LISA LEONARDO DA 2000
VINCI
P004 THE KISS GUSTAV KLIMT 1300
P005 GIRL WITH A PEARL VERMEER 900
EARRING
Write SQL queries to accomplish the following tasks:
I. Display painting titles in uppercase.
II. Display the lowest price among the paintings.
III. Display the title and number of characters as Title_Length in each
painting title.
IV. Display the Painting Code and Price sorted by Price in ascending
order.
OR
Dr. Patel has created a database for a hospital's medical inventory. The
database includes a table named EQUIPMENT with the following
columns:
Table: EQUIPMENT
Page 10 of 12
The shortest distances between the departments/offices are as follows:
HR to IT 50 M
HR to SALES 75 M
HR to MARKETING 100 M
IT to SALES 95 M
SALES to MARKETING 60 M
PUNE OFFICE to HYDERABAD 1800 M
HR 100
IT 280
SALES 200
MARKETING 150
HYDERABAD OFFICE 50
Page 11 of 12
Write Python statements for the DataFrame StudDF to:
I. Print the first three rows of the DataFrame StudDF.
II. Display the names of all the students.
III. Remove the column Age.
IV. Display the Marks of Sarah, Michael and Emma.
V. Rename the column name Group to Stream.
37 Write suitable SQL query for the following: 5
I. To display the sum of values from the sales_amount attribute
in the Sales relation.
II. To display the first four characters of the product_code attribute
in the Inventory relation. (Note: The product codes are stored
in the format PROD-12345).
III. To display the data from the customer_name attribute in the
Customers relation, after converting all text to uppercase.
IV. To display the minimum value in the price attribute of the
Products relation rounded to the nearest whole number.
V. To determine the distinct count of entries in the orders relation.
OR
Page 12 of 12