HALF YEARLY EXAMINATION (2023-2024)
Subject: Informatics Practices
CLASS XII
General Instructions:
1.This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3 .Section A have 20 questions carrying 01 mark each.
4. Section B has 06 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.
Time: 3 Hours M.Marks: 70
Section A
1 The attack that focuses on capturing small packets from the network transmitted 1
by other computers and reading the data content in search of any type of information is ______
a) Phishing c) Scams
b) Eavesdropping d) PC intrusion
2 In SQL, the equivalent of UCASE () is: 1
a) UPPERCASE () c) UPPER()
b) CAPITALCASE() d) TITLE()
3 With reference to SQL, identify the invalid data type 1
a)date c) year
b) integer d) month
4 As Sunny works on his project, he collect and curated information.Whenever he clicks on the 1
link tha same piece of information is shown and the content is not clickable.
Sunny is accessing a/an _____________website.
a)dynamic c) outdated
b)Textual d) static
5 Missing data in Pandas object is represented through: 1
a) Null c) NaN
b) None d) All of the above
6 Raj, a Database Administrator, needs to display the average pay of workers from those departments which have 1
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?
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;
7 A mail or message sent to a large number of people indiscriminately without their consent is called _________. 1
8 Which of the following command will show the last 3 rows from a Pandas Series named NP? 1
a)NP.Tail( ) c) NP.TAIL(3)
b) NP.tail(3) d) All of the above
9 Which of the following is not a part of URL 1
a)IP address c) Domain Name
b) Port Number d) none of these
10 If column “Fees” contains the data set (5000,8000,7500,5000,8000), what will be the output after the execution of the given query? 1
SELECT SUM (DISTINCT Fees) FROM student;
a)20500 c) 20000
b) 10000 d) 33500
11 A client/server network is also called a ________________ network. 1
a) peer-to-peer network c) master-slave
b) Dedicated d) Non-dedicated
12 Miral received an email warning her of closure of her bank accounts if she did not update her banking information asap. 1
She clicked the link in the email and entered her banking information. Next, she got to know was 'she was duped' .
This is an example of ________
a) Online fraud c) Plagiarism
b) identity theft d) Phishing
13 SMPT expands to _______ ________ _______ ____________. ( Fill in the blank) 1
14 Which clause is used with 'aggregate functions ? 1
a) GROUP BY c) WHERE
b) SELECT d) Both (a) and ( c)
15 The ____________ function on Series object returns total elements in it including NaNs. 1
16 To get a number representing number of axes in a dataframe,__________________ attribute may be used. 1
a) size c) values
b) shape d) ndim
17 If a dataframe is created using a 2D dictionary, then the column labels are formed from_____. 1
a) dictionary's values c) outer dictionary's key
b) inner disctionary's key d) none of these
Q18 and 19 are ASSERTION AND REASONING based questions. Mark the correct choice as
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 series is a1D data structure which is value-mutable but size-immutable. 1
Reason. Everytime you change the size of a series object. Changes does not take place in the
existing series, rather a new series object is created with new size.
19 Assertion. The UNIQUE and PRIMARY KEY constraints are similar but not the same 1
Reason. The can be one column with promary key constraint in a table
20 Which command(s) is (are) used to redefine a column of the table in SQL? 1
a)ALTER TABLE c) MODIFY TABLE
b) DEFINE TABLE d) All of the above
Section B
21 Find the output of the following code: - 2
import pandas as pd
Stationery = ['pencils', 'notebooks', 'scales', 'erasers']
S = pd. Series ([20, 33, 52, 10], index = Stationery)
S2 = pd. Series ([17, 13, 31, 32], index = Stationery)
S = S + S2
print (S )
22 Write commands to print following details of a Series object seal. 2
i) if the series is empty
ii) indexes of the series
iii) the data type of underlying data
iv) if the series store any NaN values
23 Observe the following tables TRANSACTIONS and CUSTOMERS carefully and asnwer the questions that follows:
Table: TRANSACTIONS Table: CUSTOMERS
TNO TYPE AMOUNT CNO CNO CNAME
T1 CREDIT 1000 C3 C1 ZEESHAN
T2 DEBIT 1500 C1 C2 AMAN
i) What is the Degree of the table TRANSACTIONS? What is the cardinality of the table CUSTOMERS? 1
ii) Identify the primary key and candidate keys from the table TRANSACTIONS. 1
24 Consider the table SUPPLIER given below. Write output for (i) to (iv) in MySQL . ( 1/2 mark each) 2
TABLE SUPPLIER
i) SELECT Pname FROM SUPPLIER WHERE Supname IN ('Bread', 'Maggi');
ii) SELECT COUNT(DISTINCT City) FROM SUPPLIER;
iii) SELECT MAX(Price) FROM SUPPLIER WHERE City = ‘Kolkata’;
iv) SELECT Pname FROM SUPPLIER WHERE Pname LIKE ‘B%’ ORDER BY Price;
25 What will be the output produced by the following code, considering the Series object S? 2
import pandas as pd
Items=['pen','book','pencil','erasers']
S=pd.Series([20,30,55,10],index=Items)
S2=pd.Series([15,20,25,30],index=Items)
print(S+S2)
print(S[1:1])
print(S[0:1])
S[1:2]=20
print(S)
26 Explain the following SQL functions using suitable examples. (1/2 mark each) 2
i) TRIM() iii) DAYNAME()
ii) MID() iv) POWER()
Section C
27 Predict the output of the following queries:
i) select instr('
[email protected]','.'); 1
ii) select substr('
[email protected]',7,4); 1
iii) select left('
[email protected]',5); 1
28 Write MySQL statements for the following:
i) To create a database named FOOD. 1
ii) To create a table named Nutrients based on the following specification: 1
Column Name Data Type Constraints
Food_Item Varchar(20) Primary Key
Calorie Integer
iii) to insert a single row in the above created table. 1
29 Define the following :
i) Cyber Bullying 1
ii) Cyber Stalking 1
iii) Digital footprint 1
30 A relation Vehicles is given below:
V_no Type Company Price Qty
AW125 Wagon Maruti 250000 25
J0083 Jeep Mahindra 4000000 15
S9090 SUV Mitsubishi 2500000 18
M0892 Mini van Datsun 1500000 26
W9760 SUV Maruti 2500000 18
R2409 Mini van Mahindra 350000 15
Write SQL commands to:
i) Display the average price of each type of vehicle having quantity more than 20. 1
ii) Count the type of vehicles manufactured by each company. 1
iii) Display the total price of all the types of vehicles. 1
31 Consider a given Series , S-amt
Table 350
Chair 200
Sofa 800
Stool 150
i) Write a program in Python Pandas to create the series. 1
ii) Write the command which will display the name of furniture having rent>250. 1
iii) Write the command to name the series as Furniture. 1
Section D
32 Consider a table Employee and answer the SQL queries as per given table.
i) To display the name of all employees who are in the area south. 1
ii) To display list of all employees whose salary>=30,000 and <=40,000. 1
iii) To list out all the employees name whose name not contains the character K any where. 1
iv) To display all the employees details whose salary is greater than 35000. 1
33 Consider the following table named PRODUCT, showing details of products being sold in a grocery shop
.
Write the outputs(s) produced by executing the following queries on the basis given above in the table Product:
i) SELECT PNAME,AVG(UPRICE) FROM PRODUCT GROUP BY PNAME; 1
ii) SELECT DISTINCT MANUFACTURER FROM PRODUCT; 1
iii) SELECT COUNT(DISTINCT PNAME) FROM PRODUCT; 1
iv) SELECT PNAME,MAX(UPRICE),MIN(UPRICE) FROM PRODUCT GROUP BY PNAME; 1
Section E
34 Write the SQL functions which will perform the following operations:
i) To round off the value -84.3367 to 2 decimal place. 1
ii) To display the name of the day e.g. 'Monday' or 'Tuesday' from your date of birth. 1
iii) To remove all the probable leading and trailing spaces from the column name of the table named Employee. 1
iv) To display current date and time 1
v) To display the starting position of your first name(fname) from the whole name(name) 1
35 Guru Tegh University is setting up its academic blocks at Dehradun and is planning to set up a network.
The University has 3 academic blocks and one Human Resource Centre as shown in the disgram below.
i) Suggest the most suitable place (i.e., block/centre) to install the server of this University with a suitable reason. 1
ii) Suggest an ideal layout for connecting these blocks/centres for a wired connectivity. 1
iii) Which device will you suggest to be placed/installed in each of these blocks/centres to efficiently 1
connect all the computers within these blocks/centres?
iv) Suggest the placement of a Repeater in the network with justification 1
v) The university is planning to connect its admission office in Delhi which is more than 1,250 km from the university. 1
Which type of network out of LAN, MAN or WAN will be formed? Justify your answer.
36 Consider the following Series s3-
a 1.5
b 3.0
c 4.5
d 6.0
e 7.5
Now create the above series and find the output of the following commands
i) print(s3+3) 1
ii) print(s3*2) 1
iii) print(s3*2) 1
iv) print(s3[s3>3.0]) 1
v) print(s3[-4:]) 1
c) NaN
d) SELECT DEPT, AVG(SAL) FROM EMP GROUP BY DEPT HAVING COUNT (*) > 5;
len()
ndim
c) outer dictionary's key
a)ALTER TABLE
p 113
https://csiplearninghub.com/ip-class-12-chapter-1-querying-n-sql-functions/
V_no Type Company Price Qty
AW125 Wagon Maruti 250000 25
J0083 Jeep Mahindra 4000000 15
S9090 SUV Mitsubishi 2500000 18
M0892 Mini van Datsun 1500000 26
W9760 SUV Maruti 2500000 18
R2409 Mini van Mahindra 350000 15
Section A 20 1*20 Q1-Q20
Section B 12 2*6 Q21-Q27
Section C 15 5*3
Section D 8 2*4
Section E 15 3*5
HALF YEARLY EXAMINATION (2023-2024)
Subject: Informatics Practices
CLASS XII
General Instructions:
1.This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3 .Section A have 20 questions carrying 01 mark each.
4. Section B has 06 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.
Time: 3 Hours M.Marks: 70
Section A
1 The attack that focuses on capturing small packets from the network transmitted 1
by other computers and reading the data content in search of any type of
information is ______
a) Phishing c) Scams
b) Eavesdropping d) PC intrusion
2 In SQL, the equivalent of UCASE () is: 1
a) UPPERCASE () c) UPPER()
b) CAPITALCASE() d) TITLE()
3 With reference to SQL, identify the invalid data type 1
a)date c) year
b) integer d) month
4 As Sunny works on his project, he collect and curated information.Whenever he clicks on the 1
link tha same piece of information is shown and the content is not clickable.
Sunny is accessing a/an _____________website.
a)dynamic c) outdated
b)Textual d) static
5 Missing data in Pandas object is represented through: 1
a) Null c) NaN
b) None d) All of the above
6 Raj, a Database Administrator, needs to display the average pay of workers from those 1
departments which have ore 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?
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;
7 A mail or message sent to a large number of people indiscriminately without their consent 1
is called _________.
8 Which of the following command will show the last 3 rows from a Pandas Series named NP? 1
a)NP.Tail( ) c) NP.TAIL(3)
b) NP.tail(3) d) All of the above
9 Which of the following is not a part of URL 1
a)IP address c) Domain Name
b) Port Number d) none of these
10 If column “Fees” contains the data set (5000,8000,7500,5000,8000), 1
what will be the output after the execution of the given query?
SELECT SUM (DISTINCT Fees) FROM student;
a)20500 c) 20000
b) 10000 d) 33500
11 A client/server network is also called a ________________ network. 1
a) peer-to-peer network c) master-slave
b) Dedicated d) Non-dedicated
12 Miral received an email warning her of closure of her bank accounts if she did not 1
update her banking information asap. She clicked the link in the email and
entered her banking information. Next, she got to know was 'she was duped' .
This is an example of ________
a) Online fraud c) Plagiarism
b) identity theft d) Phishing
13 SMPT expands to _______ ________ _______ ____________. ( Fill in the blank) 1
14 Which clause is used with 'aggregate functions ? 1
a) GROUP BY c) WHERE
b) SELECT d) Both (a) and ( c)
15 The _________ function on Series object returns total elements in it including NaNs. 1
16 To get a number representing number of axes in a dataframe,__________________ 1
attribute may be used.
a) size c) values
b) shape d) ndim
17 If a dataframe is created using a 2D dictionary, then the column labels are formed from_____. 1
a) dictionary's values c) outer dictionary's key
b) inner disctionary's key d) none of these
Q18 and 19 are ASSERTION AND REASONING based questions. Mark the correct choice as
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 series is a1D data structure which is value-mutable but size-immutable. 1
Reason. Everytime you change the size of a series object. Changes does not take place in the
existing series, rather a new series object is created with new size.
19 Assertion. The UNIQUE and PRIMARY KEY constraints are similar but not the same 1
Reason. The can be one column with promary key constraint in a table
20 Which command(s) is (are) used to redefine a column of the table in SQL? 1
a)ALTER TABLE c) MODIFY TABLE
b) DEFINE TABLE d) All of the above
Section B
21 Find the output of the following code: - 2
import pandas as pd
Stationery = ['pencils', 'notebooks', 'scales', 'erasers']
S = pd. Series ([20, 33, 52, 10], index = Stationery)
S2 = pd. Series ([17, 13, 31, 32], index = Stationery)
S = S + S2
print (S )
22 Write commands to print following details of a Series object seal. 2
i) if the series is empty
ii) indexes of the series
iii) the data type of underlying data
iv) if the series store any NaN values
23 Observe the following tables TRANSACTIONS and CUSTOMERS carefully and asnwer the
questions that follows:
Table: TRANSACTIONS Table: CUSTOMERS
TNO TYPE AMOUNT CNO CNO CNAME
T1 CREDIT 1000 C3 C1 ZEESHAN
T2 DEBIT 1500 C1 C2 AMAN
i) What is the Degree of the table TRANSACTIONS? What is the cardinality of the table CUSTOMERS? 1
ii) Identify the primary key and candidate keys from the table TRANSACTIONS. 1
24 Consider the table SUPPLIER given below. Write output for (i) to (iv) in MySQL . 2
TABLE SUPPLIER ( 1/2 mark each)
i) SELECT Pname FROM SUPPLIER WHERE Supname IN ('Bread', 'Maggi');
ii) SELECT COUNT(DISTINCT City) FROM SUPPLIER;
iii) SELECT MAX(Price) FROM SUPPLIER WHERE City = ‘Kolkata’;
iv) SELECT Pname FROM SUPPLIER WHERE Pname LIKE ‘B%’ ORDER BY Price;
25 What will be the output produced by the following code, considering the Series object S? 2
import pandas as pd
Items=['pen','book','pencil','erasers']
S=pd.Series([20,30,55,10],index=Items)
S2=pd.Series([15,20,25,30],index=Items)
print(S+S2)
print(S[1:1])
print(S[0:1])
S[1:2]=20
print(S)
26 Explain the following SQL functions using suitable examples. (1/2 mark each) 2
i) TRIM() iii) DAYNAME()
ii) MID() iv) POWER()
Section C
27 Predict the output of the following queries:
i) select instr('
[email protected]','.'); 1
ii) select substr('
[email protected]',7,4); 1
iii) select left('
[email protected]',5); 1
28 Write MySQL statements for the following:
i) To create a database named FOOD. 1
ii) To create a table named Nutrients based on the following specification: 1
Column Name Data Type Constraints
Food_Item Varchar(20) Primary Key
Calorie Integer
iii) to insert a single row in the above created table. 1
29 Define the following :
i) Cyber Bullying 1
ii) Cyber Stalking 1
iii) Digital footprint 1
30 A relation Vehicles is given below:
V_no Type Company Price Qty
AW125 Wagon Maruti 250000 25
J0083 Jeep Mahindra 4000000 15
S9090 SUV Mitsubishi2500000 18
M0892 Mini van Datsun 1500000 26
W9760 SUV Maruti 2500000 18
R2409 Mini van Mahindra 350000 15
Write SQL commands to:
i) Display the average price of each type of vehicle having quantity more than 20. 1
ii) Count the type of vehicles manufactured by each company. 1
iii) Display the total price of all the types of vehicles. 1
31 Consider a given Series , S-amt
Table 350
Chair 200
Sofa 800
Stool 150
i) Write a program in Python Pandas to create the series. 1
ii) Write the command which will display the name of furniture having rent>250. 1
iii) Write the command to name the series as Furniture. 1
Section D
32 Consider a table Employee and answer the SQL queries as per given table.
i) To display the name of all employees who are in the area south. 1
ii) To display list of all employees whose salary>=30,000 and <=40,000. 1
iii) To list out all the employees name whose name not contains the character K any where. 1
iv) To display all the employees details whose salary is greater than 35000. 1
33 Consider the following table named PRODUCT, showing details of products being
sold in a grocery shop
.
Write the outputs(s) produced by executing the following queries on the basis given
above in the table Product:
i) SELECT PNAME,AVG(UPRICE) FROM PRODUCT GROUP BY PNAME; 1
ii) SELECT DISTINCT MANUFACTURER FROM PRODUCT; 1
iii) SELECT COUNT(DISTINCT PNAME) FROM PRODUCT; 1
iv) SELECT PNAME,MAX(UPRICE),MIN(UPRICE) FROM PRODUCT GROUP BY PNAME; 1
Section E
34 Write the SQL functions which will perform the following operations:
i) To round off the value -84.3367 to 2 decimal place. 1
ii) To display the name of the day e.g. 'Monday' or 'Tuesday' from your date of birth. 1
iii) To remove all the probable leading and trailing spaces from the column name of the table 1
named Employee.
iv) To display current date and time 1
v) To display the starting position of your first name(fname) from the whole name(name) 1
35 Guru Tegh University is setting up its academic blocks at Dehradun and is planning to
set up a network. The University has 3 academic blocks and one
Human Resource Centre as shown in the disgram below.
i) Suggest the most suitable place (i.e., block/centre) to install the server of this 1
University with a suitable reason.
ii) Suggest an ideal layout for connecting these blocks/centres for a wired connectivity. 1
iii) Which device will you suggest to be placed/installed in each of these blocks/centres 1
to efficiently connect all the computers within these blocks/centres?
iv) Suggest the placement of a Repeater in the network with justification. 1
v) The university is planning to connect its admission office in Delhi which is 1
more than 1,250 km from the university.
Which type of network out of LAN, MAN or WAN will be formed? Justify your answer.
36 Consider the following Series s3-
a 1.5
b 3.0
c 4.5
d 6.0
e 7.5
Now create the above series and find the output of the following commands
i) print(s3+3) 1
ii) print(s3*2) 1
iii) print(s3*2) 1
iv) print(s3[s3>3.0]) 1
v) print(s3[-4:]) 1