FIRST PREBOARD EXAMINATION

CLASS XII SESSION: 2024-25

INFORMATICS PRACTICES (065)

SET-I

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 × 1 = 21 Marks) Marks
1 State whether the following statement is True or False:
iloc is used to extract a specific portion from a Pandas Dataframe through label based indexing
1
2 Which of the following provides a correct order of clauses used in SQL?
a) Where, Order By, Group By, Having
b) Group By, Order By, Having
c) Group By, Where
d) Where, Group By, Order By
1
3 Identify the networking device responsible for broadcasting data to every node in a network
(A) Modem        (B) Hub        (C) Repeater        (D) Router
1
4 Identify the SQL commands used to add, modify tuples of a relation (table) in a relational database.
(A) CREATE, UPDATE
(B) INSERT, UPDATE
(C) ALTER, UPDATE
(D) INSERT, ALTER
1
5 Cookies refer to:
(A) Software that has become obsolete
(B) are temporary text files with small pieces of data
(C) Viruses that infect computers
(D) Permanent text files stored in your computer
1
6 Which of the following Python statements can not be used to select a column ‘age’ from a DataFrame ‘stu’ ?
(A) stu.loc['age',:]
(B) stu['age']
(C) stu.at[:,'age'])
(D) stu.loc[:,'age']
1
7 By default, the linestyle attribute of a plot () of Matplotlib draws _____ type of line.
(A) Solid                      (B) dashed
(B) Dash-dot                 (D) dotted
1
8 What will be the output of the query?
SELECT * FROM products WHERE product_name LIKE ‘%App%’;
(A) Details of all products whose names start with ‘App’
(B) Details of all products whose names end with ‘App’
(C) Names of all products whose names contain ‘App’
(D) Names of all products whose names end with ‘App’
1
9 Which of the following Python statements is used to write data to a CSV file from a Pandas DataFrame (Note: pan is an alias for pandas)?
(A) pan.save_csv('filename.csv')
(B) pan.from_csv('filename.csv')
(C) pan.to_csv('filename.csv')
(D) pan.tocsv('filename.csv')
1
10 What is open source software?
(A) It’s Source code is not available but re-distribution is allowed
(B) It’s source code is available with restrictions.
(C) It’s source code is available and re-distribution is allowed
(D) None of these
1
11 Consider TableA
Id Name Age
12Arun20
15Shreya24
99Rohit11
98NULL15
87Shreya22
What will be the output of the following command:
SELECT COUNT(*), COUNT(DISTINCT NAME), COUNT(NAME) FROM TABLEA;
a) 4,5,3          b) 5,4,3          c) 5,5,3          d) 5,3,4
1
12 Identify the network topology which connects devices in a hierarchical manner having root node and branches
(A) Bus          (B) Tree          (C) Mesh          (D) Star
1
13 Riya has written the following code, but she is not able to identify the result of the same.
import pandas as pd
s1=pd.Series([13,36,19,42],index=['a','b','c','4'])
print(s1[s1>=30])
Help her by selecting an appropriate option from the following
a)
a   True
b   False
c   False
4   True
dtype: bool
b)
b  36
4  42
dtype: int64
c)
b  True
4  True
dtype: bool
d) None of these
1
14 Which amongst from the following is used to identify a resource by its location or by its name or both?
a) Universal Resource Locator
b) Universal Resource Identifier
c) Uniform Resemble Locator
d) Uniform Resource Locator
1
15 While creating a Dataframe using a nested dictionary, the keys of the outer dictionary become:
(A) Values of the Dataframe              (C) Indices of the Dataframe
(B) Row labels of the Dataframe        (D) Column labels of the DF
1
16 Match the following SQL functions/clauses with their descriptions:
SQL Function Description
P. MONTH() 1. Removes leading spaces from the string
Q. MID() 2. Returns the name of month
R. LTRIM () 3. Return total number of rows of a table
S. COUNT(*) 4. Extracts a portion of a string.
(A) P-2, Q-4, R-3, S-1
(B) P-2, Q-4, R-1, S-3
(C) P-3, Q-4, R-1, S-2
(D) P-4, Q-2, R-1, S-3
1
17 Fill in the Blanks:
Boolean indexing in Pandas DataFrame can be used for _______
(A) Creating a new DataFrame
(B) Sorting data based on index labels
(C) Joining data using labels
(D) Filtering data based on condition
1
18 Which Matplotlib plot is best suited to represent categorical data using rectangular bars
(A) Bar chart                      (C) Horizontal bar chart
(B) Histogram                    (D) Both a and b
1
19 Which type of network covers a large geographical area spaaning various countries and continents
(A) PAN        (B) MAN        (C) LAN        (D) WAN
1
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 output of addition of two series will be NaN , if one of the elements or both have no values.
Reason (R): While performing mathematical operations on Series, by default all missing values are filled in with 0.
1
21 Assertion (A): The count(*) will yield a single value while round() will yield number of values equal to the cardinality of a table.
Reason (R): The count(*) is a multiple row function and round() is a single row function.
1
Q No. Section-B (7 × 2 = 14 Marks) Mks
22 (A) What is pandas library of Python? What is it’s significance?
OR
(B) What is the use of ‘import’ keyword in Python? Mention one use for each of the following attributes of DataFrame
(i)     T                      (ii) size
2
23 Raj has created a group on social media to share and discuss about academics.
But his friend Deepak is posting derogatory and threatening remarks in the group.
i) What is the term used for the task done by Deepak?
ii) Any act by Indian Government imposed to protect and safeguard issues like this? Explain in detail.
2
24 Consider the string: “Digital Technology”. Write suitable SQL queries for the following:
I.     To get the position of word “Tech” of the string.
II.    Remove the leading and trailing space of the given string.
2
25 (A) How static web pages and different from dynamic web pages ?
OR
(B) Explain the concept of plug-ins and give one example.
2
26 Based on the table ‘Product’ given below, Identify candidate key and primary key
PCode PName UPrice Rating BID
P01Shampoo1206M03
P02Toothpaste548M02
P03Soap257M05
P04Toothpaste654M01
P05Soap385M06
Also mention one difference between primary key and candidate key
2
27 Mention two health concerns associated with excessive use of mobile and computers. 2
28 (A)Ashi is writing a Python program to create a DataFrame using a nested list. But, her code contains some mistakes. Identify the errors, rewrite the correct code, and underline the corrections made.
Import pandas as PDR
L1 = [10, “C++”, 500]
L2 = [11, “Java”, 1000]
L3 = [12, “Python”, 800]
L = [L1,L2,L3]
df = pandas.dataframe( L, [101,201,301,401])
print(df)
OR
(B)Complete the given Python code to get the required output (ignore the dtype attribute) as
Output:
XIA1      PCM
XIC1      Commerce
XIB1      PCB
Code:
________ as _____
D = _____ ‘XIA1’: ‘PCM’,’XIC1’:’Commerce’,’XIB1’:’PCB’ ______

L = [1,2,3]
S = pd.Series(___________ , index=__________)
print(S)
Q No Section-C (4 x 3 = 12 Marks) Mks
29 Aryan wants to replace his old music system by new. He throws his old music system in garbage.
I.     How this way of disposal of e-waste is hazardous for health of human.
II.    Suggest one suitable way to dispose of such waste products.
III.   Give two examples of e-waste
3
30 (A)Write a Python program to create the following DataFrame using a dictionary of list
House Color
0SubhashRed
1RamanYellow
2VivekanandGreen
3BhagatBlue
OR
(B)Write a Python Program to create a Pandas Series as shown below using a dictionary.Also display Series alternate rows starting from 1st row.
Note that the left column indicates the indices and the right column displays the data.
POST SALARY
MANAGER80000
ASSOCIATE75000
ENGINEER100000
CLERK50000
3
31 (i)Write an SQL statement to create a table named ORDERS, with the following specifications :
COLUMN NAME DATA TYPE SIZE CONSTRAINT
O_Id integer – Primary key
C_Name varchar 40 Not null
Product char 20
Quantity integer –
Price float 7,2
(ii) Write SQL Query to insert the following data in the Orders Table
1004, “Aadya”, “Camera”, 4, 6000
3
(2+1)
32 (A)Consider the following tables:

Table 1:
FACULTY which stores FACULTY ID (F_ID), FACULTY NAME (FNAME), HireDate(Hire_Date), SALARY(SALARY), DEPARTMENT(DEPARTMENT)
Table 2:
COURSES which stores Course ID (C_ID), FACULTY ID (F_ID), COURSE NAME (CNAME), FEES(FEES), ( for various faculty).
Note: Attribute names are written within brackets.

Table: FACULTY
F_ID FName Hire_Date Salary Department
102ARUN12-10-1995120000CS
103NAVYA24-12-2000100000ELECTRONICS
104RASHMI18-05-2001140000AI
105SUHANI11-09-2004110000CS
Table: COURSES
C_ID F_ID CNAME FEES
C101103DATA SCIENCE20000
C102105ARTIFICIAL INTELLIGENCE25000
I.     Display the department wise total salary, average salary.
II.    Display size of FName, first 3 characters of FName of faculty table.
III.   Display the F_id, faculty name along with their corresponding course name
OR
B) Consider the following tables:
Table 1:
FEE which stores RECNO, CID, AMOUNT. The table displays basic information of the fee deposited by candidate.
Table 2:
CANDIDATE, which stores CID, NAME and CLASS. The table displays the name , candidate id and class.
Table: FEE
RECNO CID AMOUNT
101A025000
102A036000
103A017000
Table: CANDIDATE
CID NAME CLASS
A01ADITIXI
A02ASHWIXII
A03ARYAX
A04ANJALIXI
Write appropriate SQL queries for the following:
I.     Display the class wise total number of candidates.
II.    Display the cid, name of candidates along with amount paid.
III.   Display the name and recno in ascending order of name.
3
Q No Section-D (2 x 4 = 8 Marks) Mks
33 Rishi has to display the result of students in different years. He has to create a line chart, representing the year, number of students secured above 90%
YEAR NO OF STUDENTS
202160
202265
202370
202495
Write suitable code to draw line chart as per the above data.
Also consider following points-
  • Display suitable x axis label and y axis labels
  • Display title of the chart as “RESULT ANALYSIS”
  • Save the chart with name “result.jpg”
  • Draw the line in ‘red’ colour with ‘dashed’ style
  • Display the chart
4
34 Shriya, who works as a database developer, has developed a database for a Medicine Shop. This database includes a table CLUB whose column (attribute) names are mentioned below:
CID- CUSTOMER ID
CNAME – NAME OF CUSTOMER
AGE- AGE OF CUSTOMER
GENDER- GENDER OF CUSTOMER
SPORTS-SPORTS PLAYED
PAY- PAY OF SPORTS
DOAPP- DATE OF APPLICATION
CID CNAME AGE GENDER SPORTS PAY DOAPP
5246AMRITA35FEMALECHESS9002006-03-27
4687SHYAM37MALECRICKET13002004-04-15
1245MEENA23FEMALEVOLLEYBALL10002007-06-18
1622AMRIT28MALEKARATE10002007-09-05
1256AMINA36FEMALECHESS11002003-08-15
1720MANJU33FEMALEKARATE12502004-04-10
2321VIRAT35MALECRICKET10502005-04-30
I.     Write SQL query to display name of customers and month of doapp.
II.    Write SQL query to display the counting of Female who play chess.
III.   Write SQL query to display the 4 characters from 2nd position of sports.
IV.   Write SQL query to display the details of club table in descending order of pay whose sports is cricket.
OR
Riya has created a database for a electricity department. The database includes a table named PERSON whose column (attribute) names are
P_ID- PERSON ID
NAME – NAME OF PERSON
DESIG- DESIGNATION OF PERSON
SALARY- SALARY OF PERSON
ALLOWANCE-ALLOWANCE OF PERSON
P_ID Name Desig Salary Allowance
P01RohitManager890004800
P02KashishClerkNULL1600
P03MaheshSuperviser48000NULL
P04SalilClerk310001900
P05RavinaSuperviserNULL2100
Write the output of the following SQL Queries.
I.     Select LENGTH(NAME) from PERSON where IS NOT NULL;
II.    Select NAME from PERSON where DESIG not in(“CLERK”,”MANAGER”);
III.   Select avg( salary) from PERSON where NAME like “%h%”;
IV.   Select min(salary), max(salary) from PERSON;
4
Q No. Section-E (3 × 5 = 15 Marks) Mks
35 Soft Infotech Software Development Company has set up its new centre at Ahmedabad for its office and web based activities. It has 4 blocks of building named Design, HR, Development, R & D.
It has following no. computers in each block.
Department Computers
HR25
Design50
Development125
R & D10
Shortest distances between various Blocks in meters are as follows:
Block HR to Block Design80 m
Block Design to Block Development140 m
Block Development to Block R&D30 m
Block R&D to Block HR150 m
i. Suggest the most suitable place (i.e. block) to house the server of this company with a suitable reason.
ii. Which type of network will be formed when all the blocks of Ahmedabad Centre are connected.
iii. The company is planning to link all the blocks through a secure and high speed wired medium. Suggest a way to connect all the blocks.
iv. Suggest the most suitable block to place the following devices:
a) Hub/Switch   b) Modem
v) Company is planning to purchase a new hardware to protect the network from unauthorised access from outside. Suggest a device.
5
36 Consider the DataFrame ‘countries’ shown below.
Country Capital Population
0CanadaOttawa37742154
1AustraliaCanberra25499884
2UKLondon67886011
3BrazilBrasilia212559417
Write Python statements for the DataFrame df to:
I.     Display the first two rows and last column of the DataFrame countries.
II.    Display Capital, Population of all the countries.
III.   Remove the columns country and capital
IV.   Display the data of the ‘Population’ column from indexes 1 to 3 (both included)
V.    Rename the row 3 as ‘Three’ and column ‘Capital’ as ‘Cap’
5
37 (A)Write suitable SQL query for the following:
I.     To display the total salary from the ‘PAY’ column (attribute) in the Emp table of each department (‘dept’ column) separately.
II.    To display the first five characters of the PANNO merged with last three charcters of ‘NAME’ in lowercase from the ‘Customer’ table.
III.   To display the Title of all books in uppercase from the column ‘Title’ in the ‘Books’ table, after eliminating any leading and trailing spaces.
IV.   To display the joining year of all teachers from ‘TEACHER’ table (column name is doj in ‘yyyy-mm-dd’ format)
V.    To display the position of ‘A’ and number of characters in the FNAME column of ‘FURNITURE’ table
OR
(B)Predict the output of the following SQL queries:
i.     SELECT ROUND(518723.6754,-2)+MOD(154,5) ;
ii.    SELECT MONTHNAME('2012-07-04'), DAY('2012-07-04');
iii.   SELECT LENGTH(TRIM(' New Delhi '));
iv.   SELECT SUBSTRING('MYSQL FUNCTIONS',-9,3);
v.    SELECT UCASE(RIGHT('Half Yearly Exam',4)) ;
5

error: Content is protected !!
Scroll to Top