0% found this document useful (0 votes)
64 views13 pages

QP PB1 Ip 0

Uploaded by

drphysics256
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views13 pages

QP PB1 Ip 0

Uploaded by

drphysics256
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

KENDRIYA VIDYALAYA SANGATHAN, RAIPUR REGION

1st PRE-BOARD EXAMINATION 2020-21


CLASS: XII SUB: INFORMATICS PRACTICES NEW (Python) (065)
Max Marks: 70 TIME: 03 hrs.
General Instructions:
1. This question paper contains two parts A and B. Each part is compulsory.
2. Both Part A and Part B have choices.
3. Part-A has 2 sections:
a. Section – I is short answer questions, to be answered in one word or one line.
b.Section – II has two case studies questions. Each case study has 4 case-based
sub- parts. An examinee is to attempt any 4 out of the 5 subparts.
4. Part - B is Descriptive Paper.
5. Part- B has three sections
a. Section-I is short answer questions of 2 marks each in which two questions have
internal options.
b. Section-II is long answer questions of 3 marks each in which two questions have
internal options.
c. Section-III is very long answer questions of 5 marks each in which one question has
question has internal option.

Part - A
Section - I
Attempt any 15 questions from questions 1 to 21
1. Find the output of following program. 1

import numpy as np
x= [1, 2, 3, 99, 99, 3, 2, 1]
x1, x2, x3 = np.split(x, [3,5])
print(x1, x2, x3)
2. Consider the matrix of 5 observations each of 3 variables X0,X1,X2 whose observed 1
values are held in the three rows of the array X:

X = np.array([ [0.1, 0.3, 0.4, 0.8, 0.9], [3.2, 2.4, 2.4, 0.1, 5.5], [10., 8.2, 4.3, 2.6, 0.9] ])

Write the python statement to print the covariance of X and state that what does
the diagonal element of the resultant matrix depicts.
3. The statement in SQL which allows to change the definition of a table is 1

(A) Alter (B) Update


Page 1 of 13
(C) Create (D) select

4. Fill in the blank with appropriate numpy method to calculate and print the variance 1
of an array.

import numpy as np
data=np.array([1,2,3,4,5,6])
print(np.___(data,ddof=0)

5. How would you create the identity matrix in python? 1


(a) np.eye(3) (b) identity(3,2)
(c) np.array([1, 0, 0], [0, 1, 0], [0, 0, 1]) (d) All of these

6. Using Python Matplotlib can be used to count how many values fall into each 1
interval.
a) line plot
b) bar graph
c) histogram

7. Bluetooth is an example of _____. 1

a. Local Area Network b. Virtual and private Network


c. Personal Area Network d. Wide Area Network

8. A dataframe fdf stores data about passengers, flights and years. First few rows of 1
dataframe are shown below.
Year Month Passenger
0 2009 January 112
1 2009 February 118
2 2009 March 132
3 2009 April 129
4 2009 May 121
Using above dataframe, write command for compute total Passenger per year.

9. Which network topology is requires a central controller or hub : 1

a. Bus b. Star c. Ring d. Mesh

10. Rajani has stolen a credit card. She used that credit card to purchase a laptop. What 1
type of offence has she committed?

11. What will be the order of sorting in the given query? 1

SELECT emp_id, emp_name


Page 2 of 13
FROM person
ORDER BY emp_id, emp_name

(a) Firstly on emp_id and then on emp_name


(b) Firstly on emp_name and then on emp_id
(c) Firstly on emp_id but not on emp_name
(d) None of the mentioned

12. The practice of taking someone else's work or ideas and passing them off as 1

one's own is known as

13. Write a small python code to del a column from dataframe labeled as “xyz”. 1

14. Name the primary law in India dealing with cybercrime and electronic 1
commerce.

15. Which of the following is not an intellectual property? 1

a. A poem written by a poet


b. An original painting made by a painter
c. Trademark of a Company
d. A remixed song

16. VIRUS stands for ______________ 1

A. Very Intelligent Result Until Source


B. Very Interchanged Resource Under Search
C. Vital Information Resource Under Sledge
D. Viral Important Record User Searched

17. What do you understand by ‘Intellectual Property Rights’? 1

18. The____ command can be used to makes changes in the columns of a table in SQL. 1

19. NULL value means : 1

(i) 0 value
(ii) 1 value
(iii) None value
(iv) None of the above

20. Firewalls are used to protect against _________. 1

A. data driven attacks


Page 3 of 13
B. fire attacks
C. virus attacks
D. unauthorized access
21. ____ are group of people habitually looking to steal identifies or information, such as 1
social security information, credit card numbers, all for monetary objectives.

A. Spammers
B. Phishers
C. Spyware
D. Spam ware

Section -II
Both the case study based questions (22 & 23) are compulsory. Attempt any four sub parts
from each question. Each sub question carries 1 mark.
22. Given the two DataFrames df1 and df2 as given below and answer any four questions
from (i)- (v):
df1 df2

First Second Third First Secon Thir


d d
0 10 4 30 0 17 14 13
1 20 5 40 1 18 15 14
2 30 7 50 2 19 17 15
3 20 19 17
3 40 9 70

Write the commands to do the following on the dataframe:

(i) To add dataframes df1 and df2.

(ii) To sort df1 by Second column in descending order.

(iii) To change the index of df2 from 0,1,2,3 to a,b,c,d

(iv) To display those rows in df1 where value of third column is more than 45.

(v) Which of the following command will display the column labels of the DataFrame?

a. print(df.columns())
b. print(df.column())
c. print(df.column)
d. print(df.columns)

Page 4 of 13
23. Consider the table STUDENT given below:

(i) Which SQL statement allows you to find the highest price from the table 1
BOOK_INFORMATION?
(a) SELECT BOOK_ID, BOOK_TITLE, MAX(PRICE) FROM BOOK_INFORMATION;
(b) SELECT MAX(PRICE) FROM BOOK_INFORMATION;
(c) SELECT MAXIMUM(PRICE) FROM BOOK_INFORMATION;
(d) SELECT PRICE FROM BOOK_INFORMATION ORDER BY PRICE DESC;

(ii) Which SQL statement lets you find the sales amount for each store? 1

(a) SELECT STORE_ID, SUM(SALES_AMOUNT) FROM SALES;


(b) SELECT STORE_ID, SUM(SALES_AMOUNT) FROM SALES ORDER BY STORE_ID;
(C) SELECT STORE_ID, SUM(SALES_AMOUNT) FROM SALES GROUP BY STORE_ID;
(D) SELECT STORE_ID, SUM(SALES_AMOUNT) FROM SALES HAVING UNIQUE
STORE_ID;

(iii) Which statement lets you find the total number of stores in the SALES table? 1

(a) SELECT COUNT(STORE_ID) FROM SALES;


(b) SELECT COUNT(DISTINCT STORE_ID) FROM SALES;
(c) SELECT DISTINCT STORE_ID FROM SALES;
(d) SELECT COUNT(STORE_ID) FROM SALES GROUP BY STORE_ID;

(iv) What SQL statement do we use to print out the record of all students whose last 1
name starts with ’L’?
(a) SELECT * FROM EXAM_RESULTS WHERE LNAME LIKE ‘L%’;
(b) SELECT * FROM EXAM_RESULTS WHERE LNAME LIKE ‘L’;
(c) SELECT * FROM EXAM_RESULTS WHERE LNAME = ‘L’;
(d) SELECT * FROM EXAM_RESULTS WHERE LNAME <> ‘L’;

(v) What SQL statement do we use to find the average exam score for EXAM_ID = 1? 1

(a) SELECT AVG(EXAM_SCORE) FROM EXAM_RESULTS;


(b) SELECT AVG(EXAM_SCORE) FROM EXAM_RESULTS GROUP BY EXAM_ID WHERE
EXAM_ID = 1;
(c) SELECT AVG(EXAM_SCORE) FROM EXAM_RESULTS GROUP BY EXAM_ID HAVING
EXAM_ID = 1;
(d) SELECT COUNT(EXAM_SCORE) FROM EXAM_RESULTS WHERE EXAM_ID = 1
Part - B
Page 5 of 13
Section – I
24. Write a Pandas program to convert a NumPy array to a Pandas series. 2

25. Tony has recently started working in MySQL. Help him in understanding the 2
difference between the following :
(i) Where and having clause
(ii) Count(column_name) and count(*)
OR
What is the difference between the order by and group by clause when used along
with the select statement? Explain with an example.
26. Write the output of following MYSQL queries: 2

(i) SELECT ROUND(6.5675,2);


(ii) SELECT TRUNCATE(5.3456,2);
(iii) SELECT DAYOFMONTH(curdate());
(iv) SELECT MID(‘PRE_BOARD CLASSS 12’,4,6);
27. Write a Pandas program to rename columns of a given Data Frame. 2

Sample data:
Original DataFrame
col1 col2 col3
0 1 4 7
1 2 5 8
2 3 6 9
New DataFrame after renaming columns:
Column1 Column2 Column3
0 1 4 7
1 2 5 8
2 3 6 9
28. (i) There is column salary in table employee. The following two statements are giving 2
different outputs. What may be the possible reasons?
Select count(*) from employee; select count(salary) from employee;

(ii) Mr. Sanghi created two tables with City as Primary Key in Table1 and Foreign key
in Table2 while inserting row in Table2 Mr. Sanghi is not able to enter value in the
column City. What is the possible reason for it?

29. In a database there are two tables ‘LOAN’ and ‘BORROWER’ as shown below: 2

LOAN

Loan_Number Branch_name Amount


L-170 Downtown 3000
Page 6 of 13
L-230 RedWood 4000

BORROWER

Customer_Name Loan_number
Jones L-170
Smith L-230
Hayes L-155

(i) Write Degree and Cardinality of LOAN table.


(ii) Identify the Primary Key column in the LOAN table.

OR
Consider the following hospital table

No Name Age Departmen Dateofadmi Charge Sex


t n
1 Arpit 62 Surgery 21/01/06 300 M
2 Zayana 18 ENT 12/12/05 250 F
3 Kareem 68 Orthopedic 19/02/06 450 M
4 Abhilash 26 Surgery 24/11/06 300 M
5 Dhanya 24 ENT 20/10/06 350 F
6 Siju 23 Cardiology 10/10/06 800 M
7 Ankita 16 ENT 13/04/06 100 F
8 Divya 20 Cardiology 10/11/06 500 F
9 Nidhin 25 Orthopedic 12/05/06 700 M
10 Hari 28 Surgery 19/03/06 450 M

Write the sql query for


(i)To reduce Rs. 200/- from the charge of female patients who are in Cardiology
department.

(ii) To insert a new row in the above table with the following data :
11, ‘Rakesh’, 45, ‘ENT’, {08/08/08}, 1200, ‘M’

30. Consider the following DataFrame of automobile 2

inde compan body- wheel- num-of-


x y style base cylinders price
0 bmw sedan 101.2 four 16925
1 bmw sedan 101.2 six 20970
2 honda sedan 96.5 four 12945
3 honda sedan 96.5 four 10345
Page 7 of 13
4 toyota hatchback 95.7 four 5348
5 toyota hatchback 95.7 four 6338

(i) From the given data set print first and last five rows
(ii) Find the most expensive car company name

31. Expand the following terms related to Computer Networks: 2

a. Wi-Fi
b. IDLE
c. TCP/IP
d. VoIP

32. “Privacy is the protection of personal information given online. In e-commerce 2


especially, it is related to a company’s policies on the use of user data.”
(a) Why is the above given statement important?
(b) What is the need to safeguard user privacy?

33. Neelam has recently shifted to new city and new College. She does not many people 2
in her new city and school. But all of a sudden, someone is posting negative,
demeaning comments on her social networking profile, college site’s forum etc.
She is also getting repeated mails from unknown people. Every time she goes online,
she finds someone chasing her online.

a) What is this happening to Neelam?


b) What action should she taken to stop them?

Section -II
34. Write a NumPy program to compute sum of all elements, sum of each column and 3
sum of each row of a given row.

Input:

[ [ 0 1]
[ 2 3]]

Sum of all elements:


6
Sum of each column :
[2 4]
Sum of each row :
[1 5]

35. Explain the role of online social media campaigns, crowdsourcing and smart mobs in 3
Page 8 of 13
society.
OR
What is net Neutrality? Do India Net Neutrality by law?
36. Write the code to plot the following figure in python 3

OR
Write a code to plot the bar chart as shown in the figure given below:

37. TABLE: GRADUATE 3

S.NO NAME STIPEND SUBJECT AVERAGE DIV.


1 KARAN 400 PHYSICS 68 I
2 DIWAKAR 450 COMP. Sc. 68 I
3 DIVYA 300 CHEMISTRY 62 I
4 REKHA 350 PHYSICS 63 I
5 ARJUN 500 MATHS 70 I
6 SABINA 400 CEHMISTRY 55 II
7 JOHN 250 PHYSICS 64 I
8 ROBERT 450 MATHS 68 I

Page 9 of 13
9 RUBINA 500 COMP. Sc. 62 I
10 VIKAS 400 MATHS 57 II
(a) List the names of those students who have obtained DIV I sorted by NAME.
(b) Display a report, listing NAME, STIPEND, SUBJECT and amount of stipend
received in a year assuming that the STIPEND is paid every month.
(c.) To count the number of students who are either PHYSICS or COMPUTER SC
graduates.
Section -III
38. Assume following data is stored in data frame named as df1. Write following 5
commands:
Name of
Employee Sales Quarter State
12560
RSahay 0 1 Delhi
23560
George 0 1 Tamil Naidu
21340
JayaPriya 0 1 Kerala
18900
ManilaSahai 0 1 Haryana
45600
RymaSen 0 1 West Bengal
17200
ManilaSahai 0 2 Haryana
20140
JayaPriya 0 2 Kerala

Perform the following operations on the DataFrame :

(i)Find total sales per state


(ii) find total sales per employee
(iii)find total sales both employee wise and state wise
(iv)find mean, median and min sale state wise
(v)find maximum sale by individual

39. Write the SQL functions which will perform the following operations: 5

i) To display the name of the month of the current date.


ii) To remove spaces from the beginning and end of a string, “ Panorama “.
iii) To display the name of the day e.g., Friday or Sunday from your date of birth,

Page 10 of 13
dob.
iv) To display the starting position of your first name (fname) from your whole
name (name).
v) To compute the remainder of division between two numbers, n1 and n2

OR

Consider the following tables Consignor and Consignee. Write SQL commands for the
statements (i) to (iv) and give outputs for SQL queries (v) to (vi).

(i) To display the names of all Consignors fromMumbai.


(ii) To display the CneeID, CnorName, Cnoraddress, CneeName, CneeAddress for
every Consignee.
(iii) To display Consignee details in ascending order of CneeName.
(iv) To display numbers of Consignors from each city.
(v) SELECT DISTINCT City FROM Consignee;
(vi) SELECT A.CnorName, B.CneeName
FROM Consignor A, Consignee B
WHERE A.CnorID=B.CnorID AND B.CneeCity= ‘Mumbai’;

40. Uplifting Skills Hub India is a knowledge and skill community which has an aim to 5
uplift the standard of knowledge and skills in the society. It is planning to setup its
training centers in multiple towns and villages pan India with its head offices in the
nearest cities. They have created a model of their network with a city, a town and 3
villages as follows.

As a network consultant, you have to suggest the best network related solutions for
their issues/problems raised in (i) to (iv) keeping in mind the distances between
various locations and other given parameters.

Page 11 of 13
Shortest distances between various locations :
VILLAGE 1 to B_TOWN 2 KM
VILLAGE 2 to B_TOWN 1.0 KM
VILLAGE 3 to B_TOWN 1.5 KM
VILLAGE 1 to VILLAGE 2 3.5 KM
VILLAGE 1 to VILLAGE 3 4.5 KM
VILLAGE 2 to VILLAGE 3 2.5 KM
A_CITY Head Office to B_HUB 25 KM

Number of Computers installed at various locations are as follows :


B_TOWN 120
VILLAGE 1 15
VILLAGE 2 10
VLLAGE 3 15
A_CITY OFFICE 6

Note :
In Villages, there are community centers, in which one room has been given as
training center to this organization to install computers.
The organization has got financial support from the government and top IT
companies.

(i) Suggest the most appropriate location of the SERVER in the B_HUB (out of the 4
locations), to get the best and effective connectivity. Justify your answer.

(ii) Suggest the best wired medium and draw the cable layout (location to location) to
efficiently connect various locations within the B_HUB.

(iii) Which hardware device will you suggest to connect all the computers within each
location of B_HUB?

(iv) Which service/protocol will be most helpful to conduct live interactions of


Experts from Head Office and people at all locations of B_HUB?
Page 12 of 13
(v) Which topology is best suitable for the network?

----------------------Best of Luck----------------------

Page 13 of 13

You might also like