XII IP QP (1)

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

KENDRIYA VIDYALAYA SANGATHAN, LUCKNOW REGION

SECOND PREBOARD EXAMINATION 2022 - 23


CLASS XII
INFORMATICS PRACTICES (065)
TIME: 3 HOURS
M.M.70

General Instructions: SECTION A


1 Given a Pandas series called p, the command which will display the last 4 rows is 1
1. __________________.
This question paper contains five sections, Section A to E.
a. printare
2. All questions (p.Tail(4))
compulsory.b. print (p.Tails(4))
3. Section A have 18 questionsd.carrying
c. print (p.tail(4)) print (p.Tails(4))
01 mark each.
2 4. In Pandas,
Section B hasthe07Dataframe
Very Short can store
Answer ____________
type type02
questions carrying of marks
valueseach. 1
a) Homogeneous
5. Section C has 05 Short Answer type questions carrying 03 marks each.
b) DHeterogeneous
6. Section has 03 Long Answer type questions carrying 05 marks each.
c) Equivalent
7. Section E has 02 questions carrying 04 marks each. One internal choice is given in
d) Incompatible
Q34 against part iii only.
3 The command used to display the title for x-axis to a graph is _________ 1
8. a.
All plt.xtitle()
programmingb.questions
plt.xaxis()are to
c. be answered using
plt.xlabel() Python Language only.
d. plt.xaxistitle()
4 Write the output of the following SQL command. 1
select substr(“COMPUTER”,4,2);
a. MPUT b. PUTE c. PU d. MP
5 __________________ refers to the proper manner and behaviour we need to exhibit 1
while being online.
a.Copyright
b.Netiquettes
c.Data protection
d.IPR
6 The ______is the Digital trail of your activity on the internet. 1
a) Copyright
b) Digital footprint
c) Digital data
d) Internet Property
7 Select CHAR(65, 65.1); will display the output: 1
(a) AB (b) AA (c) Error (d)None of These
8 What is the correct syntax to return both the first row and the second row in a Pandas 1
DataFrame df?
a. df.loc[[0,1]]
b. df.[[0,1]]
c. df.loc[[0-1]]
d. df.[[0-1]]

9 Which amongst these is not an example of web server? 1


a. Apache
b. JWS
c. IIS
d. Chrome
10 A computer network created by connecting the computers of your school’s computer lab is 1
an example of
a. LAN b. MAN
c. WAN d. PAN
11 OSS stands for 1
a) Open system security
b) Open system source
c) Open software and security
d) Open source software
12 Legal term to describe the right of creator of original creative or artistic work is called____. 1
a) Copyright b) Copyleft
c) GPL d) Trademark

13 Stealing someone else’s intellectual work and representing it as own is called 1


____________
a. Intellectual steal b. Phishing c. Plagiarism
d. Intellectual property rights
14 Pramit wants to display the month from the given date and time. Which function 1
should he use?
a) Date() b)Day() c) now() d)month()
15 Which function will be used to read data from a CSV file into pandas data frame? 1
a. readcsv()
b. to_csv()
c. read_csv()
d. csv_read()
16 ___________ is a network device which segments networks into different sub 1
networks called subnets or LAN segments.

a. Hub
b. Switch
c. Bridge
d. Gateway

Q17 and 18 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

17 Assertion (A):- While creating a dataframe with a nested or 2D dictionary, Python interprets 1
the outer dictionary keys as the columns and the inner keys as the row indices.
Reasoning (R):- A column can be deleted using remove command.
18 Assertion (A): - Internet cookies are text files that contain small pieces of data, like a 1
username, password and user’s preferences while surfing the internet.
Reasoning (R):- To make browsing the Internet faster & easier, its required to store certain
information on the server’s computer.

SECTION B
19 List any four advantages of computer networks. 2
20 What is the purpose of IS NULL and IS NOT NULL operators? Give examples 2
21 What is the use of LIKE operator in SQL? Give example 2
22 Write a program to create the following series named M1 and index as following 2

23 List any four benefits of e-waste management. 2


OR
What is IPR? Why should it be protected?
24 Write the output of the following code: 2
import pandas as pd
s3=pd.Series(50,index=['r1','r2','r3','r4','r5'])
print(s3)
25 Write the output of the following : 2
import pandas as pd
d1={"one":33, "two":44}
d2={"one":55, "two":66}
d3={"one":77, "two":88}
list_of_d =[d1,d2,d3]
df3=pd.DataFrame(list_of_d, index=["r1","r2","r3"])
print(df3)
SECTION C
26 Consider the following table Club : 3

Give the answer of the following questions on the basis of the above table.
(i) Write a query to display the substring of 3 characters of the name of each coach,
starting from second character, with their age.
(ii) Write a query to display coach name and year of joining
(iii) Write a query to display 3 characters from left of coach name.
27 Consider the Dataframe Humanoid 3

i. Write a command to display the records of the dataframe which have amount
greater than equal to 5000.
ii. How will you change the index from H_1,H_2,H_3 to 101,102,103
iii. Add a column called Sale_Price with the following data:
[6000,3700,2800]
28 Write the output of the queries (a) to (c) based on the table, Staff 3
given below:
Table: Staff
Id Name DOJ Dept Gender Exp
1 Aman 12-01-2006 Finance M 15
2 Dima 03-05-2016 Personnel F 5
3 Christin 15-11-2009 Sales F 12
a
4 Shem 20-12-2006 Sales M 15
5 Roshan 13-10-2013 Finance M 8
6 Danish 11-09-2013 Personnel M 8
7 Habeen 16-08-2011 Sales F 10
a
(a) Select avg(exp) from staff where gender = ‘F’;
(b) Select * from staff where gender =’M’ and dept like ‘P%’;
(c )Select upper(Name) from Staff where year(DOJ) < 2010 ;
29 Indu received an email from her bank stating that there is a problem with her account. 3
The mail provides instructions and a link, by clicking on that link she can login to her
account and fix the problems.
i) Which cybercrime happened with her?
ii) What immediate action should she take to handle it?
iii) Is there any law in India to handle such issues. Discuss briefly
OR
What do you understand by plagiarism? Why is it a punishable offence? Mention any
two ways to avoid plagiarism.
30 What is the purpose of GROUP BY clause in MySQL? How is it different from ORDER 3
BY clause?

OR

Consider a MySQL table ‘product’. Write the command for the following:
P_I
PROD_NAME PROD_PRICE PROD_QTY
D
P01 Notebook 85 500
P02 Pencil Box 76 200
P03 Water Bottle 129 50
P04 School Bag 739 70
(i) Display minimum PROD_QTY.
(ii) Display the value of each product where the value of each product is calculated
as PROD_PRICE * PROD_QTY
(iii) Display average PROD_PRICE.
SECTION D
31 Consider a table “Salesman” with the following data: 5

Write SQL queries using SQL functions to perform the following operations.
(i) Display salesman name and bonus after rounding off to zero decimal places.
(ii) Display the position of occurrence of the string “ta” in 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 the SQL functions which will perform the following operations:
i) To display the day of month of current date.
ii) To remove spaces from the beginning and end of a string, “ Informatics Practices “
iii) To display the name of the day eg. Friday or Sunday from your date of birth, dob.
iv) To convert your name into Upper case.
v) To compute the mode of two numbers num1 and num2.
32 University of India is starting its first campus in a small town Parampur of central India 5
with its centre admission office in Delhi. The university has three major buildings
comprising of Admin Building, Academic Building and Research Building in the 5 km
area campus. As a network expert, you need to suggest the network plan as per (i) to
(v) to the authorities keeping in mind the distances and other given parameters.
(i) Suggest the authorities, the cable layout amongst various buildings inside the
university campus for connecting the building.
(ii) Suggest the most suitable place (i.e. building) to house the server of this
organisation, with a suitable reason.
(iii) Suggest an efficient device from the following to be installed in each of the buildings
to connect all computers. (a) Gateway (b) Modem (c) Switch
(iv) Write the name of protocol for establishing an online face to face communication
between the people in the ADMIN office of Parampur campus and Delhi Admission
Office?
(v)Which device can be installed for network security

33 Sharma is working in a game development industry and he wants to compare the given 5
chart on the basis of the rating of the various games available on the play store. Write a
Python code to get the following bar chart. Save the chart in png format.

OR
Write a Python code to get the following Line chart. Save the chart in png format.
SECTION E
34 Shreya, a database administrator has designed a database for a clothing shop. Help her by 1+1+2
writing answers of the following questions based on the given table:
Table: Cloth

i. Write a query to display total number of cloths of Green color.


ii. Write a query to display the cloth name along with Day of purchase i.e. Monday,
Tuesday
iii. Write a query to display size-wise total price of cloths.
OR (for option iii only)
Write a query to display name of cloths which are purchased in month of
November and whose price is less than 1200.

35
1+1+2

A. Predict the output of the following python statement:


i. df.shape
ii. df.size
B. Write Python statement to print the Target of zoneA and zone B
OR (Option for part B only)
Write Python statement to compute and display the difference of data of Target column
and Sales column of the above given DataFrame.

You might also like