First Preboard Examination

Informatics Practices (Code No. 065)

Class – XII

Time Allowed: 3 Hrs. (SET-2) MM: 70

General Instructions:

  • All questions are compulsory.
  • The examination paper contains five sections, from Section A to Section 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 questions (33 to 34). Each question carries 4 Marks.
  • Section E consists of 3 questions (35 to 37). Each question carries 5 Marks.
  • There is no overall choice. However, internal choices have been provided in some questions.
  • Attempt only one of the choices in such questions.
  • 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.N Section-A (21 × 1 = 21 Marks) Marks
1 State whether the following statement is True or False:
The primary difference between .loc[] and .iloc[] is that .loc[] includes the stop index when slicing, while .iloc[] excludes it.
1
2 What will be the result of the following SQL query?
SELECT INSTR("INFORMATICS PRACTICES ",'R');
a. 4            b. 5            c. 14            d. 13
1
3 A mail or message sent to a large number of people indiscriminately without their consent is called _______________ 1
4 The CSV files are popular because they are:
(a) Capable of storing large amount of data
(b) Easier to create
(c) Preferred export and import format for databases and spreadsheets
(d) All of the above
1
5 A network device is used to regenerate and retransmit signals to extend the distance over which a data signal can travel on a network. Which of the following devices performs this function?
(a) Router          (b) Switch          (c) Hub          (d) Repeater
1
6 Write the output of the following SQL command:
SELECT ROUND(49.193,1);
(A) 49.2        (B) 49.19        (C) 49.0        (D) 49.13
1
7 Which of the following is not a violation of IPR?
(a) Plagiarism                        (b) Copyright infringement
(c) Patent                               (d) Trademark infringement
1
8 Given a Pandas series called Sequences, the command which will display the first 4 rows is _______________.
a. print(Sequences.head(4))          b. print(Sequences.Head(4))
c. print(Sequences.heads(4)           d. print(Sequences.Heads(4))
1
9 Consider the table student containing 4 rows and 5 columns? One row is removed and two more columns are included. What will be the degree and Cardinality?
(a) 4 , 5        (b) 5 , 4        (c) 7 , 3        (d) 3 , 7
1
10 ———— is a protocol (set of rules) used when transmitting files(data) over the world wide web.
(a) FTP        (b) HTTP        (c) SMTP        (d) None of these
1
11 The avg() function in MYSQL is an example of ———–
a) Math function                      (b) Text function
(c) Date function                     (d) Aggregate function
1
12 To display first three elements of a Series object S, you may write
(a) S[:3]        (b) S[3]        (c) S[3rd]        (d) All of these
1
13 What is the name of the IT law that INDIA is having in the Indian legislature?
(a) India’s technology (IT) act 2000
(b) India’s digital information technology act. 2000
(c) India’s information Technology (IT) act. 2000
(d) The technology act. 2008
1
14 In SQL, which command is used to select only one copy of each set of duplicate rows
(a) SELECT DISTINCT                (b) SELECT UNIQUE
(c) SELECT DIFFERENT              (d) All of the above
1
15 Sushila has created a DataFrame with the help of the following code:
import pandas
EMP={'empid':['E01','E02','E03','E04','E05'],'EMPNAME':['kishori','priya','damodar','reema','manoj'],
'emp_salary':[67000,34000,68000,90000,43000]}
print(df.loc[0:3,:])
and she wants to get the following output
    EMPID   EMPNAME    EMP_SALARY
001 E01     KISHORI    67000
002 E02     PRIYA      34000
003 E03     DAMODAR    68000
Help her to correct the code
(a) print(df.iloc['001':'003',:])
(b) print(df.loc['001':'003',:])
(c) print(EMP(loc[[0:3,:]]))
(d) print(df.loc['001':'004',:])
1
16 Which topology requires a multipoint connection on a single cable?
(a) Star        (b) Bus        (c) Mesh        (d) Tree
1
17 Match the following SQL String Functions with their correct descriptions:
SQL Function Description
P) SUBSTRING() or SUBSTR() 1. Removes leading/trailing/ or both leading and trailing characters (often spaces) from a string.
Q) LENGTH() or LEN() 2. Converts all characters in a string to uppercase.
R) TRIM() 3. Returns the number of characters in a string.
S) UPPER() or UCASE() 4. Extracts a substring of a specified length starting from a given position within a string.
Options: (A) P–4, Q–3, R–1, S–2          (B) P–3, Q–4, R–2, S–1
               (C) P–4, Q–1, R–3, S–2          (D) P–2, Q–3, R–1, S–4
1
18 To delete a row from a DataFrame, you may use ———— statement.
(a) remove        (b) del        (c) drop        (d) cancel
1
19 Using Employees table (columns: EmployeeID, Salary, Department), suggest a suitable query to remove all records for employees whose salary is less than RS 30000 1
Q-20 and Q-21 are Assertion (A) and Reason (R) Type questions. Choose the correct option as:
(A) Both A and R are True, and R correctly explains A.
(B) Both A and R are True, but R does not correctly explain A.
(C) A is True, but R is False.
(D) A is False, but R is True.
20 Assertion (A): When two Series objects are added, the result will contain NaN for any index where one or both Series do not have a value.
Reason (R): During arithmetic operations on a Series, missing values are not filled with 0 by default; instead, they remain as NaN.
1
21 Assertion(A): The ROUND() function in SQL can be used to round off a number to a specified number of decimal places.
Reason (R): The ROUND() function is a string function that accepts character values as input and returns numerical values as output.
1
SECTION B
22 a. Differentiate between Series and Dataframe.
OR
b. Name any four attributes of series with an example.
2
23 Write four points mentioning how one should dispose off E-waste. 2
24 Consider the following Series that stores the population (in lakhs) of major Indian cities:
import pandas as pd
population = pd.Series( [198, 124, 184, 70, 67, 56, 33, 92, 45, 31],
index=["Mumbai", "Delhi", "Bengaluru", "Kolkata", "Chennai",
       "Hyderabad", "Ahmedabad", "Pune", "Jaipur", "Lucknow" ])
Answer the following questions:
1. Write the command to display the names of all cities having population more than 100 lakhs.
2. Write the command to display only those cities whose population is between 50 and 150 lakhs (inclusive).
2
25 a. How static web pages are different from dynamic web pages?
OR
b. Explain the concept of VoIP and mention one benefit of using it.
2
26 Write SQL queries to perform the following.
i. Display the name of month in lowercase (e.g., january, february) for the date '2025-02-01'.
ii. Consider the SQL string "Career Counselling ". Write SQL query to extract the string "Counsel" from this string.
2
27 Define [i]. Plagiarism [ii] Open Source Software 2
28 a. Write the output of the following code.
import pandas as pd
import numpy as np
arr1=np.array([[11,12],[13,14],[15,16]],np.int32)
dtf2=pd.DataFrame(arr1)
print(dtf2)
OR
b. Write the output of the following code.
import pandas as pd
zoneA={'Target':56000,'Sales':58000}
zoneB={'Target':70000,'Sales':68000}
zoneC={'Target':75000,'Sales':78000}
zoneD={'Target':60000,'Sales':61000}
sales=[zoneA,zoneB,zoneC,zoneD]
saleDf=pd.DataFrame(sales,index=['zoneA','zoneB','zoneC','zoneD'])
print(saleDf)
2
SECTION – C (4×3 =12 marks)
29 Rajeev is a student studying in grade 12. He frequently uses the internet for various activities such as social networking, online shopping, and to research for school projects. Recently, he noticed that he receives targeted advertisements based on his browsing history and is concerned about his digital footprint. Additionally, Rajeev has also become the victim of phishing in which his personal information is targeted by phishing schemes including passwords, usernames, bank account information, and social security numbers. Help Rajeev by answering the following questions:
(a) What are digital footprints and how are they created.?
(b) Write any two net etiquettes that Rajeev should follow to ensure respectful and responsible online behaviour.
(c) How can Rajeev protect himself from phishing? Mention any one protective measures.
3
30 (A) Complete the given Python code to get the required output as:
import --------------- as pd
D1={'Corbett':'Uttarakhand','Sariska':'Rajasthan',
    'Kanha':'Madhya Pradesh','Gir':'Gujarat'}
NP=_______Series(_________)
print(___['Sariska'])
OR
(B) Write a python program to create the following DataFrame using dictionary of list.
    City          States
0   Lucknow       Uttar Pradesh
1   Dehradun      Uttarakhand
2   Bengaluru     Karnataka
3   Hyderabad     Telangana
3
31 (i) Write an SQL statement to create a table named Sports with following specifications:
Column Name Data Type Key
SportsID Numeric Primary Key
SportsName Varchar(25)
MatchDate Date
SponserName Char(20)
(ii) Write an SQL query to update SponserName from ‘Reliance’ to ‘Hindustan Petroleum’.
2+1
=3
32 Consider the following tables:

Table 1: PRODUCTS
This table stores the basic details of the products available in a shop.
PID PNAME CATEGORY
201LaptopElectronics
202ChairFurniture
203DeskFurniture
204SmartphoneNull
205TabletElectronics
Table 2: SALES
This table records the number of units sold for each product
SalesID PID UnitsSold
30120150
302202100
30320360
30420480
30520570
Write SQL queries for the following:
[i] To delete those records from table SALES whose UnitsSold is less than 80.
[ii] To display names of all Products whose Category is not known.
[iii] To display the Product names along with their corresponding units sold.
OR
Consider the SQL table REWARD
Table : REWARD
Employee_id Date_Reward Amount
E1012019-05-111000
E1022019-02-155000
E1032019-04-222000
E1062019-06-208000
Write suitable SQL queries to perform the following task:
[i] Remove the record of Employee_ID E103 from table REWARD.
[ii] Display all information of table REWARD in descending order of their Date_Reward.
[iii] Add a new column Experience of integer type in table REWARD
3
SECTION D
33 Plot the following data using a line plot:
Day 1 2 3 4 5 6 7
Tickets Sold 2000 2800 3000 2500 2300 2500 1000
  • Give suitable chart title, xlabel and ylabel.
  • Before displaying the plot display “Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday” in place of Day 1, 2, 3, 4, 5, 6, 7
  • Change the color of the line to ‘Magenta’.
  • Save the chart as ticket.jpg
4
34 A) Carefully observe the following table named ‘stock’:
Table: stock
Pid PName Category Qty Price
1KeyboardIO15450
2MouseIO10350
3Wifi-routerNW52600
4SwitchNW33000
5MonitorO104500
6PrinterO417000
Write SQL queries for the following:
(a) To display the records in decreasing order of price.
(b) To display category and category wise total quantities of products.
(c) To display the average price whose total price is below 800.
(d) To display total number of different categories.
OR
B) Satyam, a database analyst has created the following table:
Table: Student
RegNo SName Stream Optional Marks
S1001AkshatScienceCS99
S1002HarshitCommerceIP95
S1003DevikaHumanitiesIP100
S1004ManreenCommerceIP98
S1004ManreenCommerceIP98
S1005GauravHumanitiesIP82
S1006SauravScienceCSNULL
S1007BhaskarScienceCS95
S1007BhaskarScienceCS96
Write the output of the following SQL queries
[i] SELECT Sname ,Length(Sname) FROM student WHERE Optional="IP";
[ii] SELECT Upper(SName), Marks FROM ORDER BY Sname;
[iii] SELECT Optional,count(*) FROM Student GROUP BY Optional ;
[iv] SELECT Stream,Avg(Marks) FROM Student GROUP By Stream;
4
SECTION E
35 Multipurpose Public School, Bengaluru is Setting up the network between its Different Wings of school campus. There are 4 wings named as SENIOR(S), JUNIOR(J), ADMIN(A) and HOSTEL(H). Multipurpose Public School, Gurugram.

SENIOR JUNIOR ADMIN HOSTEL
Distance between wings
Wing A to Wing S100m
Wing A to Wing J200m
Wing A to Wing H400m
Wing S to Wing J300m
Wing A to Wing H100m
Wing J to Wing H450m
Number of computers in each wing.
Wings Number of Computers
Wing A20
Wing S150
Wing J50
Wing H25
i. Draw the cable layout to efficiently connect various wings of Multipurpose Public School Gurugram.
ii. Name the most suitable wing where the Server should be installed. Justify your answer.
iii. Which hardware device will you suggest to connect all the computers within each wing.
iv. Suggest a device/software that would provide data security for the entire network of the School.
v. Which type of network will be formed?
5
36 Consider the following data frame Prepaid
Model Connection Validity Amount
SumanNokiaAirtel3653500
RiteshSamsungIdea603000
DeepaLGVodafone3652500
SunilNokiaAirtel180900
KaranLGJio180850
Write Python statements for the following tasks:
i. Print the last three rows of the DataFrame Prepaid
ii. Add a new column named “New Price” with values [4000,3500,3000,1200,1000].
iii. Delete the column “Validity” from the DataFrame.
iv. Rename the column “Amount” to “Amt”.
v. Display only the “Model” and “Validity” columns from the DataFrame.
5
37 Write suitable SQL query for the following based on table Product of Q32.:
(i) To extract the last three characters from Category of table Product.
(ii) To display total number of Pname of table Product.
(iii) To display the Category column after removing leading and trailing space.
(iv) To display the year of Category by adding column year in table product.
(v) To display the current date.
OR
Write suitable SQL query for the following
(i) To display the total number of characters in the string 'MysqlDatabaseSystem'.
(ii) Find the position of the first occurrence of the letter 'a' in the string 'MysqlDatabaseSystem'.
(iii) Calculate the squareroot of the column Amount in table REWARD.
(iv) To display the maximum Amount of table REWARD.
(v) To display the total sum of the Amount of column Amount from table REWARD.
5
error: Content is protected !!
Scroll to Top