ARMY PUBLIC SCHOOL, BANGALORE
PREBOARD II (2024-25)
Date: 09/12/2024 Set: 1 Max Marks: 70
Subject: Informatics Name: Time: 3 Hrs
Practices(065)
Class: XII Roll No: No of Pages : 13
General Instructions:
Please check this question paper contains 37 questions.
All questions are compulsory.
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.
Section-A (21 x 1 = 21 Marks)
1. The GROUP BY clause in SQL is primarily used to: (1)
(A) Delete rows from a table
(B) Add a new column to the table
(C) Remove duplicates from the result set.
(D) Group rows that share the same values.
2. Which of the following Python statements can be used to delete a column ‘RollNo’ from a (1)
DataFrame df?
(A) df.drop(columns=['column_name']) df.drop([‘RollNo’], axis=1, inplace=True)
(B) df.pop('RollNo')
(C) del df[‘RollNo’]
IP/ XII/ SET 1 / Page 1 of 13
(D) All of the above
3. In which of the network topologies are all devices(nodes) on the network is connected to a (1)
central device, such as a hub or a switch?
(A) Star
(B) Tree
(C) Mesh
(D) Bus
4. Which of the following is not a valid chart type ? (1)
(A) lineplot
(B) bargraph
(C) histogram
(D) statistical
5. What does e-waste stand for (1)
(A) Environmental waste
(B) Electronic waste
(C) Electrical waste
(D) Equipment waste
6. It allows a visited website to store its own information about a user on the user's computer: (1)
(A) Spam
(B) Cookies
(C) Malware
(D) Adware
7. Which of the following attribute is used to convert all rows of a DataFrame to columns and all (1)
columns to rows.
a. Transpose
b. T
c. inverse
d. dim
8. State whether the following statement is True or False: (1)
"In SQL, the DELETE command removes only the records from a table without deleting its
IP/ XII/ SET 1 / Page 2 of 13
table structure."
9. To extract row/column from a dataframe _______________ function may be used. (1)
(A) row()
(B) column()
(C) loc()
(D) All of these
10. Anna Roy, a graphic designer, came up with a visual symbol/ logo for her organization. (1)
Which of the following helps her to protect her intellectual property and protects her rights as
the creator of the visual symbol/logo?
(A) Trademark
(B) Patent
(C) Copyright
(D) Digital Footprints
11. Consider the Dataframe Temp: (1)
City Temp
Z1 Delhi 40
Z2 Mumbai 31
Z3 Chennai 29
Z4 Kolkata 39
Z5 Pune 28
What will be output for the below given python statement: -
print(Temp.head(-2))
(A) (B)
Tem City Temp
City p Z4 Kolkata 39
Z3 Chennai 29 Z5 Pune 28
Z4 Kolkata 39
Z5 Pune 28
(C) (D)
City Temp Tem
Z1 Delhi 40 City p
Z2 Mumbai 31 Z1 Delhi 40
Z3 Chennai 29 Z2 Mumbai 31
12. Fill in the Blank (1)
IP/ XII/ SET 1 / Page 3 of 13
The following code create a DataFrame df with _______ columns
import pandas as pd
df = pd.DataFrame([{'a':25 , 'b':50},{'a':15,'b':50,'c':30,’d’:50}])
print(df)
(A) 1 (B) 2 (C) 3 (D) 4
13. To display first three elements of a Series object S, you may write (1)
(A) S[:3]
(B) S[3]
(C) S[3rd]
(D) All of these
14. Mr. Sridhar , a school teacher wants to transfer data between their smartphone and laptop (1)
using Bluetooth in computer lab. Which type of network would this fall under?
(A) PAN
(B) LAN
(C) WAN
(D) MAN
15. A DataFrame is : (1)
(A) Value immutable
(B) Size immutable
(C) Both value and size mutable
(D) Both value and size immutable
16. Match the following SQL functions / clauses with their descriptions: (1)
SQL Functions Descriptions
(1) MID() (a) Returns the current date and time.
(2) CONCAT() (b) Finds the position(first occurrence) of a substring
(3) INSTR() (c) To extract a substring from a string
(4) NOW() (d) Adds two or more expressions/strings together
(A) 1- d , 2 – a , 3 – b , 4 – c
(B) 1- a , 2 – d , 3 – b , 4 – c
(C) 1- c , 2 – d , 3 – b , 4 – a
(D) 1- d , 2 – c , 3 – b , 4 – a
17. What will be the output of the following code? (1)
IP/ XII/ SET 1 / Page 4 of 13
import pandas as pd
myser = pd.Series([0,0,0])
print(myser)
(A) (B)
(C) (D)
18. URL stands for ____________ (1)
(A) Unique reference label
(B) Uniform reference label
(C) Uniform Resource Locator
(D) Unique Resource Locator
19. Ms Trisha who is an employee of a private sector organization receives an email claiming to (1)
be their bank, asking them to click a link and update their personal information. This is an
example of which type of cybercrime?
(A) Phishing
(B) Stalking
(C) Ransomware
(D) Spyware
Q20 and Q21 are ASSERTION AND REASONING based 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): Histograms are column-charts, where each column represents a range of (1)
values, and the height of a column corresponds to how many values are in that range.
IP/ XII/ SET 1 / Page 5 of 13
Reason (R): Histograms is created using histplot( ) function.
21. Assertion (A): The primary law in India dealing with cybercrime and electronic commerce is (1)
Indian Technology Act, 2000.
Reasoning (R): Intellectual Property refers to the inventions, literary and artistic expressions,
designs and symbols, names and logos.
Section-B (7 x 2 = 14 Marks)
22. (A) What is the difference between LAN and MAN? (2)
OR
(B) What is a Gateway? Explain.
23. Write a Python program to create the following DataFrame Student using a List of (2)
Dictionaries
Sno Sname Mail Mark
S01 1 Nishant
[email protected] 95
S02 2 Chirag
[email protected] 98
S03 3 Yoganand
[email protected] 92
24. Sheetal is a Trainee Software Engineer in an ecommerce company. She has been assigned a (2)
task to find the average price of product for categories available on the website of the
company but display only those where the average price in the category is more than 150. She
wrote the following SQL query but she is getting error in it.
Select PNAME, AVG(PRICE) from product where AVG(Price)>150;
Help her in identifying the reason for the error and write the correct query by suggesting the
possible correction.
25. (A) What is a Series in Python Pandas? Explain with an example. (2)
OR
(B) How do the head() and tail() functions work in a Pandas Series?
26. Pooja writes the following commands with respect to a table employee having fields, empno, (2)
name, department, commission.
Command1 : Select count(*) from employee;
Command2: Select count(commission) from employee;
She gets the output as 4 for the first command but gets an output 3 for the second command.
Explain the output with justification.
27. What do you understand by digital footprint? What are the different types of digital (2)
footprints?
28. (A) Consider following dataframe “SalesData” : (2)
IP/ XII/ SET 1 / Page 6 of 13
EmpCode Zone Product SalesQty
10 E101 NORTH DESKTOP 160
20 E102 SOUTH LAPTOP 290
30 E103 EAST MONITOR 70
40 E104 WEST MONITOR 347
50 E105 SOUTH PROCESSOR 90
(i) Write python statement to display only those rows where the Product is MONITOR.
(ii) Write python statement to display only Zone column.
OR
(B) What will be the output of the following:
import pandas as pd
x= [20, 40,90, 110]
y=pd.Series([20, 40,90, 110])
print (x*2)
print(y*2)
Section-C (4 x 3 = 12 Marks)
29. Explain the following: (3)
(a) Plagiarism (b) Email spoofing (c) FOSS
30. (A) Write a Python program to create the following DataFrame DFComp using a Dictionary ( 3 )
of Series
Company City EmpCount
C1 Microsoft San Fransico 221000
C2 Coco Cola New York 79100
C3 Infosys Bangalore 317000
C4 Toyota Toyota City 380793
OR
(B). Write a Python Program to create a Pandas Series Players as shown below using a
dictionary. Note that the left column indicates the indices and the right column displays the
data.
Virat Kohli Cricket
Neeraj Chopra Javelin throw
Mary Kom Boxing
31. I. Write an SQL statement to create a table named NUTRIENTS, with the following (3)
specifications:
Column Name Data Type Key
IP/ XII/ SET 1 / Page 7 of 13
Code Numeric Primary Key
FoodItemName Varchar(20)
Calories Numeric
ExpiryDate Date
Price Float(7,2)
II. Write SQL Query to insert the following data in the NUTRIENTS Table:-
1224, Britannia Cheese, 24 March 2025
32. (A) Consider the following tables: (3)
Table 1:
Flights which stores FlightId, model and company
Table 2:
Booking which stores Ticket number(Ticketno), passenger name(passenger), source,
destination, quality, price and Flightid
Table: Flights
Table: Booking
Write appropriate SQL queries for the following:
a)Write a query to count flights booking source wise.
b) Increase 10% fare/price of those flight booking whose destination is Delhi
c) Display Passenger name ,source along with the model and company details.
IP/ XII/ SET 1 / Page 8 of 13
OR
(B). Consider the following tables:
Table 1:
Stationary , which stores stationary id (S_ID), Stationary Name(StationaryName), Company
and Price
Table 2:
Consumer, which stores Consumer id (C_ID), Consumer_Name , Address and stationary id
(S_ID)
Table:- Stationary
Table:- Consumer
Write appropriate SQL queries for the following:
I. Display company wise average Price
II. Display length of those consumer name who are residing in Mumbai
III. Display the Company , stationaryname along with their consumer name
Section-D (2 x 4 = 8 Marks)
33. Write suitable Python code to create 'Favourite Hobby' Line graph as shown below: (4)
The data and specifications for creating the graph is:
Hobbies = ['Dance', 'Music', 'Painting' , 'Playing sports']
No of people = [300, 400, 100, 500]
IP/ XII/ SET 1 / Page 9 of 13
colour= green
marker=’*’
line width = 0.5
Also give suitable python statement to save this chart with name HobbyLineGraph.png.
34. (A) Marketing team of the company Poorvika Ltd is maintaining a database for their (4)
company. This database includes table SALESMAN, details are shown below:
Based on the given table SALESMAN, write SQL queries to perform the following
operations:
(i) Display all the records in descending order of Sname.
(ii) Display the average Qtysold from each area where number of salesman is less than 2
(iii) Display the minimum Qtysold from each area.
(iv) Count the total number of salesman.
OR
(B) With reference to the below given table SALESMAN, Predict output for the below given
commands :
IP/ XII/ SET 1 / Page 10 of 13
Write the output of the following SQL Queries.
(i) SELECT MIN(Qtysold), MAX(Qtysold) FROM SALESMAN;
(ii) SELECT COUNT(Qtysold) FROM SALESMAN;
(iii) SELECT LENGTH(Sname) FROM SALESMAN WHERE MONTH(DateofJoin) < 10;
(iv) SELECT Sname FROM SALESMAN WHERE RIGHT(Scode,1) = 4;
Section-E (3 x 5 = 15 Marks)
35. Viksit India Corporation is a start up company. The company is planning to setup their offices (5)
in India with its hub at Bangalore with its 4 blocks namely ADMIN, HR, FINANCE and
SOFTWARE. You as a network expert have to suggest the best network related solutions for
their problems raised in (i) to (v), keeping in mind the distances between the buildings and
other given parameters.
Block to Block distance(in meters):
Block(From
) Block Distance(in meter)
Admin Finance 60
Admin Software 80
Admin HR 75
Finance Software 110
IP/ XII/ SET 1 / Page 11 of 13
Finance HR 65
Software HR 90
Expected number of Computers to be installed in each block:
Admin 40
Finance 35
Software 110
HR 55
The company is planning to form a network by joining these blocks.
I. Suggest an ideal layout for connecting these blocks/centers. Also suggest a suitable
topology.
II What will be the most appropriate block where the company should plan to install their
server?
III For cost cutting , the organization has opted for online meetings. Suggest the protocol that
is used for sending the voice signals over internet. Also, give an example of an application
that can be used for online meetings.
IV. Viksit India Corporation intends to link its Bangalore center to the head office in Delhi.
Out of LAN, MAN, or WAN, what kind of network will be created?
Justify your answer.
V. Suggest the placement of the following devices with proper justification:-
(i) Switch/Hub
(ii) Repeater
36. Haridev designed the Dataframe TempDF that contains the temperature of different Zone(Z1, (5)
Z2,Z3) as shown below. Consider the given dataframe TempDF and write Python code
for the following:
City Maxtemp
Z1 Delhi 40
Z2 Mumbai 31
Z3 Chennai 29
Write Python Statement to do the following :
a. Add a new column MinTemp with value 32,23, & 21 for Z1,Z2 & Z3 respectively
b. Add a new row Z4 with values “Bangalore”, 28 and 21 for City, Maxtemp and MinTemp
respectively.
c. Display only the rows Z1 and Z3 of the dataframe TempDF
IP/ XII/ SET 1 / Page 12 of 13
d. Change the Maxtemp of row Z2 to 39
e. Save the content of dataframe to a CSV file “TempDFdata.CSV”
37. Write suitable SQL query for the following based on the table “SALESMAN”: (5)
SNO SNAME SALARY BONUS DateofJoin
A01 Beena Mehta 30000 300.23 2019-10-29
A02 K L Sahay 50000 500.34 2018-03-12
B03 Nisha Thakkar 30000 400.00 2018-03-18
B04 Leela Yadav 80000 NULL 2018-12-31
C05 Goutam Singh 20000 NULL 1989-01-23
C06 Tripti Garg 70000 600.37 1987-06-15
D07 Neena Sharma 50000 550.89 1999-03-18
(i) Display the total salary of the salesman table.
(ii) Display the last five characters of salesman names.
(iii) Display the four characters from salesman name starting from second character.
(iv) Display the month name for the date of join of salesman.
(v) Display the name of the weekday for the date of join of salesman.
OR
Write suitable SQL query using MySql functions for the following:
i. Display First 7 Characters of the String ‘APS KAMARAJ ROAD’.
ii. Display the position of occurrence of string ‘RAJ’ in the string ‘APS KAMARAJ
ROAD’.
iii. Round off the value 4335.78 to two decimal place.
iv. Display the remainder of 950 divided by 4.
v. Remove all the expected leading and trailing spaces from a column BookName of the
table ‘Library’. ( Column Name : BookName, Table Name : Library)
****************************************************************
IP/ XII/ SET 1 / Page 13 of 13