QP Ip Sample Papers

Download as pdf or txt
Download as pdf or txt
You are on page 1of 141

कें द्रीय विद्यालय संगठन

(जम्मू संभाग )

KENDRIYA VIDYALAYA SANGATHAN


(JAMMU REGION)

SAMPLE PAPER
FOR CLASS XII
INFORMATICS PRACTICES (065)

क्षेत्रीय कायाालय, जम्मू, नज़दीक राजकीय विककत्सालय, गााँधी नगर


जम्मू-180004
Regional Office, Jammu, Near Govt. Hospital,
Gandhi Nagar, Jammu-180004
KENDRIYA VIDYALAYA SANGATHAN JAMMU REGION
SAMPLE PAPER SET-1
CLASS XII SUB:-INFORMATICS PRACTICES(065)
Time: 3 Hours M.M: 70

General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 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 03 Long Answer type questions carrying 05 marks each.
7. Section E has 02 questions carrying 04 marks each. One internal choice is given in Q35
against part c only.
8. All programming questions are to be answered using Python Language only.

SECTION A
1 Internet is an example of: 1
(a) LAN
(b) MAN
(c) WAN
(d) PAN
2 Which of the following is violation of IPR? 1
(a) Licensing
(b) Digital footprint
(c) Phishing
(d) Plagiarism
3 E-waste management in India is done as per guidelines of 1
(a) NITI Aayog
(b) Ministry of Commerce
(c) Central Pollution Control Board(CPCB)
(d) National Green Tribunal(NGT)
4 Which aggregation function does not give useful information when applied on non 1
numeric attribute?
(a) Count
(b) Min
(c) Avg
(d) Max
5 If column “Name ” contains data set(“arun”,”varun”,”tarun”). What will be output 1
after execution of given query. Select sum(name) from students;
(a) 0
(b) Error
(c) arun varun tarun
(d) None of above.
6 “P” in GPL stands for:- 1
(a) Product
(b) Public
(c) Private
(d) Proprietry.
7 Which SQL statement count the unique cities from ‘city’ attribute of table ‘bank’. 1
(a) SELECT DISTINCT COUNT(CITY) FROM BANK;
(b) SELECT COUNT(DISTINCT CITY) FROM BANK;
(c) SELECT DISTINCT COUNT(*) FROM BANK;
(d) SELECT COUNT(CITY) FROM BANK;

1
8 Which one of the following functions is used to find sum of numeric values of 1
attributes?
(a) Sum()
(b) Total()
(c) Count()
(d) Avg()
9 To display the first 10 rows of series ‘S’ we may write : 1
(a) S.Head()
(b) S.head(10)
(c) S.Head(10)
(d) S.tail()
10 Which of the following statement will import dataframe from pandas library? 1
(a) import DataFrame from pandas
(b) from pandas import DataFrame
(c) import DataFrame from Pandas
(d) from Pandas import DataFrame
11 Which of the following is an aggregation function? 1
(a) ROUND()
(b) UCASE()
(c) NOW()
(d) SUM()
12 Which of the following functions is used to import a dataframe from csv file ? 1
(a) read_csv()
(b) import_csv()
(c) to_csv()
(d) export_csv()
13 What can be done from browser settings? 1
(a) Change home page
(b) Set default browser.
(c) Clear cookies
(d) All of the above
14 Which SQL function is used to display length of string values from attributes? 1
(a) Len()
(b) Length()
(c) Sum()
(d) None of the above
15 What will be considered as violation of IPR? 1
(a) Plagiarism
(b) Copyright Infringement
(c) Trademark Infringement
(d) All of the above
16 __________ is the legal term to describe terms under which people are allowed to 1
use the copyrighted material.
(a) Licensing
(b) Copyright
(c) Patent
(d) Trademark
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct choice as
i. Both A and R are true and R is the correct explanation for A
ii. Both A and R are true and R is not the correct explanation for A
iii. A is True but R is False
iv. A is false but R is True
17 ASSERTION: Websites keep track of users with the help of cookies. 1

2
REASON: Cookies are small text files that stores user information and send it to
server when browser makes request again.
18 ASSERTION: Data can easily be interpreted/visualised in python in form of line 1
graph, bar graph and histograms.
REASON: To visualise data matlotlib.pyplot needs to be imported in python
program
SECTION B
19 Write steps for hosting a website. 2
OR
Explain the types of network.
20 Madhu, a database administrator needs to display class wise maximum marks of all 2
classes above 8th class. She is encountering an error in following query.
SELECT CLASS,MAX(MARKS) FROM STUDENT GROUP BY CLASS
WHERE CLASS>8;
Help her in identifying error and write correct query by suggesting possible
corrections.
21 What is purpose of GROUP BY clause in SQL. Explain with suitable example. 2
22 Write a program to create a series using numpy array that stores capitals of some 2
countries. Give appropriate index while creating series.
23 Discuss e-waste management strategies. 2
OR
What is an IPR? Give examples of IPR.
24 What will be the output of following code: 2
import pandas as pd
s=pd.Series({1:1,2:4,3:9,4:16})
print(s[s%2==0])
25 Carefully observe the following code: 2
import pandas as pd
Eng Math Hindi
Ayush 92 88 93
Piyush 86 89 98
Nitin 73 81 92
d1={‘Eng’:92,”Math”:88,’Hindi’:93}
d2={‘Eng’:86,”Math”:89,’Hindi’:98}
d3={‘Eng’:73,”Math”:81,’Hindi’:92}
df = pd.DataFrame([d1,d2,d3],index=[‘Ayush’,’Piyush’,’Nitin’])
print(df)
(i) List the column names of dataframe df.
(ii) List the index name of dataframe df.
SECTION C
26 Write outputs for SQL queries (i) to (iii) which are based on the given table BANK: 3
ACCNO ANAME CITY BALANCE LASTUPDATEDON
101011 Ramesh Jammu 1000.67 2022-11-06
101316 Suresh Srinagar 9025.76 2022-11-01
101512 Mehak Delhi 8053.43 2022-11-06
101011 Kashish Jammu 7061.55 2022-10-10
(i) SELECT SUBSTR(ACCNO,3,2), CITY FROM BANK WHERE
BALANCE>5000;
(ii) SELECT ROUND(BALANCE,1),ANAME FROM BANK WHERE
LENGTH(ANAME)>5;
(iii) SELECT YEAR(LASTUPDATEDON), ACCNO FROM BANK
WHERE BALANCE>1000;
27 Write python code to create a dataframe df (runs scored by batsman in last three 3
years) with appropriate row labels from the dictionary given below:

3
{‘Virat’:[1000,962,1035],’Rohit’:[635,580,602],’Surya’:[1200,1008,1258]}
28 Consider the given dataframe df: 3
Year State Population
0 2017 Punjab 10.5
1 2018 HP 10.3
2 2019 Rajasthan 11.5
3 2020 Gujrat 10.8
4 2021 Haryana 10.9
(i) Add a column ‘debt’ with value 10 for each state(row).
(ii) Add new state MP with population 10.5
(iii) Remove the column debt.
29 Priya has received an SMS on mobile, asking her to provide the details of her old 3
debit card in order to get new one. She clicked on the link in the message and entered
the details of her debit card assuming that this message was from her bank.
(i) Which cyber crime 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 are cyber crimes? Name a few cyber crimes and is there any law in India which
guards its citizens against cyber crimes?
30 Based on the table STUDENT given here, write suitable SQL queries for the 3
following:
RollNo Name Class Gender Height Weight
1 Amit XI M 168 72
2 Ashok XII M 169 71
3 Arun X M 163 70
4 Diksha XII F 159 61
5 Akanksha XI F 156 60
6 Sita XI F 162 63
7 Gita XI F 157 58
8 Ram X M 159 59
(i) Display total number of male and female students.
(ii) Display gender wise minimum weight.
(iii) Display class wise tallest student
OR
What are aggregation functions? Name all the aggregation functions. Write
examples for all the aggregation functions.
SECTION D
31 Write suitable SQL query for the following: 5
(i) Display 3 characters extracted from the 5th left character from string
“INFORMATICS”.
(ii) Display the position of occurrence of string ‘WORLD’ in string “HELLO
WORLD”.
(iii) Round off the value 23.52 to zero decimal place.
(iv) Display the remainder of 50 divided by 3.
(v) Remove all the expected leading spaces from the column ‘NAME’ of
table ‘STUDENT’.
OR
Explain the following SQL functions using suitable examples:
(i) LCASE()
(ii) TRIM()
(iii) INSTR()
(iv) MONTHNAME()
(v) MOD()

4
32 Hi Speed Technologies Ltd. is a Delhi based organisation which is expanding its 5
office setup to Chandigarh. At Chandigarh office they are planning to have 3
different blocks for HR, Accounts and Logistics related work. Each block has
number of computers which are required to be connected in a network for
communication, data and resource sharing.
Delhi Chandigarh Office
Head Office HR Block Accounts Block

Logistics Block

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

Shortest distances between various blocks/locations:


HR Block to Accounts Block 400m
Accounts Block to Logistics Block 200m
Logistics Block to HR Block 150m
Delhi Head Office to Chandigarh Office 270 km

Number of computers installed at various blocks are as follows:


HR Block 70
Accounts Block 50
Logistics Block 40

(i) Suggest the most appropriate block/location to house the server in the
Chandigarh office(out of the three blocks) to get the best and effective
connectivity. Justify your answer.
(ii) Suggest the cable layout to efficiently connect various blocks with in
Chandigarh office.
(iii) Suggest the network device to use within various blocks to connect
computers.
(iv) Suggest a device/software and its placement that would provide data
security for the entire network of Chandigarh office.
(v) Which of the network type, would it be?
33 Write python code to plot a bar chart for Library Books as shown below: 5

Also give suitable python statement to save this chart.


OR

5
Write a program to plot a line chart based on the given data to depict the runs scored
by a batsman in 5 innings.
Innings = [1,2,3,4,5]
Runs = [102,88,98,146,52]
SECTION E
34 Pallavi, a database administrator has designed a database for cars showroom. Help 1+1+2
her by writing answers to the following questions based on the given table:
SALE
InvoiceNo CarId CustId SaleDate PaymentMode EmpId SalePrice
101 D01 C01 2019-01- Credit Card E04 613247.00
24
102 S01 C02 2018-12- Online E01 590321.00
12
103 S02 C04 2019-01- Cheque E10 604000.00
25
104 D01 C01 2018-10- Bank Finance E07 659982.00
15
105 E01 C03 2018-12- Credit Card E02 369310.00
20
(i) Write a query to display invoice number and name of month in which car is
purchased.
(ii) Write a query to display highest price .
(iii) Write query to display all the information in descending order of sale price.
OR(for part iii only)
Write query to display the number of cars purchased through each payment
method.
35 Mr. Ajay, a data analyst has designed a dataframe df that contain data about marks 1+1+2
obtained by students in different subjects. Answer the following questions:
Accountancy Economics IP
Ayush 92 82 72
Karan 87 89 87
Tarun 95 88 97
(a) Predict output of following python statement:
(i) df.shape
(ii) df[1:]
(b) Write python statement to display the marks of ayush and tarun.
OR(for part (b) only)
Write python statement to compute the sum of marks of all the subjects of
given dataframe and add it as another column.

6
KENDRIYA VIDYALAYA SANGATHAN JAMMU REGION
SAMPLE PAPER SET-2
CLASS XII SUB:-INFORMATICS PRACTICES(065)
Time: 3 Hours M.M: 70

General Instructions:

1. This question paper contains five sections, Section A to E.


2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 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 03 Long Answer type questions carrying 05 marks each.
7. Section E has 02 questions carrying 04 marks each. One internal choice is given in Q35
against part c only.
8. All programming questions are to be answered using Python Language only.

SECTION A

1 ________is a set of rules which is used to retrieve linked web pages across the web. 1

(A) FTP

(B) HTTP

(C) SMTP

(D) None of the above

2 Which of the following is a type of cyber crime? 1


i. Stealing a computer from a room
ii. Installing antivirus for protection
iii. Giving someone a false statement about something
iv. Cyber bullying

3 Which of the following is an example of e-waste? 1


i. A broken glass
ii. Rapped jeans
iii. Unused old computers
iv. Empty cartons

4 Which of the following is not an example of DDL command ? 1

i. CREATE TABLE
ii. DROP TABLE
iii. DELETE
iv. ALTER TABLE

5 If column “Price” contains the data set (500,800,750,500,800), what will be the 1
output after the execution of the given query?

SELECT min(Price) FROM Inventory;


i) 500
ii) 1000
iii) 750
iv) 800

6 Cookies are used to do which of the following? 1


(A) Store your id and password for subsequent logins to the site
(B) Store contents of electronic shopping cart
(C) Track web activity
(D) All of the above

7 Which SQL statement do we use to find out the total of values present in price column 1
in the table ORDERS?

i. SELECT SUM(Price)FROM ORDERS;


ii. SELECT COUNT (*) FROM ORDERS;
iii. SELECT TOTAL (*) FROM ORDERS;
iv. SELECT SUM (*) FROM ORDERS;

8 Which one of the following functions will always return an integer value as output ? 1
i. LOWER()
ii. LENGTH()
iii. SUBSTR()
iv. LEFT()

9 Which one of the following functions is used to find the largest value from thegiven 1
data in MySQL?
i. MAX( )
ii. MAXIMUM( )
iii. BIG( )
iv. LARGE( )

10 To display first seven rows of a series object ‘S’, you may write: 1
i. S.head()
ii. S.tail()
iii. S.head(7)
iv. S.tail()

11 This is the type of chart for numeric data that group the data into bins. 1

i) Histogram
ii) Scatter chart
iii) Box plot
iv) Bar chart

12 Which of the following can be used to specify the data while creating a Series? 1
i. List
ii. Dictionary
iii. Ndarray
iv. All of these

13 Which amongst the following is an example of a browser? 1


i. msword
ii. openoffice
iii. Avast
iv. Edge

14 In SQL, which function is used to display the month from your date of birth? 1
i. Date ()
ii. Time ()
iii. month()
iv. Now ()

15 It refers to the proper manner and behaviour we need to exhibit while being online: 1
i. Copyright
ii. Net behaviour
iii. Nettiquettes
iv. Online etiquettes

16 the act of copying another person’s ideas, words or work and pretending 1
they are your own.
i. Online copying
ii. Plagiarism
iii. Patent
iv. Digital phishing

Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct
choice as
i. Both A and R are true and R is the correct explanation for A
ii. Both A and R are true and R is not the correct explanation for A
iii. A is True but R is False
A is false but R is True

17 Assertion (A): - Repeater is device to regenerate a digital signal. 1

Reasoning (R):- Freeware source code is usually hidden from user.

18 Assertion (A):- A DataFrame can be created by importing pandas library. 1

Reasoning (R): - A DataFrame is a two-dimensional labelled data structure.

Section B

19 Explain the terms Web server and web client. 2

OR
Write any four benefits of networking.
20 2
Sumit writes the following commands with respect to a table STUDENT having fields,
STUNO, SNAME, SCLASS, SMARKS

Command 1 : SELECT COUNT(*) from STUDENT;


Command 2 : SELECT COUNT(marks) from STUDENT ;

He gets the output as 6 and 5 respectively. Explain the output with justification.
21 2
What is the purpose of Group By clause in SQL? Explain with the help of suitable example.

22 Write a program to create a series object using a dictionary that stores the number of 2
students in each class from 9 to 12 of your school.

Note: Assume 9, 10, 11 and 12 having 45, 50, 43, 35 students respectively and pandas
library has been imported as pd.

23 Mention any 4 ways for e-waste management. 2


OR
Mention any four precautions that we should follow while we are using social media.

24 What will be the output of the following code: 2


>>>import pandas as pd
>>>Marks =pd.Series(data=[15,25,35,20])
>>>print(Marks[Marks>20])

25 Carefully observe the following code: 2

import pandas as pd
Stu1={'Eng':50,'hindi':80,'Math':60,'Sci': 80}
Stu2={'Eng':50,'hindi':80,'Math':60,'Sci': 80}
totMarks={'A':Stu1,'B':Stu2}
df=pd.DataFrame(totMarks)
print(df)
Answer the following:

i. List the shape of the DataFrame df


ii. List the column names of DataFrame df.
SECTION C

26 Write outputs for SQL queries (i) to (iii) which are based on the given table 3
STUDENT:
Student_ID Name Marks Grade Subject
102121 Manpreet 412 B Medical
102122 Saman 420 A Non Medical
102123 Sanaya 395 C Commerce
102124 Prashansa 396 C Humanities
102125 Masood 400 C Medical
102126 Ravi 412 C Non Medical
102126 Ashish 395 C Commerce

i. SELECT LENGTH(Name) FROM STUDENT WHERE MARKS >


400;
ii. SELECT NAME FROM STUDENT WHERE GRADE = ‘B’;
iii. SELECT MIN(MARKS), MAX(MARKS) FROM STUDENT
WHERE SUBJECT = ‘Medical’;
27 Write a Python code to create a DataFrame with appropriate column headingsfrom the 3
list given below:

[['Shreya',20],['Rakshit',22],['Srijan',18], [‘Rahul’, 25]]

28 Consider the given DataFrame ‘Store’: 3

Name Price

0 Mobile 150

1 Washing Machine 180

2 Air conditioner 225

3 Note books 500

Write suitable Python statements for the following:

i. Add a column called Qty with the following data:


[100,150,300,500].

ii. Add a new item namely Bat having price 550

iii. Remove the column Price

29 Nadar has recently shifted to a new city and school. She does not know many people in 3
her new city and school. But all of a sudden, someone is posting negative, demeaning
comments on her social networking profile etc.

She is also getting repeated mails from unknown people. Every time she goes online, she
finds someone chasing her online.

i.What is this happening to Nadar?


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? Mentionany two
ways to avoid plagiarism.

30 A relation STUDENT is given below: 3

Write SQL Commands to:

a. Display the total marks of students in each class.


b. Count the number of students in each class who have secured marks > 90.
c. Display the maximum and minimum marks of the students.
OR
Discuss the significance of ORDER B Y clause in detail with the help of suitable
example.

SECTION D

31 5
Write the names of SQL functions which will perform the following operations:

i) To display the current date


ii) To convert the string in capital letters ‘Kendriya’
iii) To remove spaces from the end of string “Kvs RO Jammu “
iv) To display the month from the current date
v) To compute the power of a number n1 raised to the power n2
OR
Explain the following SQL functions using suitable examples.
i. LOWER()
ii. RTRIM()
iii. SUBSTR()
iv. WEEKDAY()
POWER()
32 Tech Up Corporation is a professional consultancy company. The company is planning to 5
set up their offices in India with it’s hub at Hyderabad. As a network advisor, you have to
understand their requirement and suggest to them the best available solutions.

Conference Human
Resource Block
Block

Finance
Block

Block to Block distance (in meters):


Block (From) Block Distance (in meter)
Human Resource Conference 60
Human Resource Finance 60
Conference Finance 67
Expected number of Computers to be installed in each block:

Block Computer
Human Resource 125
Finance 25
Conference 60

(a) What will be the most appropriate block where TUC should plan to install their
server?
(b) What will be the best possible connectivity out of the following to connect its new
office in Bengaluru with its London based office?
i) Infrared
ii) Satellite Link
iii) Ethernet Cable

(c) Which of the following devices will you suggest to connect each computer in each
of the above blocks?
(i) Gateway
(ii) Switch/ Hub
(iii) Modem
(d) Suggest the placement of a Repeater in the network with justification.
(e ) Suggest an ideal layout for connecting these blocks/centers for a wired
connectivity.

33 Write Python code to plot a bar chart for Lux soap sales for three months 5
Also give suitable python statement to save this chart.

OR

Write a python program to plot a line chart based on the given data to depict the Monthly
scoring rate of a batsman for four months.

Month=[1,2,3,4]

Scoring rate=[140,132,148,164]

34 Consider a table Employee with the following data : 1+1+2

ENO ENAME SALARY BONUS DATE OF JOINING

E01 RamMehta 35000 NULL 02-11-2020

E02 ShyamSahay 55000 32.34 16-03-2008

E03 AlishaThakkar 32000 NULL 18-09-2020

E04 Neena Gupta 85000 28.54 31-11-1993

E05 GautamSingh 24000 NULL 30-09-2020

E06 Tez Singh 75000 22.47 25-07-1985

E07 ReemaSaxena 55000 NULL 30-10-2020

Write SQL queries using SQL functions to perform the following operations:

a) Display employee name and bonus after rounding off to zero decimal

places.

b) Display the position of occurrence of the string “ee” in employee names.

c) Display the four characters from employee name starting from

second character.

OR (Option for part iii only)


Write a query to count the total no of employees who are not getting any bonus.

35 Sanya is the event incharge in a school. One of her students gave her a suggestion to use 1+1+2
Python Pandas and Matplotlib for analysing and visualising the data, respectively. She has
created a Data frame “SportsDay” to keep track of the number of First, Second and Third
prizes won by different houses in various events.
Write Python commands to do the following:

I) Display the house names where the number of Second Prizes are in the range of 12 to
20.

a. df['House'][(df['Second']>=12) and (df['Second']<=20)]

b. df[House][(df['Second']>=12) & (df['Second']<=20)]

c. df[' House '][(df['Second']>=12) & (df['Second']<=20)]

d. df[(df[' House ']>=12) & (df['Second']<=20)]

II) Display all the records in the reverse order.

a. print(df[::1])

b. print(df.iloc[::-1])

c. print(df[-1:]+df[:-1])

d. print(df.reverse())

III) Which command will give the output 24:

a. print(df.size)

b. print(df.shape)

c. print(df.index)

d. print(df.axes)

OR (Option for part iii only)

III) Write Python statement to compute and display the difference of data of First column
and Second column of the above given DataFrame.
KENDRIYA VIDYALAYA SANGATHAN JAMMU REGION
SAMPLE PAPER SET-3

CLASS XII SUB:-INFORMATICS PRACTICES(065)


Time: 3 Hours MM:70

General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 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 03 Long Answer type questions carrying 05 marks each.
7. Section E has 02 questions carrying 04 marks each. One internal choice is given in Q35
against part c only.
8. All programming questions are to be answered using Python Language only.

1. Mr. Chandervardhanis not able to identify the Domain Name in the given URL. 1
Which
Identify and write it for him http://www.cbse.nic.in/aboutus.html

i. cbse.nic.in/aboutus
ii. cbse.nic.in
iii. http://www.cbse.nic.in/aboutus
iv. None of above
2. Exploring appropriate and ethical behaviors related to online environments and 1
digital media following is not a type of cyber crime?
i. Cyber law
ii. Cyber ethics
iii. Cyber bullying
iv. Cyber safety
3. The garbage of electronic gadgets such as computers, peripherals ,laptop 1
accessories ,mobile is known as ______________
i. Electonics waste item
ii. E-waste
iii. Waste Electronics
iv. Unused old computers
4. Which type of values will not be considered by SQL while executing the 1
following statement?

SELECT COUNT(column name) FROM student;

i. Date value
ii. text value
iii. Null value
iv. Numeric value
5. If column “Salary” contains the data set (5000,8000,2000,5500,2000), what 1
will be the output after the execution of the given query?

SELECT SUM (DISTINCT Salary) FROM Emp;

i. 22500
ii. 20500
iii. 25000
iv. 36000
6. ‘V’ in VoIP stands for: 1
i. Volume
ii. Voice
iii. Virtual
iv. Video

7. Which SQL statement do we use to find out the total number of values present 1
in the column 'price' of table SALES?

i. SELECT * FROM SALES;


ii. SELECT COUNT (price) FROM SALES;
iii. SELECT FIND (*) FROM SALES;
iv. SELECT COUNT(*) FROM SALES;

8. Which one of the following is not an NUMERIC function? 1


i. ROUND()
ii. SQRT()
iii. COUNT()
iv. MOD()
9. Which one of the following functions is used to find the minimum value from the 1
given data in MySQL?
i. MIN( )
ii. MINIMUM( )
iii. SMALL( )
iv. LESS( )
10. To display First three rows of a series object ‘M’, you may write: 1
i. M.Head()
ii. M.Tail(3)
iii. M.Head(3)
iv. M.head(3)
11. Which of the following statement will import pandas library? 1
i. Import pandas as pd
ii. import Pandas as py
iii. import pandas as ps
iv. import panda as pd
12. Consider the following series object Named ‘Ser’: 1
0 578
1 235
2 560
3 897
4 118
What will be the output of following statements?:
print(ser.index)
i. RangeIndex(start=0, stop=5, step=1)
ii. [578 235 560 897 118]
iii. 0,1,2,3,4
iv. None of Above

13. If all devices are connected in a linear way , then topology is called____________ 1
i. Ring
ii. Bus
iii. Star
iv. Linear
14. In SQL, which function is example of scalar function? 1
i. count ()
ii. avg ()
iii. ucase()
iv. max ()
15. Linux,MySQL and Mozilla Firefox software come under which category- 1
(a) Propriety
(b) FOSS
(c) Freeware
(d) Shareware

16. Nitish received an email warning him of closure of his bank accounts if he did not 1
update his banking information as soon as possible. He clicked the link in the email
and entered his banking information. Next he got to know that he was duped. This is
an example of __________ .
i. Phishing
ii. Identity Theft
iii. Digital footprint
iv. All of Above
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct choice as
i. Both A and R are true and R is the correct explanation for A
ii. Both A and R are true and R is not the correct explanation for A
iii. A is True but R is False
iv. A is false but R is True
17. Assertion (A): - Cookies are plain text files. 1

Reasoning (R):- Cookies store the Profile picture on Social Media.


18. Assertion (A):-To delete a column from Pandas DataFrame,drop() method 1
is used.

Reasoning (R): - Columns are deleted by dropping columns with index


label.
SECTION B
19. Differentiate between Internet and Intranet. 2

OR
Mention any four networking goals.

20. Rakesh, a database administrator needs to display subject wise sum of marks of 2
‘CS’ and ‘IP’ subject in student table . He is encountering an error while
executing the following query:

SELECT SUBJECT, SUM( ) FROM STUDENT GROUP BY SUBJECT


WHERE SUBJECT=’CS’ OR SUBJECT= ‘IP’;

Help him in identifying the reason of the error and write the correct query by
suggesting the possible correction (s).
21. Preeti writes the following commands with respect to a table EMPLOYEE 2
having fields, empno, name, department, commission.
Command1 : Select count(*) from employee;
Command2: Select count(commission) from employee;
She gets the output as 4 for the first command but gets an output 3 for the second
command. Explain the output with justification.
22. Write a program to create a series object using a dictionary that stores the number 2
of students in each house of class 12B of your school.

Note: Assume four house names are Shivaji, Tagore, Ashoka and Raman
having 15, 5, 10, 12 students respectively and pandas library has been
imported as pd.

23. Explain passive digital footprint with example. 2


OR
What do you mean by intellectual property ?

24. What will be the output of the following code: 2


>>>import pandas as pd
>>>A=pd.Series(data=[35,45,55,40])
>>>print(A[-1:])

25. Carefully observe the following code: 2


import pandas as pd
Q1={'X1':3000,'X2':4000,'X3':2000,'X4': 1600}
Q2={'A' :23000,'B':24000,'C':22000}
price={1:Q1,2:Q2}
df=pd.DataFrame(price)
print(df)

Answer the following:

i. List the index of the DataFrame df


ii. List the column names of DataFrame df.
SECTION C
26. Write outputs for SQL queries (i) to (iii) which are based on the given table 3
CUSTOMER:

TABLE: CUSTOMER
CNO CNAME CITY QUANTITY DOP
C01 GURPREET NEW DELHI 150 2022-06-11
C02 MALIKA HYDERABAD 10 2022-02-19
C03 NADAR DALHOUSIE 100 2021-12-04
C04 SAHIB CHANDIGARH 50 2021-10-10
C05 MEHAK CHANDIGARH 15 2021-10-20

i. SELECT CONCAT(CNAME,CITY) FROM CUSTOMER


WHERE QUANTITY>50;
ii. SELECT CITY FROM CUSTOMER WHERE
DOP >2021-10-10;
iii. SELECT POWER (QUANTITY,2) FROM CUSTOMER
WHERE CITY= ‘HYDERABAD’;
27. Write a Python code to create a DataFrame with appropriate column headings from 3
the Dictionary given below:

{‘A’:[‘ALOK’,’MANOJ’,’RAM’,’RAVI’],’B’:[20,30,40,50],’C’:[1000,2000,3000,4000]}

28. Consider the given DataFrame ‘Item’: 3

Name Price
0 Note Book 100
1 Project File 120
2 Pen Drive 325
3 IP Book 500

Write suitable Python statements for the following:


i. Add a column called Qty with the following data:
[15,20,30,40].
ii. Add a new Item named ‘The Parker Pen' having price 200.
iii. Remove the column Qty.
29. Rani has recently shifted to a new city and school. She does not know many 3
people in her new city and school. But all of a sudden, someone is posting
negative, demeaning comments on her social networking profile etc.

She is also getting repeated mails from unknown people. Every time she goes
online, she finds someone chasing her online.

i. What is this happening to Rani?


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 Cyber Bullying? Write the three common places
where cyberbullying occurs?.
30. Based on table School given here, write suitable SQL queries for the following: 3

Roll No Name Class Gender City Marks


1 Abhishek XI M Agra 430
2 Prateek XII M Mumbai 440
3 Sneha XI F Agra 470
4 Nancy XII F Mumbai 492
5 Himnashu XII M Delhi 360
6 Anchal XI F Dubai 256
7 Mehar X F Moscow 324
8 Nishant X M Moscow 429
i. Display class wise lowest marks.
ii. Display city wise total marks.
iii. Display total number of male and female students.
OR
Discuss the significance of Order by clause in detail with the help of suitable
example.
SECTION D
31. Write the SQL functions which will perform the following operations: 5
i. Display the string “chest” from the string “ Manchester United”
ii. Display the word “hello” from the string “$$$$$$$hello$$$$$$$$”.
iii. To display the name of the month eg, January or February from the
current date.
Write the Output that will be generated by the SQL commands:
iv. SELECT SYSDATE();
v. SELECT INSTR(“HELLO WORLD”, “he”)

OR
Explain the following SQL functions using suitable examples.
i. LCASE()
ii. LTRIM()
iii. SUBSTR()
iv. DAYNAME()
v. SQRT()
32. Krishna University is setting up the academic blocks at Jalandhar and is planning to 5
connect them through a network. The University has 4 blocks named BIZZ
BLOCK, TECHY BLOCK, ADMIN BLOCK and HR BLOCK. The distance
between these blocks and no. of computers in each block are as follows :-

DISTANCE
ADMIN to BIZZ 50 m
Block
ADMIN to TECHY 85 m
Block
ADMIN to HR 110
Block
BIZZ to TECHY 45 m
Block
BIZZ to HR Block 40 m
TECHY to HR 25 m
Block

No. of Computers
ADMIN 25
TECHY Block 60
HR Block 110
BIZZ Block 30
a) Suggest the most suitable place to install the server and justify the answer.
b) Suggest the placement of the Repeater in the network with justification
c) Suggest the device to be placed in each of these blocks to efficiently
connect all the computers with justification.
d) The university is planning to connect the ADM Block to KOLKATA, which
is more than 1500 Kms from University. Suggest an economic way to
connect it with reasonably high speed with justification
e) Which of the following will you suggest to establish the online face to face
communication between the people the ADMIN office to another office
situated at Mumbai?
i) Cable TV ii) Email iii) Video conferencing iv) Text chat
33 Consider the following graph. Write a program in python to draw it. (Height of 5
Bars are 10,1,0,33,6,8)

OR

Write a python program to plot a line chart based on the given data to depict the
changing weekly average marks of Raman for four weeks test.

Week=[1,2,3,4]
Avg_Marks=[50,82,68,54]

SECTION E
34 Saumya, a database administrator has designed a database for a Company. 1+1+
Help her by writing answers of the following questions based on the given 2
table: TABLE: EMP

ECODE ENAME SEX DESIG SALARY DOB


E001 ROHAN M CLERK 9000 2001-01-21
E002 AMIT M MANGER 20000 2001-12-12
E003 ANITA F NURSE 10000 2001-11-10
E004 SUMIT M PEON 6000 2009-11-12
E005 KUKI F CASHIER 8000 2001-12-07
i. Write a query to display employee names in lower case.
ii. Write a query to display the highest salary of the EMP
iii. Write a query to count total number of Male Employee .
OR (Option for part iii only)
Write a query to count total number employee year wise.

35 Consider the following dataframes and write the command to perform 1+1+
following operations on the dataframes Cls1 and Cls2: 2

(i) To subtract Cls2 from Cls1


(ii) To add Cls1 and Cls2.
(iii) To rename column Hindi as Science in Cls1
OR (Option for part iii only)
To change the index label of Cls1 from 2 to two and from 3 to three.
KENDRIYA VIDYALAYA SANGATHAN, JAMMU REGION
SAMPLE PAPER SET : 4
CLASS : XII SUBJECT: INFORMATICS PRACTICES (065)

TIME:3 HOURS M.M.70

General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 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 03 Long Answer type questions carrying 05 marks each.
7. Section E has 02 questions carrying 04 marks each. One internal choice is given in Q35
against part c only.
8. All programming questions are to be answered using Python Language only

PART A
1. In computer network, the process of converting analog signal into digital signal is known 1
as:
i. Transmission
ii. Modulation
iii. Conversion
iv. Demodulation
2. A person who deliberately sows discord on the Internet bystarting quarrels or upsetting 1
people is called as:
i. Cyber Bullying
ii. Cyber Trolling
iii. Hacking
iv. Doxing

3. Which of the following are feasible methods of e-waste management: 1


i. Reduce
ii. Reuse
iii. Recycle
iv. Allof the above

4. Which command must be written after order by command to display the detail in 1
descending order in SQL.
5. If column “Quantity” contains the data set (5,4,7,5,8,5,4), what will 1
be the output after the execution of the given query?
SELECT SUM(DISTINCT Quantity) FROM sales;
i.38
ii. 24
iii.4
iv.None
6. FLOSS stands for ________________ 1
i. Free Liable Open Source Systems
ii. Free Libre Open Source Software
iii. Free License for Open Source Software
iv. Final License for Open Systems Software
7. Which SQL statement do we use to find out the total quantity of all the items in the table 1
SALES?
i. SELECT * FROM SALES;
ii. SELECT COUNT (*) FROM SALES;
iii. SELECT COUNT (QTY) FROM SALES;
iv. SELECT SUM (QTY) FROM SALES;
8. Which one of the following is a multi-row function? 1
i. count()
ii. round()
iii. now()
iv. length()
9. Which one of the following functions is used to find the weekday name for a given date 1
in MYSQL.
i. WEEKDAY()
ii. WEEK()
iii. DAY()
iv. DAYNAME()
10. Given a Pandas series called s, the command which will display the last 5 rows is 1
______________.
i. print(s.Tail())
ii. print(s.tail(5))
iii. print(s.Tail(5))
iv. both a and c
11. Which of the following statement will be used to install Pandas? 1
i. pip install python-pandas
ii. pip install pandas
iii. python install python-pandas
iv. python install pandas
12. Which attribute is used to get total number of elements in a Series? 1
i. values
ii. shape
iii. ndim
iv. size
13. Which amongst the following is not an example of a network device? 1
i. Router
ii. Repeater
iii. Hub
iv. None
14. In SQL, which function is used to extract a substring from a string (starting at any 1
position).
i. MID()
ii.SUBSTR()
iii. SUBSTRING()
iv. All of the above
15. A document that provides legally binding guidelines for the use and distribution of 1
software.
i. Copyright
ii. Patent
iii.FOSS
iv. License
16. Soham uploaded one video in his youtube channel where he used one background music 1
downloaded from somewhere on Internet without giving credit to the source. He is violating
i.Intellectual property right
ii. Patent
iii. Copyright
iv. None of the above
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct choice as
i. Both A and R are true and R is the correct explanation for A
ii. Both A and R are true and R is not the correct explanation for A
iii. A is True but R is False
iv. A is false but R is True
17. Assertion (A) : MAC Addresss is 06 bytes long address and represented in 1
hexadecimal numbers.
Reason (R) : IP and MAC both type of addresses are used while communicating over a
network.
18. Assertion (A) : Professionals and developers are using the pandas library in data science 1
and machine learning.
Reason (R) : pandas is an open source Python library which offers high performance,
easy-to-use data structures and data analysis tools.
PART B
19. Explain the term Website and Web Server. 2
OR
What is the difference Static webpage and Dynamic webpage
20. Sam wrote the following query to display the details of parents whose age has not been 2
assigned.

SELECT * FROM PARENT WHERE AGE != NULL;

But didn’t get the desired output. Help him in identifying the reason of the error and
write the correct query by suggesting the possible correction.

21. What is the purpose of Having clause in SQL? Explain with the help of suitable example. 2
22. Write a program to create a series object States using a list that stores the Capital of each
states.
Note: Assume four States as index are Bihar, Maharashtra, Assam and Rajasthan having
values are Patna, Mumbai, Guwahati and Jaipur respectively and pandas library has been
imported as pd.
23. List any two health hazards related to excessive use of Technology. 2
OR
Ms. Kanika, in charge of Computer Lab in Hills International school, recently discovered
that the communication between her lab and the primary block of the school is extremely
slow and signals drop quite frequently. The distance between these two blocks is 150
meters.
a. What is the type of network used in the school.
b. Which device which may be used for smooth communication. Justify your answer
24. What will be the output of the following code: 2
import pandas as pd
x={'A':[50,10],'B':[80,20],'C':[12,30],'D':[18,40]}
tot_Sales={"Sales":x}
df=pd.DataFrame(tot_Sales)
print(df)
25. Carefully observe the following code: 2
import pandas as pd
x=[[100,200,300],[10,20]]
df=pd.DataFrame(x)
print(df)
Answer the following:
(i) Display the dataframe
(ii) Write the syntax for displaying size and dimension of the above dataframe.
SECTION C
26. Write outputs for SQL queries (i) to (iii) which are based on the given table Employee: 3
DEPARTM
E_ID FNAME LNAME SALARY JOINING_DATE
ENT
1 Mansa Singh 100000 2014-02-20 HR
2 Nikita Kapoor 80000 2014-07-11 Admin
3 Vaibhav Singh 300000 2014-02-21 HR
4 Atul Gupta 500000 2014-02-20 Admin
5 Jai Kumar 200000 2014-02-11 Admin

(i) SELECT INSTR(LNAME, ‘a’) FROM EMPLOYEE WHERE DEPARTMENT !=


‘HR’
(ii) SELECT POW(DAY(JOINING_DATE),MONTH(JOINING_DATE)) FROM
EMPLOYEE WHERE SALARY >=200000;
(iii) SELECT * FROM EMPLOYEE WHERE MID(LNAME,4,2)= ‘gh’;
27. Write a Python code to create a DataFrame df using List of Lists from the data given 3
below:
28. Consider the given DataFrame ‘ITEM’: 3

(i) Add a new row with values (index as 106, Iname- Pencil Box, Itype- Stationery,
Price- 180, Quantity- 210)using appropriate function.
(ii) Delete the newly added row.
(iii) Add a new column TOTAL in dataframe where the TOTAL is addition of Price and
Quantity.

29. You got the below shown email regarding your netflix account. Answer the following: 3

(i) What will happen if you click on the given URL?


(ii) Is the email an example of cyber-crime? If yes, then specify which type of cyber-
crime is it.
(iii) Justify your answer.
OR
What do you understand by Phishing? How does it work? Give some examples of
phishing attack.
30. A relation EMPLOYEE is given below: 3
Write SQLcommands to:
a. Display the average salary of each Department
b. Display the total salary of each department where it’s total is more than or equal to
6500
c. Display the details of Employees in descending order of Employee name
OR
Differentiate between Group By Clause and Order By Clause with suitable examples for
each.
SECTION D
31. Write suitable SQL query for the following: 5
i. To display the name of the month for the current date.
ii. To display the weekday name for the current date.
iii. To display the position of the first occurrence of “ka” in “karnataka”.
iv. To display the string in Upper case ‘Python Program’.
v. To compute the remainder of numerator 117 and denominator 17.
OR
Explain the following SQL functions using suitable examples.
i. LEFT()
ii. INSTR()
iii. SUBSTR()
iv. MONTHNAME()
v. MOD()
32. Himalayan Medic Center has set up its new center in Dehradoon. It has four buildings 5
with the names as Research Lab, Store, Accounts and Packaging Unit
Shortest Distances between various blocks in meters:

Number of computers in each building:

i. Suggest a cable layout of connections between the buildings.


ii. Suggest the most suitable place (i.e. building) to house the server of this organization.
Justify your answer
iii. Suggest the placement of Hub/Switch/Repeater in the network.
iv. Mention an economic technology to provide internet accessibility to all the buildings.
v. Suggest a system (hardware/software) to prevent unauthorized access to or from the
network.
33. Write Python code to create a horizontal bar graph of the following data with tastiest fruit 5
based on number of people who likes it. Give appropriate title and labels on X axis and Y
axis.

Fruits No. of people


Apple 35
Orange 30
Banana 10
KiwiFruit 30
BlueBerry 40
Grapes 5

OR

Consider the following graph .Write the python program to plot line graphs showing
daily sales of “Drinks” and “Food” items for five days

Also give suitable python statement to save this chart.


SECTION E
34. Consider a table MOVIE with the following data: 1
+
1
+
2

i. Write a query to display the position of first occurrence of Movie in MovieName.


ii. Write a query to display the details of movies where the category has 6 characters.
iii. Write a query to display the total Production Cost of movies whose release month is
in April.
OR (Option for part iii only)
Write a query to display the total number of movies released in each Year.
35. Consider the following Data Frame dfrm 1
+
1
+
2

A. Predict the output of the following python statement:


i. print(dfrm.columns)
ii.dfrm.insert(1, “Age”,[16,17,17,16,18])
print(dfrm)
B. Write Python statement to add a new row(with values as – XII,80,Tarun,6, C) using
appropriate Function.
OR (Option for part iii only)
Write Python statement to compute and display the details of those students who are not
in section is A or D.
KENDRIYA VIDYALAYA SANGATHAN, JAMMU REGION
SAMPLE PAPER SET : 5

CLASS : XII SUBJECT: INFORMATICS PRACTICES (065)

TIME:3 HOURS M.M.70

General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 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 03 Long Answer type questions carrying 05 marks each.
7. Section E has 02 questions carrying 04 marks each. One internal choice is given in Q35
against part c only.
8. All programming questions are to be answered using Python Language only

PART A
1. Collection of millions of interlinked web pages and resources on the internet forms the: 1
i. Web Server
ii. Website
iii. World Wide Web
iv. E-mail System
2. The practice of sending fraudulent messages that appear to come from a reputable 1
source is known as:
i. Hacking
ii. Plagiarism
iii. Identity Theft
iv. Phishing
3. Which is not a measure to recycle your e- waste safely. 1
i. Donate the old and used electronics.
ii. Use certified e-waste recycler
iii.Visit Civic institutions for recycling options.
iv. Dump it in water or dig them in earth.
4. The outputs of the given two commands are 12 and 10 respectively. 1
Select COUNT(*) From Employee;
Select COUNT(Designation) From Employee;
How many NULL values are there in Designation column of the Employee table?
a. 12
b. 10
c. 2
d. None of these
5. If column “Age” contains the data set (10,7,9,6,10,10), what will be the output after the 1
execution of the given query?
SELECT AVG (DISTINCT Age) FROM student;
i. 8.67
ii. 8
iii. 9
iv. 5.33
6. In which year the Indian IT Act, 2000 got updated? 1
i) 2006
ii)2008
iii)2010
iv)2012
7. Which SQL statement do we use to find out the total salary of all the employees in the 1
table EMPLOYEE?
i. SELECT * FROM EMPLOYEE;
ii. SELECT COUNT (*) FROM EMPLOYEE;
iii. SELECT COUNT (salary) FROM EMPLOYEE;
iv. SELECT SUM (salary) FROM EMPLOYEE;
8. Which one of the following is a single row function? 1
i. max()
ii. count()
iii. avg()
iv. length()
9. Predict the output of the following queries: 1
select round(791.485,-2);
10 Consider the following series S : 1
.

Write the command that generates the output as:


1 Red
3 Orange
5 Black
11 The following code create a dataframe named ‘D1’ with _______________ columns. 1
.
import pandas as pd
D1 = pd.DataFrame([1,2,3] )

a) 1
b) 2
c) 3
d) 4

12 Pandas Series is: _____ 1


. i. 2-Dimensional
ii. 3-Dimensional
iii. 1 Dimensional
iv. Multidimensional
13 Which amongst the following is not an example of a website? 1
. i. Facebook
ii. Edge
iii. amazon
iv. None
14 In SQL, which function is used to display the total number of characters in a string? 1
. i. LEN()
ii.LENGTH()
iii. COUNT()
iv. Both ii and iii
15 Legal term to describe the rights of a creator of original works like sculptures, writings, 1
. computer software etc is:
i. Copyright
ii. Patent
iii.FOSS
iv. Trademark
16 The one who tries to gain unauthorised access to computers or networks in order to 1
. steal sensitive data with the intent to damage or bring down systems is called
i. Cracker
ii. Plagiarism
iii. Ethical Hacker
iv. Phishing
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct choice as
i. Both A and R are true and R is the correct explanation for A
ii. Both A and R are true and R is not the correct explanation for A
iii. A is True but R is False
iv. A is false but R is True

17 Assertion (A): - We should always prefer websites using secure HTTP connection. 1
. Reasoning (R):- The web pages are transferred over the web using Hyper Text Transfer
Protocol.
18 Assertion (A): - Boolean indexing is a type of indexing. 1
. Reasoning (R):- DataFrame.loc(True) function can be used to find the relative values
where index value is True
PART B
19 Explain the term Add-ons and Plug-in. 2
. OR
Differentiate between router and gateway.
20 Sam wrote the following query to display the total number of employees in each 2
. department where the total employees are more than 5.

SELECT DEPT, COUNT(*) FROM EMPLOYEE WHERE COUNT(*)>5 GROUP BY DEPT;

But didn’t get the desired output. Help him in identifying the reason of the error and
write the correct query by suggesting the possible correction.

21 What is the purpose of Group By clause in SQL? Explain with the help of suitable 2
. example.
22 Write the output of the given program:
.
import pandas as pd
S1=pd.Series([5,6,7,8,10],index=['v','w',' x','y','z'])
S2=pd.Series([2,6,1,4,6],index=['z','y','a','w','v'])
print(S1-S2)
23 Explain about the various communication etiquettes. 2
. OR
In a class, the teacher has assigned projects to two top students. Student A has invented
a new concept and applied for rights to the government while Student B has designed a
new logo for his School.
i.Which type of rights Student A will get for his new concept?
a. Trademark b. Copyright c. Patent d. Ownership

ii. What type of rightStudent B will get for designing the logo?
a. Trademark b. Copyright c. Patent d. Ownership
24 What will be the output of the following code: 2
. import pandas as pd
data= {'Name':['Sachin','Dhoni','Virat','Rohit','Shikhar'],
'Age':[26,27,25,24,22],'Score':[87,89,89,55,47]}
df=pd.DataFrame(data,index=['a','b','c','d','e'])
print(df['Score']>=87)
25 Carefully observe the following code: 2
. import pandas as pd
x={'a':100, 'b':200}
y={'a':5,'c':20}
z={'b':50,'d':40}
df=pd.DataFrame({100:x,200:y})
print(df)

Answer the following:


(i) Display the dataframe
(ii) what will be the output of df.shape
SECTION C
26 Write outputs for SQL queries (i) to (iii) which are based on the given table COURSE: 3
.

(i) SELECT INSTR(CNAME, ‘D’) FROM COURSE WHERE FEES BETWEEN 12000 AND 18000;
(ii) SELECT MOD(DAY(STARTDATE),MONTH(STARTDATE)) FROM COURSE;
(iii) SELECT * FROM COURSE WHERE MONTHNAME(STARTDATE)= ‘JULY’;
27 Write a Python code to create a DataFramedf using dictionary of dictionaries from the 3
. data given below:

28 Consider the given DataFrame ‘batsman’: 3


.

(i) Add a new column FinalScore where the finalscore is sum of score1 and score2.
(ii) Add a new row with values (index as 4, Bno- 5, name- Sachin Tendulkar, score1- 99,
score2- 85) using appropriate function
(iii) Delete the columns Bno and score2.
29 Ms.Suhana who is a well-known celebrity in entertainment industry by profession faced 3
. following situations. Identify the type of crime for each situation/incident happened to
her?
(i) Someone deliberately starts argument and posted derogatory messages on her
online.
(ii) She received an email which looked like from her manager where a link was provided
to fill some sensitive information. She provided the information which then resulted in
breach of confidentiality.
(iii) Her official social media account was controlled by somebody in an unauthorised
way.
OR
What do you understand by e-waste? What are the different methods of e-waste
management? Discuss each method briefly.
30 Based on table Salesman given here, write suitable SQL queries for the 3
. following:
(i) Display the bonus after rounding off to 1 decimal places.
(ii) Display the total number of character of all SNAME where the bonus is assigned.
(iii) Display the total salary of each YEAR of JOINING.
OR
Consider the table WORKER below and answer the following questions:-

i. What will the output of following command:


SELECT NAME FROM WORKER WHERE DOJ>"1998-12-20";
ii. Raghav wants to know number of male and female employee in table worker.
Suggest him the SQL command to do so.
iii. Write SQL statement to display the Name and month name in the field DOJ.

SECTION D
31 Write suitable SQL query for the following: 5
. i To display the name of the month for the current date.
ii To display the leftmost 5 characters from the string“INFORMATICS
PRACTICES”.
iii To display the position of first occurrence of “iya”in the string
“Kendriya Vidyalaya”
iv To display the column NAME in uppercase from table STUDENT.
v To compute the remainder of 120 and 7 using sql function.
OR
Explain the following SQL functions using suitable examples.
i. DAYNAME()
ii. MID()
iii. TRIM()
iv. LENGTH()
v. POWER()
32 A Software Development Company has set up its new centre at HYDERABAD for its 5
. officeand web-based activities. It has 4 blocks of buildings named Block A, Block B,
BlockC, Block D.

Number of Computers:

Shortest Distances between various blocks in meters:

(i) Suggest the most suitable place (i.e. block) to house the server of this company with
a suitable reason.
(ii) Suggest the type of network to connect all the blocks with suitable reason.
(iii) Suggest the placement of following devices with justification:
1. Switch/Hub
2. Repeater
(iv) Suggest a system (hardware/software) to prevent unauthorized access to or from
the network
(v) Which of the following will you suggest to establish the online face
to face communication between the people in the BLOCK A of Hyderabad head office
and Delhi campus?
a) Cable TV
b) Email
c) Text chat
d) Video conferencing
33 Write Python code to plot a bar chart for Result Analysis as shown below: 5
.
Also give suitable python statement to save this chart in pdf format.

OR
Write a python program to plot a line chart based on the given data to depict the runs
scored by India. Create a list “OVER” with the data 10, 20, 30, 40, 50. Create another
list “RUNS” to store the runs scored as 45, 25, 50, 75, 100

SECTION E
34 A relation ITEM is given below : 1
. +
1
+
2

i. Write a query to display the IteMName in uppercase and Manufacturer in lowercase.


ii. Write a query to display the total price of each manufacturer.
iii. Write a query to displayItemName wise total number of items.
OR (Option for part iii only)
Write a query to displaytotal number of items of each manufacturer where total items is
more than 1.
35 Consider the following Data Frame df 1
. +
1
+
2
A. Predict the output of the following python statement:
i. df.columns
ii. df.iloc[1:3,1:]
B. Write Python statement to add a new column ACC_NO (with values as –
[135,153,225,442]) before qty column
OR (Option for part iii only)
Write Python statement to compute and display the details of those items whose Price
is in between 80 and 150 (both inclusive)
KENDRIYA VIDYALAYA SANGATHAN, JAMMU REGION
SAMPLE PAPER SET : 6
CLASS : XII SUBJECT: INFORMATICS PRACTICES (065)
TIME:3 HOURS M.M.70

General Instructions:
1. This question paper contains five sections, Section A toE.
2. All questions arecompulsory.
3. Section A have 18 questions carrying 01 markeach.
4. Section B has 07 Very Short Answer type questions carrying 02 markseach.
5. Section C has 05 Short Answer type questions carrying 03 markseach.
6. Section D has 03 Long Answer type questions carrying 05 markseach.
7. Section E has 02 questions carrying 04 marks each. One internal choiceis
given in Q35 against part c only.
8. All programming questions are to be answered using Python Languageonly.

PART A
1. Computer LAB cable network is an example of: 1
i. LAN
ii. WAN
iii. MAN
iv. Internet
2. Which of the following is a type of cyber crime? 1
i. Datatheft
ii. Installing antivirus forprotection
iii. Laptop Theft
iv. None of the above.
3. What is an example of e-waste? 1
i. Used notebooks
ii. Unused oldclothes.
iii. Unused oldcomputers
iv. Empty cans
4. What will be the output if inventory table has total 5 columns and 12 1
rows/records
SELECT COUNT(*) FROM inventory;

i. 70
ii. 17
iii. 12
iv. None of the above.
5. If column “Salary” contains the data set (6000,5000,7000,5000,8000), what 1
will be the output after the execution of the given query?

SELECT SUM (DISTINCT Fees) FROM student;

i. 26000
ii. 10000
iii. 20000
iv. 33500
6. ‘F’ in FOSS stands for: 1
i. Freedom
ii. Free
iii. Faulty
iv. First

7. Which SQL statement do we use to find out the total number of values present 1
in the the column Fee. Table name is Student.

i. SELECT * FROMSTUDENT;
ii. SELECT COUNT (FEE) FROMSTUDENT;
iii. SELECT FIND (FEE) FROMSTUDENT;
iv. SELECT SUM (FEE) FROMSTUDENT;
8. Which one of the following is not an aggregate function? 1
i. ROUND()
ii. SUM()
iii. COUNT()
iv. AVG()
9. Which one of the following functions is used to find the smallest value from the 1
given data in MySQL?
i. MIN()
ii. MAXIMUM()
iii. BIG()
iv. LARGE()
10. To display last five rows of a series object ‘S1’, you may write: 1
i. S1.Head()
ii. S1.Tail(5)
iii. S1.Head(5)
iv. S1.tail()
11. Consider the following DataFrame: student_df, having columns Name, Class and 1
Marks.
Select the correct statement from the followings to get the sorted value of the
column marks.

(A) student_df.sort_values(by=["marks"])
(B) student.sort([“Marks”])
(C) sort(student_df[“Marks”])
(D) sort_values(student_df[“Marks”])
12. Which of the following can be used to specify the data while creating a 1
DataFrame?
i. Series
ii. List ofDictionaries
iii. Structuredndarray
iv. All ofthese
13. Which amongst the following is not an example of a browser? 1
i. Chrome
ii. Firefox
iii. Avast
iv. Edge
14. In SQL, which function is used to display dayname. 1
i. Date()
ii. Dayname()
iii. Day()
iv. Now()
15. Legal term to describe the rights of a creator/inventor of original invention is 1
i. Copyright
ii. Patent.
iii. Trademark
iv. FOSS

16. Is the trail of data we leave behind when we visit any website(or 1
use any online application or portal) to fill-in data or perform anytransaction.
i. Offlinephishing
ii. Offlinefootprint
iii. Digitalfootprint
iv. Digitalphishing
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct choice as
i. Both A and R are true and R is the correct explanation forA
ii. Both A and R are true and R is not the correct explanation forA
iii. A is True but R isFalse
iv. A is false but R isTrue
17. Assertion (A): - Internet cookies are text files that contain small pieces of data, 1
like a 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.
18. Assertion (A):- DataFrame has both a row and column index. 1

Reasoning (R): - A DataFrame is a two-dimensional labelled data structure like


a table of MySQL.
PART B
19. Explain the terms Static and Dynamic Webpage . 2
OR
Mention any four networking goals.

20. Mahesh, a database administrator needs to display house wise total number of 2
records of ‘Green’ and ‘Orange’ house. She is encountering an error while
executing the following query:

SELECT HOUSE, COUNT (*) FROM STUDENT GROUP BY HOUSE WHERE


HOUSE=’Green’ OR HOUSE= ‘Orange’;

Help her in identifying the reason of the error and write the correct query by
suggesting the possible correction (s).
21. What is the purpose of Having clause in SQL?Explain with the help of suitable 2
example.

22. Write a program to create a series object usinga dictionary that stores the 2
number of students in each house of class 12A of yourschool.

Note: Assume four house names are H1, H2, H3 and H4 having 10, 20, 30, 40
students respectively and pandas library has been imported as pd.

23. Explain IPR (Intellectual Property Right) 2


OR
Mention any four net etiquettes.

24. What will be the output of the following code: 2


>>>import pandas as pd
>>>A=pd.Series(data=[32,45,30,40])
>>>print(A<35)

25. Define the following terms :- 2


(a)Digital Footprints
(b)Phishing

OR
Ms. Kanika, is studying in Hills International school. She frequently used Internet
to surf the web, online shopping and watch you tube videos online. What
precautions / measures should she take to curb online frauds?
SECTION C
26 ConsiderthefollowingTeachertable: WriteSQLcommandsfor(i) to (iii) 3

Tid TName Department Salary NoofPeriod


100 Joseph Physics 45000 25
101 Lakshmi Hindi 55000 25
102 Neelu Chemistry 66000
103 John Physics 40000 25

i) Display Tname and Salary


ii) Calculate sum of Salary
iii) Count the total value of No. of Period Column
OR

Predict the output of the following SQL queries


i) SELECT TRIM(" ALL THE BEST ");
ii) SELECT LEFT(‘INFORMATICS’,5);
iii) SELECT UPPER (MID("start up india",10));
27. Write a Python code to create a DataFrame with appropriate column headings 3
from the list given below:

[[110,'Gurman',98],[111,'Rajveer',95],[112,'Samar' ,96],[1113,'Yuvraj',88]]

28. Consider the given DataFrame‘Stock’: 3


Name Price
0 Item1 150
1 Item2 180
2 Item3 225
3 Item4 500
Write suitable Python statements for the following:
i. Add a column called Special_Price with the followingdata:
[135,150,200,440].
ii. Add a new book named ‘The Secret' having price800.
Remove the columnSpecial_Price.
29. Ruhi has recently shifted to a new city and school. She does not know many 3
people in her new city and school. But all of a sudden, someone is posting
negative, demeaning comments on her social networking profile etc.
She is also getting repeated mails from unknown people. Every time she goes
online, she finds someone chasing her online.

i. What is this happening toRuhi?


ii. What immediate action should she take to handleit?
iii. Is there any law in India to handle such issues? Discussbriefly.
OR
What do you mean by FOSS. Explain in detail and Give Examples
30 3

School Tot_students Topper


CO1 PPS 40 32
CO2 JPS 30 18
CO3 GPS 20 18
CO4 MPS 18 10
CO5 BPS 28 20

Write Query for the following :


i)Display all the records from employee table.
ii)Display Ename, sal, deptno who are not getting commission from table EMP.
iii)Display employee number, name, salary and annual salary. Assuming that the
salary provided is the monthly salary.

SECTION D
31. Write suitable SQL query for the following: 5
i. Display 7 characters extracted from 7th left character onwards from the
string ‘INDIASHINING’.
ii. Display the position of occurrence of string ‘COME’ in the string
‘WELCOMEWORLD’.
iii. Round off the value 23.78 to one decimalplace.
iv. Display the remainder of 100 divided by9.
v. Removealltheexpectedleadingandtrailingspacesfromacolumnuserid of
the table‘USERS’.
OR
Explain the following SQL functions using suitable examples.
i. UCASE()
ii. TRIM()
iii. MID()
iv. DAYNAME()
v. POWER()
32. Prime Computer services Ltd. is an international educational organization. It is 5
planning to set up its India campus at Mumbai with its head office in Delhi. The
Mumbai office campus has four main buildings-ADMIN, ACCOUNTS,
EXAMINATION and RESULT.
You as a network expert have to suggest the best network related solutions for
their problems raised in (i) to (v), keeping in mind the distances between the
buildings and other given parameters.

MUMBAI CAMPUS
DELHI HEAD OFFICE
EXAMINATION ACCOUNTS

ADMIN RESULT

Shortest distances between various buildings:


ADMIN TO ACCOUNTS 55 m
ADMIN TO EXAMINATION 90 m
ADMIN TO RESULT 50 m
ACCOUNTS TO EXAMINATION 55 m
ACCOUNTS TO RESULT 50 m
EXAMINATION TO RESULT 45 m
DELHI Head Office to MUMBAI 2150 m
campus
Number of computers installed at various buildings are as follows:
ADMIN 110
ACCOUNTS 75
EXAMINATION 40
RESULT 12
DELHI HEAD OFFICE 20
(i) Suggest the most appropriate location of the server inside the MUMBAI campus
(out of the four buildings) to get the best
connectivityformaximumnumberofcomputers.Justifyyouranswer.
(ii) Suggestanddrawcablelayouttoefficientlyconnectvariousbuildings within the
MUMBAI campus for a wiredconnectivity.
(iii) Which networking device will you suggest to be procured by the company to
interconnect all the computers of various buildings of MUMBAIcampus?
(iv) Company is planning to get its website designed which will allow students to see
their results after registering themselves on its server.
Outofthestaticordynamic,whichtypeofwebsitewillyousuggest?
(v) Which of the following will you suggest to establish the online face to face
communication between the people in the ADMIN office of Mumbai campus and
Delhi headoffice?
a) CableTV
b) Email
c) Videoconferencing
d) Textchat
33. Write Python code to plot a bar chart for India’s medal tally as shown below: 5

Also give suitable python statement to save this chart.


OR
Write a python program to plot a line chart based on the given data to depict
the changing weekly average temperature in Delhi for four weeks.

Week=[1,2,3,4]
Avg_week_temp=[40,42,38,44]
SECTION E
34. Shreya, a database administrator has designed a database for a 1+1+2
clothingshop. Help her by writing answers of the following questions based
on the given table: TABLE: CLOTH

CCODE CNAME SIZE COLOR PRICE DOP


C001 JEANS XL BLUE 990 2022-01-21
C002 TSHIRT M RED 599 2021-12-12
C003 TROUSER M GREY 399 2021-11-10
C004 SAREE FREE GREEN 1299 2019-11-12
C005 KURTI L WHITE 399 2021-12-07
i. Write a query to display cloth names in lowercase.
ii. Write a query to display the lowest price of thecloths.
iii. Write a query to count total number of cloths purchased of
medium size.
OR (Option for part iii only)

Write a query to count year wise total number of cloths purchased.


35. Mr. Som, a data analyst has designed the DataFramedfthat contains data
about ComputerOlympiadwith‘CO1’,‘CO2’,‘CO3’,‘CO4’,‘CO5’asindexesshown
below. Answer the followingquestions:

1+1+2
Scholl Tot_students Topper First_Runnerup
CO1 PPS 40 32 8
CO2 JPS 30 18 12
CO3 GPS 20 18 2
CO4 MPS 18 10 8
CO5 BPS 28 20 8

A. Predict the output of the following pythonstatement:


i. df.shape
ii. df[2:4]
B. Write Python statement to display the data of Topper column
ofindexes CO2 to CO4.
OR (Option for part iii only)
Write Python statement to compute and display the difference of data
of Tot_students column and First_Runnerup column of the above given
DataFrame.
KENDRIYA VIDYALAYA SANGATHAN, JAMMU REGION
SAMPLE QUESTION PAPER SET-1(2022-23)
Class XII -INFORMATICS PRACTICES (065)

TIME:3 HOURS M.M.70


General Instructions:
1. This question paper contains five sections, Section A toE.
2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 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 03 Long Answer type questions carrying 05 marks each.
7. Section E has 02 questions carrying 04 marks each. One internal choice is given in Q35
against part c only.
8. All programming questions are to be answered using Python Language only.

SECTION A
1 What is the term used when the main server sends mail to another mail server? 1
(a) VoIP (b) SMTP (c) POP3 (d) MIME

2 What is the difference between copyright and licensing? 1


3 A person who starts quarrels or upsets people on the internet to distract and sow discord 1
by posting inflammatory and digressive, extraneous or off-topic messages to an online
community. This person will be referred as in cyber world .
i.cyber troll ii. cyber stalker iii. Spyware iv. Hacker

4 Write the output of the following command? 1


select ROUND(753.589,-2);
(a) 753.58(b) 800 (c) 754 (d) 700
5 If on „2019-05-26‟, it was Sunday, what will be the output of following SQL command? 1
select nameofday('2019-05-27');

(a) Error (b) 5 (c) Monday (d) Sunday


6 Expand the term IPR 1

7 Which of the SQL statements is correct? 1


(a) SELECT Username AND Password FROM Users;

(b) SELECT Username, Password FROM Users;

(c) SELECT Username, Password WHERE Username = „user1‟;

(d) None of these

1
8 Which of the following function returns the date value in „YYYY-MM-DD‟ from system 1
date?

(a) date()
(b) now()
(c) sysdate()
(d) curdate()

9 Which of the following function returns the value of a number raised to the power of 1
another number?
(a) ROUND( ) (b) POWER( ) (c) POW( ) (d) Both (b) and (c)
10 How many elements will be there in the series named “S1”? 1
>>> S1 = pd.Series(range(5))
>>> print(S1)
a. 5
b. 4
c. 6
d. None of the above
11 The command to display last 3 rows from series named “week” is_______________. 1
a. print(week.tail(3))
b. print(week.Tail(3))
c. print(week.Tails(3))
d. print(week.tails(3))
12 To display the 3rd, 4th and 5th columns from the 6th to 9th rows of a dataframe you can 1
write
(a) DF.loc[6:9, 3:5]
(b) DF.loc[6:10, 3:6]
(c) DF.iloc[6:10, 3:6]
(d) DF.iloc[6:9, 3:5]
13 Which document view given an appearance as in web browser? 1
(a) Draft view
(b)Outline view
(c )Web layout view
(d) Full screen reading

14 Which of the following function is used to FIND the largest value from the given 1
data in MYSQL?

(a) MAX ()

(b) MAXIMUM ()

(c) LARGEST ()

(d) BIG ()

2
15 1
Which type of right is related to logowork?

(a). Copyright.
(b). Trademark.
(c). Trade secret.
(d). Patent.
16 Which of the following is a type of cyber security? 1
(a) Cloud Security
(b) Network Security
(c) Application Security
(d) All of the above
Q17and 18 are ASSERTION AND REASONING based questions. Mark the correct
choice as:
i. Both A and R are true and R is the correct explanation forA
ii. Both A and R are true and R is not the correct explanation forA
iii. A is True but R isFalse
iv. A is false but R isTrue
17 Assertion (A) : Social media are websites or applications that enable their users 1
to participate in social networking but they cannot create and share content with
others in the community.
Reason (R) : We should not waste precious time in responding to unnecessary
emails or comments unless they have some relevance for us.
18 Assertion (A) : Data visualization refers to the graphical representation of information 1
and data using visual elements like charts, graphs and maps etc.
Reason (R) : To install matplotlib library we can use the command
pip install matplotlib.

3
SECTION B
19 Expand the following terms related to Computer Networks: 2
a. EDGE
b. URL
c. TCP/IP
d. VoIP
OR
Define Computer Network. What do you mean by autonomous computers?

20 Sangeetha is a database administrator needs to display Block wise total number of records 2
of 2 and 3 Block Apartments. She is encountering an error while executing the following
query:

SELECT BLOCK, COUNT (*) FROM APARTMENTS GROUP BY BLOCK


WHERE BLOCK=2 OR 3;
Help her in identifying the reason of the error and write the correct query by suggesting
the possible correction (s).
21 What is ALIAS in MYSQL? Give an example with MYSQL command. 2

22 Write a program to create a series from a given Tuple data data=(100,‟Aavya 2


Verma‟,96.3,‟A‟).
23 What do you understand by Net Etiquettes? Explain any two such etiquettes. 2
OR
According to a survey, one of the major Asian country generates approximately about 2
million tonnes of electronic waste per year. Only 1.5 % of the total e-waste gets recycled.
Suggest a method to manage e-waste.
24 Give the output of following program: 2
import pandas as pd
s=pd.Series([10,20,30,40,50],index=[„a‟,‟b‟,‟c‟,‟d‟,‟e‟])
print(s[0]) #or print(s.iloc[0])
print(s[„a‟:‟c‟]) #or print(s.loc[„a‟:‟c‟])
print(s[2]) #or print(s.iloc[s[2])
print(s[„a‟]) #or print(s.loc[„a‟])

4
2
25 Carefully observe the following code:

import pandas as pd
Year1={'P1':5000,'P2':800,'P3':1200,'P4': 1800}
Year2={'P' :1300,'Q':1400,'R':1200}
totSales={1:Year1,2:Year2}
DF=pd.DataFrame(totSales)
print(DF)

Answer the following:


i. List the index of the DataFrameDF
ii. List the column names of DataFrame DF.
SECTION C
26 Constder the table SALE and Write SQL queries (i) to (iii) : 3
TABLE: SALE

(i) To display number of cars purchased by each customer from the SALE Table.
(ii) To display customer id and number of cars purchased if the customer purchased more
than one car from the sale table.
(iii) To display number of people in each category of payment mode from the table SALE.
27 Write a Python code to create a DataFrame with appropriate column headings from the list 3
given below:

[[E001,'Govind',PHY],[E002,'Raju',CS],[E003,'Kiran' ,CHEM],[E004,'Dinesh',ENG]]

5
28 A dataframe fdf stores data about passengers, Flights and Years. First few of the dataframe 3
are shown below:

S_NO Year Months MalePassengers FemalePassengers


1 2019 January 900 300
2 2019 February 1000 180
3 2019 March 980 220
4 2019 April 1100 300

Perform the following operations on the Data Frame :


1.Add both the male and female passengers and assign to column“Total_ passengers”
2. Display the maximum passengers in male passengers and maximum passengers in female
passengers of theData Frame.
3. Display the Data Frame.
29 i. Posting negative, demeaning comments on her social networking profileis 3
called

ii. Chasing and keep track of activities of a person online is called

iii. IT act was introduce in year

OR
What are the different ways in which authentication of a person can be performed?

30 Consider a table ITEMS with the following data: 3

NOTE: Discount column stores discount %.


Write SQL commands to:
a. To display the number of items that have more than 10% as discount.
b. To display the highest unit price of items.
c. To display the names of items that has „Baby‟ anywhere in their item names.
OR
What do you mean by Aggregate Functions?. Explain any two aggregate functions with
example.
SECTION D

6
31 5
Write the names of SQL functions which will perform the following operations:
i. To display the current date
ii. To convert the string in capital letters „Thiruvananthpuram‟
iii. To remove spaces from the end of string “KVS Regional Office Jammu “
iv. To display the month from the current date
v. To compute the power of a number n1 raised to the power n2
.
OR
Consider the following tables STATIONERY and answer the questions:

Table: STATIONERY

S_ID StationeryName Company Price

DP01 Dot Pen ABC 10.50


PL02 Pencil XYZ 6.00
ER05 Eraser XYZ 7.50
PL01 Pencil CAM 5.75
GP02 Gel Pen ABC 15.00

Write SQL commands using SQL functions to perform the following operations:
i) Display the stationary name and price after rounding off to zero decimal places.
ii) Display the occurrence of „en‟ in stationary name.
iii) Display the first four characters of the stationary name.
iv) Display the names of company after converting to lower case.
v) Display the length of stationery names.

32 5
“Learn Together” is an educational NGO. It is setting up its new campus at Jaipur for its web
based activities. The campus has 4 compounds as shown in the diagram below:

Main
Resource Compound
Compound

Training Finance
Compound Compound

Center to center distances between various Compounds as per architectural drawings (in
Metre) is as follows :
7
Main Compound to Resource Compound 110 m
Main Compound to Training Compound 115 m
Main Compound to Finance Compound 35 m
Resource Compound to Training Compound 25 m
Resource Compound to Finance Compound 135 m
Training Compound to Finance Compound 100 m

Expected Number of Computers in each Compound is as follows:

Main Compound 5
Resource Compound 15
Training Compound 150
Finance Compound 20

(1) Suggest a cable layout of connections between the compounds.


(2) Suggest the most suitable topology of the connection between the wings.
(3) Suggest the most suitable place (i.e. compound) to house the server
for this NGO. Also, provide a suitable reason for your suggestion.
(4) Suggest the placement of the following devices with justification :
(i) Repeater
(ii) Hub/Switch
(5) The NGO is planning to connect its International office situated in
Mumbai, which out of the following wired communication link, you will
suggest for a very high speed connectivity?
(i) Telephone Analog Line
(ii) Optical Fiber
(iii) Ethernet Cable
33 5
WAP to display the name of 8 countries with COVID-19 active cases using bar chart with
red color.

8
OR

Consider the following graph. Write the Python code to plot line graph:

SECTION E
34 Write SQL queries for (i) to (iii), which are based on the table: STUDENT 1+1+2

(i) To display the records from table student in alphabetical order as per the name of the
student.
(ii) To display Class, DOB and City whose marks is between 450 and 551.
(iii)To display highest marks scored from each city along with the city name.
OR
To display class and total number of student in each class.

35 Consider the following Data Frame stddf: 1+1+2


Marks Age Percentage Stream
Mahendra 99 16 67 Science
Sanju 96 17 64 Science
Sohan Lal 97 16 75 Science
Seema 99 16 82 Humanities

9
a. Predict the output of the following Python statement:
(i) stddf.index
(ii) print(stddf.size)
b.Write Python statement to add a new column City (with values
Jhansi,Gwalior,Jabalpur,Lalitpur) at the 2nd position.
OR
Write Python statement to compute and display the details of those students who are in
Science stream or percentage is greater than 70.

*******************

10
11
12
13
KENDRIYA VIDYALAYA SANGATHAN
CLASS XII
INFORMATICS PRACTICES (065)
SET 8
TIME: 3 HOURS M.M.70

General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 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 03 Long Answer type questions carrying 05 marks each.
7. Section E has 02 questions carrying 04 marks each. One internal choice is
given in Q35 against part c only.
8. All programming questions are to be answered using Python Language only.

PART A
1. A network having span of a city is called: 1
i. LAN
ii. WAN
iii. MAN
iv. Internet
2. Which of the following is a type of cyber crime? 1
i. Data theft
ii. CyberStalking
iii. Cyber bullying
iv. All of these
3. What is an example of e-waste? 1
i. A ripened banana
ii. Unused old clothes
iii. Unused old computers
iv. Empty cola cans
4. Which type of values will not be considered by SQL while executing the 1
following statement?

SELECT COUNT(column name) FROM deptt;

i. Numeric value
ii. text value
iii. Null value
iv. Date value
5. If column “salary” contains the data set (5000,8000,7500,5000,8000), what 1
will be the output after the execution of the given query?

SELECT SUM (DISTINCT Salary) FROM details;

i. 20500
ii. 10000
iii. 20000
iv. 33500
6. The term FOSS stands for : 1

7. Which SQL statement do we use to find out the total number of records present 1
in the table EMP?

i. SELECT * FROM EMP;


ii. SELECT COUNT (*) FROM EMP;
iii. SELECT FIND (*) FROM EMP;
iv. SELECT SUM () FROM EMP;

8. Which one of the following is an aggregate function? 1


i. ROUND()
ii. MOD()
iii. COUNT()
iv. DISTINCT()
9. Which one of the following functions is used to find the minimum value from the 1
given data in MySQL?
i. MIN( )
ii. MINIMUM( )
iii. SMALL( )
iv. LOWER( )
10. To display last five rows of a series object „M‟, you may write: 1
i. M.Head()
ii. M.Tail(5)
iii. M.Head(5)
iv. M.tail()
11. Which of the following statement will import pandas library? 1
i. Import pandas as pd
ii. import Pandas as py
iii. import pandas as pd
iv. import panda as pd
12. Which of the following can be used to specify the data while creating a 1
DataFrame?
i. Series
ii. List of Dictionaries
iii. Structured ndarray
iv. All of these
13. Which amongst the following is not an example of a browser? 1
i. Chrome
ii. Firefox
iii. Avast
iv. Edge
14. In SQL, which function is used to display current date and time? 1
i. Date ()
ii. Time ()
iii. Current ()
iv. Now ()
15. Legal term to describe the rights of a creator of original creative or artistic work 1
is:
i. Copyright
ii. Copyleft
iii. GPL
iv. FOSS
16. is the trail of data we leave behind when we visit any website (or use 1
any online application or portal) to fill-in data or perform any transaction.
i. Offline phishing
ii. Offline footprint
iii. Digital footprint
iv. Digital phishing
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct choice as
i. Both A and R are true and R is the correct explanation for A
ii. Both A and R are true and R is not the correct explanation for A
iii. A is True but R is False
iv. A is false but R is True
17. Assertion (A): - Internet cookies are text files that contain small pieces of data, 1
like a 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.

18. Assertion (A):- DataFrame has both a row and column index. 1

Reasoning (R): - A DataFrame is a two-dimensional labelled data structure like


a table of MySQL.
PART B
19. Explain the terms Web page and Website. 2

OR
Mention any four networking ettiquettes.

20. Sneha, a database administrator needs to display Region wise total number of 2
records of „NORTH‟ and „EAST‟ . She is encountering an error while
executing the following query:

SELECT REGION , COUNT (*) FROM STUDENT GROUP BY


REGION WHERE REGION=‟NORTH‟ OR REGION= „EAST‟;

Help her in identifying the reason of the error and write the correct query by
suggesting the possible correction (s).
21. What is the purpose of Order By clause in SQL? Explain with the help of suitable 2
example.

22. Write a program to create a series object using a dictionary that stores the number 2
of students in each house of class 12B of your school.

Note: Assume four house names are Beas, Chenab, Ravi and Satluj having
18, 2, 20, 18 students respectively and pandas library has been imported as
pd.

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


OR
Mention any four ways to manage e waste

24. What will be the output of the following code: 2


>>>import pandas as pd
>>>A=pd.Series(data=[35,45,55,40])
>>>print(A>45)

25. Carefully observe the following code: 2

import pandas as pd
Year1={'L1':5000,'L2':8000,'L3':12000,'L4': 18000}
Year2={'X' :13000,'Y':14000,'Z':12000}
totSales={1:Year1,2:Year2}
df=pd.DataFrame(totSales)
print(df)

Answer the following:

i. List the index of the DataFrame df


ii. List the column names of DataFrame df.
SECTION C
26. Write outputs for SQL queries (i) to (iii) which are based on the given table 3
ORDER:

TABLE: ORDER
CNO CNAME CITY QUANTITY DOP
C01 GURPREET NEW DELHI 150 2022-06-11
C02 MALIKA HYDERABAD 10 2022-02-19
C03 NADAR DALHOUSIE 100 2021-12-04
C04 SAHIB CHANDIGARH 50 2021-10-10
C05 MEHAK CHANDIGARH 15 2021-10-20

i. SELECT LENGTH(CNAME) FROM ORDER WHERE


QUANTITY>100;
ii. SELECT CNAME FROM ORDER WHERE
MONTH(DOP)=3;
iii. SELECT MOD (QUANTITY, DAY(DOP)) FROM ORDER
WHERE CITY= „CHANDIGARH‟;
27. Write a Python code to create a DataFrame with appropriate column headings 3
from the list given below:

[[101,'AMIT',98],[102,'RAJVEER',95],[103,'SAMAR' ,96], [104,'YUVI',88]]

28. Consider the given DataFrame „BOOK‟: 3

Name Price
0 Nancy Drew 150
1 Hardy boys 180
2 Diary of a wimpy kid 225
3 Harry Potter 500

Write suitable Python statements for the following:


i. Add a column called Special_Price with the following data:
[135,150,200,440].
ii. Add a new book named ‘The Secret' having price 800.
iii. Remove the column Special_Price.
29. Anita has recently shifted to a new city and school. She does not know many 3
people in her new city and school. But all of a sudden, someone is posting
negative, demeaning comments on her social networking profile etc.

She is also getting repeated mails from unknown people. Every time she goes
online, she finds someone chasing her online.

i. What is this happening to Anita?


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. Based on table STUDENT given here, write suitable SQL queries for the 3
following:

Roll No Name Class Gender City Marks


1 Abhishek XI M Agra 430
2 Prateek XII M Mumbai 440
3 Sneha XI F Agra 470
4 Nancy XII F Mumbai 492
5 Himnashu XII M Delhi 360
6 Anchal XI F Dubai 256
7 Mehar X F Moscow 324
8 Nishant X M Moscow 429
i. Display gender wise highest marks.
ii. Display city wise lowest marks.
iii. Display total number of male and female students.
OR
Discuss the significance of Group by clause in detail with the help of suitable
example.
SECTION D
31. Write suitable SQL query for the following: 5
i. Display 7 characters extracted from 7th left character onwards from the
string ‘SHINING WORLD’.
ii. Display the position of occurrence of string ‘COME’ in the string
‘WELCOME TO NEW ERA’
iii. Round off the value 53.78 to one decimal place.
iv. Display the remainder of 100 divided by 9.
v. Remove all the expected leading and trailing spaces from a column
EMPID of the table „EMP‟.
OR
Explain the following SQL functions using suitable examples.
i. LCASE()
ii. RTRIM()
iii. MID()
iv. YEAR()
v. POWER()

32. Alpha Computer services Ltd. is an international educational organization. It is 5


planning to set up its India campus at Mumbai with its head office in Delhi. The
Mumbai office campus has four main buildings-ADMIN, ACCOUNTS,
EXAMINATION and RESULT.
You as a network expert have to suggest the best network related solutions for
their problems raised in (i) to (v), keeping in mind the distances between the
buildings and other given parameters.

MUMBAI CAMPUS
DELHI HEAD OFFICE
ACCOUNTS
EXAMINATION

ADMIN RESULT

Shortest distances between various buildings:


ADMIN TO ACCOUNTS 55 m
ADMIN TO EXAMINATION 90 m
ADMIN TO RESULT 50 m
ACCOUNTS TO EXAMINATION 55 m
ACCOUNTS TO RESULT 50 m
EXAMINATION TO RESULT 45 m
DELHI Head Office to MUMBAI 2150 m
campus

Number of computers installed at various buildings are as follows:


ADMIN 110
ACCOUNTS 75
EXAMINATION 40
RESULT 12
DELHI HEAD OFFICE 20
(i) Suggest the most appropriate location of the server inside the
MUMBAI campus (out of the four buildings) to get the best
connectivity for maximum number of computers. Justify your answer.
(ii) Suggest and draw cable layout to efficiently connect various buildings
within the MUMBAI campus for a wired connectivity.
(iii) Which networking device will you suggest to be procured by the
company to interconnect all the computers of various buildings of
MUMBAI campus?
(iv) Company is planning to get its website designed which will allow
students to see their results after registering themselves on its server.
Out of the static or dynamic, which type of website will you suggest?
(v) Which of the following will you suggest to establish the online face
to face communication between the people in the ADMIN office of
Mumbai campus and Delhi head office?
a) Cable TV
b) Email
c) Video conferencing
d) Text chat
33. Write Python code to plot a bar chart for India’s medal tally as shown below: 5

Also give suitable python statement to save this chart.


OR
Write a python program to plot a line chart based on the given data to depict the
changing weekly average temperature in Delhi for four weeks.

Week=[1,2,3,4]
Avg_week_temp=[40,42,38,44]
SECTION E
34. Shravya, a database administrator has designed a database for a clothing 1+1+2
shop. Help her by writing answers of the following questions based on the
given table: TABLE: CLOTH

CCODE CNAME SIZE COLOR PRICE DOP


C001 JEANS XL BLUE 990 2022-01-21
C002 T SHIRT M RED 599 2021-12-12
C003 TROUSER M GREY 399 2021-11-10
C004 SAREE FREE GREEN 1299 2019-11-12
C005 KURTI L WHITE 399 2021-12-07
i. Write a query to display cloth names in lower case.
ii. Write a query to display the lowest price of the cloths.
iii. Write a query to count total number of cloths purchased of medium
size.
OR (Option for part iii only)

Write a query to count year wise total number of cloths purchased.


35. Mr. Lalit, a data analyst has designed the DataFrame df that contains data about
Computer Olympiad with ‘CO1’, ‘CO2’, ‘CO3’, ‘CO4’, ‘CO5’ as indexes shown
below. Answer the following questions:

School Tot_students Topper First_Runnerup


CO1 PPS 40 32 8 1+1+2
CO2 JPS 30 18 12
CO3 GPS 20 18 2
CO4 MPS 18 10 8
CO5 BPS 28 20 8

A. Predict the output of the following python statement:


i. df.shape
ii. df[2:4]
B. Write Python statement to display the data of Topper column of indexes CO2
to CO4.
OR (Option for part iii only)
Write Python statement to compute and display the difference of data of
Tot_students column and First_Runner up column of the above given DataFrame.
KENDRIYA VIDYALAYA SANGATHAN,JAMMU REGION
INFORMATICS PRACTICES (065)
SAMPLE PAPER–SET-09
PAPER 2022-23
CLASS-XII
Time:-3 Hours Max. Mark:70

General Instructions:
1. This question paper contains five sections, Section A toE.
2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 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 03 Long Answer type questions carrying 05 marks each.
7. Section E has 02 questions carrying 04 marks each. One internal choice is given in
Q35 against part c only.
8. All programming questions are to be answered using Python Language only.

Q 1:
The following code create a dataframe named „D1‟ with _______________ columns.
import pandas as pd
D1 = pd.DataFrame([1,2,3] )

a) 1
b) 2
c) 3
d) 4

Q2: Ravi, a student of class XII, wants to check whether a dataframe MyDF has any missing
values. What python statement he should write to do so?

Q3: The ______________ attribute of dataframe is used to get the number of axis in
Dataframe.
Q 4 Pyplot‟s _____________ function is used to create line charts.
Q5: The command used to give a heading to a graph is _________
a. plt.show()
b. plt.plot()
c. plt.xlabel()
d. plt.title()
OR

________________ describe the number of data points that fall within a specified range of
values.

Q6: Mohit is trying to create a histogram of “STEP” type with 10 bins. Help him to identify the
correct statement from the following statements:-
i. Plt.hist(x,bins=10, histype=”barstacked”)
ii. Plt.hist(x,bins=11)
iii. Plt.hist(x, bins=10, histype=”step”)
iv. Plt.hist(x, bins=10, histytpe=”Dashed”)

Q7 : Write the name of the python package used for 2D graphics.


Q 8: Write the full form of the followings:-
(a) DDL
(b) DML

Q9 : Mr. Sharma is trying to write a query, but missing a keyword in the query given below.
Which of the following keywords / operator will you suggest him to complete the following
query :-
SELECT ____________ dept_name FROM Office.
(a) ALL (b) From (c ) DISTINCT (d) *
OR
Which data type would you like to prefer for a column which have alpha-numeric values and
have a fixed length.

Q 10 .What will be the output of the following query :-


SELECT TRUNCATE(153.664,2) ;
Q11. What are the constraints ?
Q12 . Write any two examples of DDL statement.
Q13. Write an SQL statement to extract 4 characters from the 4th left character from the string
“SANGATHAN”.
Q 14 . Which of these is not a communication channel ?
(a ) Satellite (b) Microwave (c ) Radio wave (d) Wi-Fi

Q15: Expand the following terms :-


(i) Wi-Fi
(II) NIU

Q 16 : KVS has four schools spread across the JAMMU City. All the computers of computer labs
of all the 04 KVs have been connected through a Computer Network. Which type of network is
this ?
OR
Which device is used to regenerate a digital signal?

Q17: Expand the following terms :-


OSS, W3C

Q18: Define the term IPR ?


OR

What is the use of HTTPS ?


SECTION - B

Q 19: Given a series that stores the number of students in each cIass of a KV. Write python
statement to find out the maximum and minimum number of students in any of the class. The
given series has been created with the help of following statement:-
Strength = pd.Series( [47,39,52, 40, 42, 37, 50, 45, 47, 50, 43, 42])

Q 20: Write the output of the following Code :-


Import pandas as pd
temperature=pd.Series(,‘Jammu’:44, ‘Srinagar’:37, ‘Delhi’:46, ‘Agra’:48, Bangalore:’32-)
print(temperature[temperature<40])

Q 21: What are the differences between a Series and a DataFrame?

Q22: What is the use of matplotlib and pyplot ?

Q 23: Define the following terms :-


(a) Open Source Software (b) Freeware
OR
List any two health hazards related to excessive use of Technology.
Q 24: Mr. Honey wants to plot a bar chart for the given set of values of Class on X axis and
number of students in the class on Y axis. Write the appropriate python statement in order to
complete the code to perform the following operations:-
i. To plot the bar graph in statement 1.
ii. To display the graph in statement 2.
import matplotlib.pyplot as plt
Clas=*‘IX’, ‘X’, ‘XI’, ‘XII’+
Std=[38, 42, 47, 40]
_____________________ Statement 1
_____________________ Statement 2
OR
Mr. Sahni wants to draw a histogram using a list of element. He is trying to convert the
list into an array and writing a piece of code but getting confused about the name of some
functions and statements. Help him to complete the code to perform the following operations for
the missing statements, give below:-
i. To set the title as “Historgram”
ii. To provide the Y-axis label as “Students”
Import matplotlib.pyplot as plt

import numpy as np

fig.ax = plt. subplots (1, 1)

a=np.array ( [ 26, 59, 44, 39, 80, 66, 24, 31, 22, 30, 85 ])

ax.hist ( a. bins = [0, 10, 20, 30, 40,50 ] )

__________________________ Statement 1

ax.set_xticks ( [ 0, 10, 20, 30, 40, 50 ])

ax.set_xlabel(“Percentage”)

___________________________ Statement 2

plt.show( )
Q 25: Define the following terms :-
(a) PRIMARY KEY (b ) FOREIGN KEY
OR

Observe the following tables PRODUCTS and CUSTOMERS and answer the following
questions :-
PRODUCTS

PID PNAME PRICE CID

P001 SOAP 45.00 C01

P002 PERFUME 285.00 C03

P003 SHAMPOO 139.00 C05

CUSTOMERS

CID CNAME

C01 ABHINAV

C05 MANYA

C02 NAMAN

C03 RIYA
i. What is degree of the table PRODUCTS ? What is the Cardinality of the table
CUSTOMERS ?
ii. What will be the Degree and Cardinality of the CARTESIAN PRODUCT of these
two relations?

SECTION C

Q 26 : Consider the variable var having value 5649.7438

Write the SQL statement to:

a. round it off to 02 decimal places.


b. Round it to 02 places before the decimal.
c. Limit the value upto two decimal places without rounding off it.

OR
What will be the output of the following SQL Statements:

a. Select instr(“This is my wrist watch”,”is”);


b. Select right(“Informatics Practices”,5);

Select concatenate(left(“Informatics”,5), right(“It is a wrist watch”,6));

Q27 : What is the difference between the ORDER BY and GROUP BY clause? Explain with
suitable examples.
Q 28: Consider the table SALESMAN with the following data :
SALESMAN

SID SNAME SALARY DOJ

A012 KAVYA SHARMA 30000 29-10-2019

F035 MANAV GUPTA 42000 18-03-2017

S020 GOVIND RAM 32500 29-03-2020

A054 VINOD RAINA 57000 16-04-2016

Write SQL queries using SQL functions to perform the following operations :-
i) Display the Salesman name and month name of the Date of Joining.
ii) Display the name of the weekday for the date of joining of Salesman.
iii) Display the position of occurrence of letter „O‟ in Salesman name.

Q 29 .Given a list that stores the registered BPL persons in some states :
BPL=[1247, 5498, 2387, 4139, 2496, 8921, 3749, 4458]
Write python code to perform the following operations :
i. Create a Series object namely MySeries using the above list BPL.
ii. Print the largest number of registered BPL holders.
iii. Print the states having more than 4000 registered BPL holders.

OR
Write the output of the following code :
import numpy as np
array1=np.array([25,32,140,60,85,113,65])
print(array1[1:4:2])
print(array1[-1:-4:-1])
print(array1[:5:2])

Q 30 : Given a dataframe SALES stroing sale of fruits in Kilograms as shown below:


Apple Grapes Banana Guava
Jammu 240 25 123 94
Reasi 76 68 98 57
Udhampur 164 114 95 125
Srinagar 375 180 95 115

Assuming that the dataframe SALES is available, write code to do the following :-
i. Total Sale for each city.
ii. Print details of the city with maximum sale of Guava.
iii. Total sale for each Fruit type.
OR
Consider the dataframeMyDF given as under :

Emp_id Name Designation City Salary

0 E001 Ritvi Clerk Gurugram 32000

1 E025 Riya Programmer Delhi 65000

2 E034 Gaurav Data Analyst Bangalore 95000

3 E016 Kanishka Manager Mumbai 87000

Write a program in python to create the above dataframe using dictionary and print only the
Name, Designation and Salary for all rows.
SECTION D
Q 31 : Consider the following table “STUDENT”. Write SQL commands for the following
statements :-
STUDENT
Adm_No Class Name VOC_SUBJ DOB

21035 11 Abhinandan Marketing 21-10-2007

32149 12 Urvi Info. Tech. 25-04-2006

30587 10 Shalini Info. Tech. 21-09-2008

31543 11 Sneha Salesmanship 19-11-2007

12345 12 Ritu Banking 08-08-2006

i) Display the details of the students is the ascending order the class in which they are
studied.
ii) Display the different Vocational Subjects offered by the School.
iii) To display the class and no. of students in each class.
iv) Display the details of students whose date of birth is > 15-05-2007.
OR
Based on the above mentioned table write the output of the following SQL statements :-
i) SELECT * From STUDENT where Name LIKE “% i %”;
ii) SELECT NAME, monthname(DOB) from STUDENT;
iii) SELECT VOC_SUBJ, count(VOC_SUBJ) from STUDENT Group By VOC_SUBJ;
iv) SELECT Name, Adm_No, DOB from STUDENT Order By Adm_No;

Q 32 : Krishna University is setting up the academic blocks at Jalandhar and is planning to


connect them through a network. The University has 4 blocks named BIZZ BLOCK, TECHY
BLOCK, ADMIN BLOCK and HR BLOCK. The distance between these blocks and no. of computers
in each block are as follows :-

DISTANCE

ADMIN to BIZZ Block 50 m

ADMIN to TECHY 85 m
Block

ADMIN to HR Block 110

BIZZ to TECHY Block 45 m

BIZZ to HR Block 40 m

TECHY to HR Block 25 m
No. of Computers

ADMIN 25

TECHY Block 60

HR Block 110

BIZZ Block 30
i) Suggest the most suitable place to install the server and justify the answer.
ii) Suggest the placement of the Repeater in the network with justification
OR
a) Suggest the device to be placed in each of these blocks to efficiently connect all the
computers with justification
The university is planning to connect the ADM Block to KOLKATA, which is more than
1500 Kms from University. Suggest an economic way to connect it with reasonably high
speed with justification

Q 33 : Consider the following graph . Write the code in python to draw bar graph to show
percentage of following students.

OR
Write code in python to show the data using histogram.

SECTION E
Q 34: Write the SQL functions which will perform the following operations:
i To display the day of the month of the current date .
ii To display the length of string , “ hello “.
iii To display the name of the day eg, Friday or Sunday from your date of
birth, dob.
iv To display the string in upper case „I love india‟

Q 35: Consider the following Data Framedf and answer any four out of five from (i) to (v)
Name Rollno English Hindi Maths Ssc Science
0 Anita 1 55 45 87 67 70
1 Sunita 2 67 65 90 87 56
2 Radha 3 78 76 98 90 78
3 Anis 4 98 87 78 45 87
4 Kaushal 5 45 58 90 69 98

i) Write statement to display name and rollno only.


ii) The teacher needs to know the marks scored by the student with roll number 4. Help her to
identify the correct set of statement/s from the given options :

a. df1=df[df[„rollno‟]==4]
print(df1)
b. df1=df[rollno==4]
print(df1)
c. df1=df[df.rollno=4]
print(df1)
d) df1=df[df.rollno==4]
print(df1)

iii) Which of the following statement/s will delete column „Total‟ from the dataframe?

i.df.pop(„Total‟)
ii. del df[„Total‟]
iii.del (df.Total)
iv. df.del(„Total‟)

Choose the correct option:


a. both (i) and (ii)
b. only (ii)
c. (i), (ii) and (iii)
d. (i), (ii) and (iv)

iv) Write command to add total column to dataframe named „total‟ which stores the total of all
the subjects mentioned in the df.
SAMPLE QUESTION PAPER 10
CLASS XII

INFORMATICS PRACTICES (065)


TIME: 3 HOURS M.M.70

General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 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 03 Long Answer type questions carrying 05 marks each.
7. Section E has 02 questions carrying 04 marks each. One internal choice is
given in Q35 against part c only.
8. All programming questions are to be answered using Python Language only.

PART A
1. Data Communication systems spanning states, countries or the whole world is 1
______ .
a. PAN
b. LAN
c. MAN
d. WAN
2. Which of these is not a cyber crime: 1
a. Cyber stalking
b. Cyber trolling
c. Copyright
d. Cyber bullying
3. Which amongst the following is not an example of browser ? 1
a. Chrome
b. Firefox
c. Avast
d. Edge
4. Write the output of the following SQL command. 1
SELECT round(435.6789,1);
a. 435.7
b. 435.678
c. 435
d. 435.68
5. The rtrim() function in MySql is an example of . 1
a. Math function
b. Text function
c. Date Function
d. Aggregate Function
6. Which of the following software can be associated with a trial period? 1
a. Shareware
b. Freeware
c. Open Source
d. None of the above
7. Write the SQL command that will display the current date and time 1
a. SELECT DATE( );
b. SELECT CURRENT( );
c. SELECT DATETIME( );
d. SELECT NOW( );
8. The______clause of SELECT query allows us to select only those rows in the 1
result that satisfy a specified condition.
a. FROM
b. WHERE
c. ORDER BY
d. GROUP BY
9. What will be the order of sorting in the given query? 1
SELECT customer_id, customer_name
FROM customers
ORDER BY customer_id, customer_name

a. Firstly on customer_id and then on customer_name


b. Firstly on customer_name and then on customer_id
c. Firstly on customer_id but not on customer_name
d. None of the mentioned
10. Given a Pandas series called Orders, the command which will display the 1
first 3 rows is __________________.
a. print(Orders.HEAD(3))
b. print(Orders.Head(3))
c. print(Orders.heads(3)
d. print(Orders.head(3))
11. Which of the following is not a valid plotting function of pyplot? 1
a. bar( )
b. hist( )
c. histh( )
d. barh( )
12. __________ method in Pandas can be used to change the index of 1
rows and columns of a Series or Dataframe :
a. rename()
b. reindex()
c. reframe()
d. none of the above
13. Mr. Sham received an email warning him of closure of his bank accounts if he 1
did not update his banking information immediately. He clicked the link in the
email and entered his banking information. Next day, he got to know that he was
cheated. This is an example of _______.
a. Online Fraud
b. Identity Theft
c. Plagiarism
d. Phishing
14. Which of the following clause can be used with Group By? 1
a. Having
b. Where
c. Order by
d. None
15. Stealing someone’s intellectual work and representing it as your own is known 1
as ______________.
a. Hacking
b. Plagiarism
c. Copyright
d. Patent
16. Which of the following appears harmless but actually performs malicious 1
functions such as deleting or damaging files.
a. WORM
b. Virus
c. Trojan Horse
d. Malware
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) : Digital footprint is the trail of data we leave behind when we visit 1
any website (or use any online application or portal) to fill-in data or perform any
transaction.
Reason (R) : While online, all of us need to be aware of how to conduct
ourselves, how best to relate with others and what ethics, morals and values to
maintain
18. Assertion (A) : Professionals and developers are using the pandas library in data 1
science and machine learning.
Reason (R) : pandas is an open source Python library which offers high
performance, easy-to-use data structures and data analysis tools.
PART B
19. What is a website? How is it different from a webpage? 2
OR
Differentiate between star and bus topology.
20. Ravi, a database administrator needs to display house wise total number of 2
activities of ‘Ashoka’ and ‘Tagore’ house. He is encountering an error while
executing the following query:

SELECT HOUSE, COUNT (ACTIVITIES) FROM STUDENT ORDER


BY DESC NAME;

Help him in identifying the reason of the error and write the correct query by
suggesting the possible correction (s).
21. What is the purpose of Group By clause in SQL? Explain with the help of 2
suitable example.
22. Write a program to create a series from dictionary that stores classes (6,7,8,9,10) 2
as keys and number of students as values.
23. Mention any four steps to recycling and recovery under e-waste management. 2
OR
Write any four steps towards awareness about health concerns related to the usage
of technology.
24. What will be the output of the following code: 2
import pandas ad pd
import numpy as num
arr=num.array([31,47,121])
S1=pd.Series(arr, index=(1,11,111))
print(S1[111])
25. Write code statements for a dataframe df for the following – 2
(a) Delete an existing column from it.
(b) Delete rows from 3 to 6 from it
SECTION C
26. Write outputs for SQL queries (i) to (iii) which are based on the given table 3
SCHOOL:

TABLE: SCHOOL
ADN CLASS STREAM PERCENT DOA
A001 12 SCIENCE 90.32 2022-06-11
A002 11 COMMERCE 89.6 2022-02-19
A003 11 ARTS 78.12 2021-12-04
A004 12 SCIENCE 81.83 2021-10-10
A005 12 ARTS 95.13 2021-10-20

i. SELECT ROUND(PERCENT,1) FROM SCHOOL WHERE CLASS=11;


i.ii. SELECT MAX(CLASS) FROM SCHOOL WHERE PERCENT<90;
ii.iii. SELECT LENGTH(SUBSTR(STREAM,3,4)) FROM SCHOOL
WHERE STREAM= ‘SCIENCE’;
iii.
27. Write a Python code to create a DataFrame Result with appropriate column 3
headings from the list given below:

Arnab Ramit Samridhi Riya


Hindi 90 92 89 81
IP 91 81 91 71
Maths 97 96 88 67

28. Consider the given DataFrame ‘Forest’: 3

State GArea VDF


0 Assam 6789 423.70
1 Delhi 123 8.37
2 Kerala 33825 1225.00
Write suitable Python statements for the following:
i.i. Add a column called TArea with the following data: [5432,7896,4400].
ii.ii. Delete the columns having labels ‘VDF’
iii.iii. Rename the index as state1,state2 and State3.
iv.
29. Write any three important points should be kept in mind to reduce the risk of 3
cybercrime.
OR
What do you mean by the Indian IT Act? Write any three points.
30 Based on table EMPLOYEE given here, write suitable SQL queries for the 3
following:

Emp No Name Design Gen City Salary


1. Anushka Manager M Raipur 89430
2. Vandana HR M Durg 76440
3. Vibha Sales F Agra 65470
4. Dhrishti HR F BBSR 75492
5. Bhoomi Manager M Delhi 87360
6. Aditi Sales F NULL 68256
7. Monika Engineer F Mysore 83324
8. Priyanshi Engineer M Mysore 84429
i.Display total of salary gender wise.
ii.Display number of city excluding NULL value ,gender wise.
iii.Display maximum salary of the employee Design wise.

OR
Discuss the significance of ORDER by clause in detail with the help of suitable
example.

31 Write suitable SQL query for the following: 5


i. Display ‘VIDYA’ from string ‘KENDRIYA VIDYALAYA’.
ii. Display the position of occurrence of string ‘VANSH’ in the string
‘SURYAVANSH’.
iii. Find reminder of 17 divided by 3.
iv. Display the month name from ’01-April-2022’.
v. Remove all the expected trailing spaces from a column name of the table
‘STUDENT’.
OR
Explain the following SQL functions using suitable examples.
i. ROUND()
ii. LCASE()
iii. NOW()
iv. COUNT()
v. LEFT()

32 Jammu University is setting up its academic blocks at samba and (5)


planning to set up a network. The university has 3 academic blocks and one
human resource Centre as shown in the diagram given below:
(a) Suggest a cable layout of connection between the blocks.
(b) Suggest the most suitable place to house the server of the organization with
suitable reason.
(c) Which device should be placed/installed in each of these blocks to efficiently
connect all the computers within these blocks? (i)Switch/Hub (ii) Repeater
(d) The university is planning to link its sales counters situated in various parts of
the other cities. Which type of network out of LAN, MAN or WAN will be
formed?
(e) Which network topology may be preferred in each of these blocks?
33 Write a python program to plot a line chart based on the given data to depict the 5
runs scored by India.
Over=[10,20,30,40,50]
Runs=[0,25,50,75,100]
OR
ABC Enterprises is selling its products through three salesmen and keeping the
records of sales done
quarterly of each salesman as shown below:

Company is storing the above information in a CSV file “Qtrly_Sales.csv”. Mr.


Rahul is a programmer. Company has given him the responsibility to create the
program to visualize the above data. He wrote Python code but he is facing some
difficulties. Help him by giving the solutions of following situation:
1 import pandas as pd
2 import ________________ as plt
3 df=__________("Qtrly_Sales.csv")
4 df.plot(__________='bar', color=['red','blue','brown',’green’])
5 plt.___________('Quarterly Report')
6 plt.xlabel('Salesman')
7 plt.ylabel('Sales')
8 plt._________()

i. Choose the correct Python library out of following options in line 2


a. matplotlib b. matplotlib.plot
c. py.plot d. matplotlib.pyplot
ii. Choose the correct option to read the csv file in line 3
a. read_csv b. pd.read_csv
c. pd.get_csv d. get_csv
iii. Choose the correct option to select the type of graph in line 4
a. type b. kind
c. style d. graph

iv. Choose the correct word to give the heading in line 5


a. label b. heading
c. title d. caption

v. Choose the correct word to display the graph in line 8


a. plot() b. display()
c. showgraph() d. show()
34 Consider the following table Teacher. Write SQL commands for the following 4
Statements. Table : emp
No. Name Age Department Dateofjoin Salary Sex
1. Jugal 34 Computer 10/01/97 12000 M
2. Sharmila 31 History 24/03/98 20000 F
3. Sandeep 32 Maths 12/12/96 30000 M
4. Sangeeta 35 History 01/07/99 40000 F
5. Rakesh 42 Maths 05/09/97 25000 M
6. Shyam 50 History 27/06/98 30000 M

i.Write a query to count number of department.


ii.Write a query to display maximum age.
iii.Write a query to display average salary in which Date of join is before 12/07/96.
OR (Option for part iii only)
Write a query to display sum of all teachers’ salary in which Date of join is before
12/07/96.

35 Mr. Ankit is working in an organisation as data analyst. He uses Python Pandas . 4


He got a dataset of the passengers for the year 2010 to 2012 for January, March
and December. His manager wants certain information from him, but he is facing
some problems. Help him by answering few questions given below:
import pandas as ____________ #Statement 1
data={"Year":[2010,2010,2012,2010,2012],"Month":["Jan","Mar","Jan","Dec","
Dec"] ,"Passengers":[25,50,35,55,65]}
df=pd.____________________(data) #Statement 2
print(df)

i.i. Help him to fill the blank of statement1.


ii.ii. Help him to fill the blank of statement2.
iii.iii. He wants to print the number of passengers in “jan”.
OR
iv.Mr. Ankit wants to change the index of the Data Frame with [‘Air India’,
‘Indigo’, ‘Spicejet’, ‘Jet’, ‘Emirates’]. Write the correct statement to change the
index.
SAMPLE QUESTION PAPER 11
CLASS XII
INFORMATICS PRACTICES (065)
TIME: 3 HOURS M.M.70

General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 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 03 Long Answer type questions carrying 05 marks each.
7. Section E has 02 questions carrying 04 marks each. One internal choice is
given in Q35 against part c only.
8. All programming questions are to be answered using Python Language only.

PART A
1 The main computer in any network is called as 1
a. Client
b. Server
c. Hub
d. Switch
2 Sending the email to any cc means 1
a. Sending the mail with a carbon copy
b. Sending the mail without a carbon copy
c. Sending the email to all and hiding the address
d. All of the above
3 Which of the following reduce e-waste? 1
a. purchasing more and more gadgets
b. using them for a short time and then discarded
c. good maintenance
d. all of these
4 Which of the following is not a violation of IPR? 1
a. Plagiarism
b. Copyright Infringement
c. Patent
d. Trademark Infringement

5 If column “Marks” contains the data set {25, 35, 25, 35, 38}, what will be the output after the 1
execution of the given query?

SELECT DISTINCT MARKS FROM STUDENTS;

a) 25, 35, 25, 35, 38


b) 25, 25, 35, 35
c) 25, 35, 38
d) 25, 25, 35, 35
6 The term FLOSS is associated with: 1
a) Non-open source software
b) proprietary software
c) Open Source software
d) None of these
7 Which of the following sublanguages of SQL is used to query information from the data base 1
and to insert tuples into, delete tuples from, and modify tuples in the database?

a) DML (Data Manipulation Language)


b) DDL (Data Definition Language)
c) Query
d) Relational Schema
8 In SQL, which command is used to SELECT only one copy of each set of duplicable rows 1

a) SELECT DISTINCT
b) SELECT UNIQUE
c) SELECT DIFFERENT
d) All of the above
9 An attribute in a relation is foreign key if it is the _________key in any other relation. 1
a) Candidate
b) Primary
c) Super
d) Sub
10 Pandas mainly used for 1
a) Data Recovery
b) Data Backup
c) Data Visualizations
d) Data Analysis
11 1
____________is the practice of taking someone else's work or ideas and passing them off as
one's own:
a. Plagiarism
b. Copyright
c. Patent
d. All of the above
12 You can create a Python pandas series using? 1
a) sequence
b) ndarray
c) tuple
d) all of the above
13 An application that can be accessed via a web browser, over a network connection is called a 1
___________.
a. Web-based application
b. Server-based application
c. Both a) and b)
d. None of the above
14 Which of the following queries contains an error? 1
a) Select * from emp where empid = 10003;
b) Select empid from emp where empid=10006;
c) Select empid from emp;
d) Select empid where empid=1009 and lastname=’GUPTA’;
15 With SQL, how can you return the number of not null record in the Project field of “Students” 1
table?
a) SELECT COUNT (Project) FROM Students
b) SELECT COLUMNS (Project) FROM Students
c) SELECT COLUMNS (*) FROM Students
d) SELECT COUNT (*) FROM Students
16 The legal and regulatory aspects of the internet refer to..................... 1

a. Cyber Space
b. Cyber crime
c. Criminal law
d. IT act
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) The fraudulent practice of sending emails purporting to be from reputable 1
companies in order to induce individuals to reveal personal information, such as passwords
and credit card numbers.
Reason (R): While online, all of us need to be aware of how to conduct ourselves, how best to
relate with others and what ethics, morals and values to maintain.
18 Assertion (A): pandas is an open source Python library which offers high performance, easy- 1
to-use data structures and data analysis tools.
Reason (R): Professionals and developers are using the pandas library in data science and
machine learning.
PART B
19 What is the difference between STAR and BUS topologies? 2
OR
Why we use a domain name address in place of IP address of the Server to access any web
site?
20 Anjali writes the following commands with respect to a table employee having fields, empno, 2
name, department, commission.
Command1: Select count (*) from employee;
Command2: Select count(commission) from employee;
She gets the output 4 for the first command but get an output 3 for the second command.
Explain the output with justification.
21 Write difference between DELETE and DROP command. Explain with suitable examples of 2
each.
22 Write a python code to create a dataframe with appropriate headings from the list given 2
below:
['S101', 'Amy', 70], ['S102', 'Bandhi', 69], ['S104', 'Cathy', 75], ['S105','Gundaho', 82]

23 What do you understand by e-waste management? Explain. 2


OR
Explain Digital Rights Management. How can we protect our content?
24 Predict the output of the following code fragments. 2
x=np.array([1,2,3])
y=np.array([3,2,1])
z=x+y
print(z)
25 Write python code to do the following based on the given dataframe DF: 2
Rollno Name Age Marks
11 Aruna 18 68
12 Mohini 14 47
13 Kiya 13 78
14 Lakshmi 16 87
15 Ravisha 14 60

a) display students having marks more than 50


b) display name and marks column only
PART C
26 A Gift Gallery has different stores in India. Database Administrator Abhay wants to maintain 3
database of their Salesmen in SQL to store the data, He has decided that
Name of the database: GiftGallery
Name of the table: Salesman
Attributes of the tables: Scode – Numeric, Sname – Character 25, Address - Character 25,
Dojoin - Date, Sales – Numeric and Area – Character 10
Consider the following records in ‘Salesman’ table and answer the given questions:

i. State the command that will give the output as:


Sname
Shushant
Priya
ii. Which of the following commands will display the details of all sales record of North Area,
regardless of case (whether North / NORTH / north):
iii. Help Priya to display sname and sales of east and west areas
27 Write a Pandas program to create and display a DataFrame from a specified dictionary data 3
which has the index labels.

Sample DataFrame:
exam_data = {'name': ['Anastasia', 'Dima', 'Katherine', 'James', 'Emily', 'Michael', 'Matthew',
'Laura', 'Kevin', 'Jonas'],
'score': [12.5, 9, 16.5, np.nan, 9, 20, 14.5, np.nan, 8, 19],
'attempts': [1, 3, 2, 3, 2, 3, 1, 1, 2, 1],
'qualify': ['yes', 'no', 'yes', 'no', 'no', 'yes', 'yes', 'no', 'no', 'yes']}
labels = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']

28 Write the code in pandas to create the following dataframes: 3


df1 df2
mark1 mark2 mark1 mark2
0 10 15 0 30 20
1 40 45 1 20 25
2 15 30 2 20 30
3 40 70 3 50 30
Write the commands to do the following operations on the dataframes
given above:
(i) To add dataframes df1 and df2.
(ii) To rename column mark1 as marks1in both the dataframes df1 and df2.

29 Rishi has to prepare a project on “Swachh Bharat Shreshth Bharat”. He decides to get 3
information from the Internet. He downloads three web pages (webpage1, webpage 2,
webpage 3) containing information on the given topic.
1. He read a paragraph on from webpage 1 and rephrased it in his own words. He finally
pasted the rephrased paragraph in his project.
2. He downloaded three images of from webpage 2. He made a collage for his project using
these images.
3. He also downloaded an icon from web page 3 and pasted it on the front page of his project
report.

i. Step1 An Example of __________


a. Plagiarism
b. Paraphrasing
c. copyright infringement
d. Intellectual Property right

ii. Step 2 An act of __________


a. plagiarism
b. copyright infringement
c. Intellectual Property right
d. Digital Footprints

iii. Step 3 An act of _________


a. Plagiarism
b. Paraphrasing
c. copyright infringement
d. Intellectual Property right
OR
Explain the role of online social media in our society. Negative & positive both.
30 Based on table CLUB given here, write suitable SQL queries for the following: 3

a. To show all information about the swimming coaches in the club.


b. To list names of all coaches with their date of appointment (DATOFAPP) in descending
order.
c. To display a report, showing coachname, pay, age and bonus (15% of pay) for all the
coaches.
OR
Explain each of the following with illustrations using a table
(i) Candidate Key (ii) Primary Key (iii) Foreign Key
PART D
31 Write suitable SQL query for the following: 5
i. Display 7 characters extracted from 7th left character onwards from the string ‘INDIA
SHINING’.
ii. Display the position of occurrence of string ‘COME’ in the string ‘WELCOME WORLD’.
iii. Round off the value 23.78 to one decimal place.
iv. Display the remainder of 100 divided by 9.
v. Remove all the expected leading and trailing spaces from a column userid of the table
‘USERS’.
OR
Explain the following SQL functions using suitable examples.
i. UCASE()
ii. TRIM()
iii. MID()
iv. DAYNAME()
v. POWER()
32 KVS consultants are setting up a secured network for their office campus at Gurgaon. They 5
are planning to have connectivity between 3 blocks and the head office at Mumbai. Answer
the questions (a) to (d) after going through the block positions in the campus and other details,
which are given below:

Distances between various buildings:


Block A to Block C 120m
Block A to Block B 55m
Block B to Block C 85m
New Delhi Campus to Head office 2060 Km
Number of computers:
Block A 32
Block B 150
Block C 45
Head office 10
a. Suggest a layout of connections between the blocks
b. Suggest the most suitable place to house the server with justification.
c. Which out of LAN/MAN/WAN is established when head office in Mumbai is connected
with Delhi office .
d. Suggest the placement of the following devices with justification:
i)Switch ii) Repeater
e. Which Protocol is used if Head office Mumbai wants to have video conferencing with
office in Delhi
33 Write a Python program to draw a line as shown below using given axis values with suitable 5
label in the x axis, y axis and a title.

OR
What will be the output of the following code:
import matplotlib.pyplot as plt
plt.plot([1,2,3],[4,5,1])
plt.show()
PART E
34 Write SQL queries for (i) to (iii) which are based on the table. 1+1+2
Table: TRANSACT

TRNO ANO AMOUNT TYPE DOT

T001 101 2500 Withdraw 2017-12-21

T002 103 3000 Deposit 2017-06-01

T003 102 2000 Withdraw 2017-05-12

T004 103 1000 Deposit 2017-10-22

T005 101 12000 Deposit 2017-11-06


(i)To display details of all transactions of TYPE Deposit.
(ii)To display the ANO and AMOUNT of all Deposits and Withdrawals done in the month of
October 2017
(iii)To display the last date of transaction (DOT) from the table TRANSACT for the
Accounts having ANO as 103.
OR (OPTION FOR PART iii ONLY)
To display all ANO, DOT of those persons from table TRANSACT who have amount less
than or equal to 3000 in ascending order of dot.
35 Suppose a data frame named df contains information about student having columns rollno, 1+1+2
name, class and section. Write the code for the following:
(i) Add one more column as fee
(ii) Rename column ‘fee’ as ‘qfee’
(iii) Write python code to delete column fee of data frame and display the df
OR (OPTION FOR PART iii ONLY)
Write the Python code to display the fee for the complete year from dataframe but column
‘fee’ has fee for one month .
Sample Paper 12
INFORMATICS PRACTICES (065)
Class XII

TIME: 3 HOURS M.M.70


General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 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 03 Long Answer type questions carrying 05 marks each.
7. Section E has 02 questions carrying 04 marks each. One internal choice is given in Q35 against
part c only.
8. All programming questions are to be answered using Python Language only.

SECTION A
1 Which of the following devices are used to connect dissimilar networks 1
a. Hub
b. Router
c. Bridge
d. Gateway
2 List two FOSS software? 1
3 Which of the following is not an example of e-waste? 1
a. Damaged Mouse
b. Unused Keyboard and
c. Broken Toys
d. Irreparable CPU
4 Write the output of the following SQL command. 1
select round(4392.7866, 3);
a. 4392.7860
b. 4392.7870
c. 4392.7880
d. 4392.7850
5 Predict the Output of below command: 1

SELECT Length(Left(“preparing for Class XII exam”,5))


6 The data generated by a website, mobile app or any other activity on the internet is known as 1
____________ digital footprint.
a) Active Digital Footprint
b) Passive Digital Footprint
c) Direct Digital Footprint
d) Indirect Digital Footprint

7 The INSTR() function in MySql is an example of ___________________. 1


a. Math function
b. Text function
c. Date Function
d. Aggregate Function
8 Which one of the following is an aggregate function? 1
a. ROUND()
b. MOD()
c. SUM()
d. Now()
9 What would be the output of the following command? 1
Select Monthname(‘2019-09-10’)

10 Which of the following is the right statement for creating dataframe from csv file. 1
a. df = pd.Read_Csv("CardioGoodFitness.csv")
b. df = pd.Read_csv("CardioGoodFitness")
c. df = pd.read_Csv("CardioGoodFitness.csv")
d. df = pd.read_csv("CardioGoodFitness.csv")

11 The command to display first 4 rows from series named “week” is __________________. 1
a. print(week.head (4))
b. print(week.Head(4))
c. print(week.heads(4))
d. print(week.Heads(4))
12 Series cannot be created using: 1
a. ndarray
b. dictionary
c. scaler value
d. Create_Series() method
13 What is the difference between static and dynamic website? 1
14 List the parameters of SUBSTR() function. 1
15 Mr Ramesh has written a book “Computer Advancements”. Another person Mr Vishal also 1
wrote the “Computer Technologies” in which he used one of the paragraphs of Ramesh’s
Book but has not mentioned/referred his name in his book. This is an example of
a. Identity theft
b. Plagiarism
c. Phasing
d. Cyber stalking
16 Being rude or mean to someone in an online social networking site or game is an example of 1
a. Identity theft
b. Cyber Harassing
c. Cyber Stalking
d. Cyber Bullying
Q17and 18 are ASSERTION AND REASONING based questions. Mark the correct choice
as:
i. Both A and R are true and R is the correct explanation for A
ii. Both A and R are true and R is not the correct explanation for A
iii. A is True but R is False
iv. A is false but R is True

17 Assertion (A): - Internet is a collection of networks 1


Reasoning (R):- WWW is collection of Interconnected hypertext documents
18 Assertion (A):- we import matplotlib to create charts in python. 1
Reasoning (R): in matplotlib there is pyplot which is used to create 2d charts.
SECTION B
19 Expand the following terms related to Computer Networks: 2
a. POP
b. URL
c. HTML
d. DNS
OR

Give two examples of each add-ons and plugins

20 Shania, database administrator needs to display Team wise total number of match played by 2
teams with 5 Bowlers and 6 Batsman. she is encountering an error while executing the
following query:

SELECT Team , COUNT (*) FROM Cricket GROUP BY Team


Have Bowlers==5 OR Batsman= ‘6’

Help her in identifying the reason of the error and write the correct query by suggesting the
possible correction (s).
21 Write Sql Command Implementing Monthname() and lcase() function along with output 2
22 Write a program to create a series object using a dictionary that stores the number of boys in 2
each from IX to XII your school.

Note: Assume four class names are Ninth, Tenth, Eleventh and twelfth having 10, 20, 12, 16
boys respectively and pandas library has been imported as pd.

23 List two health hazards related to excessive use of Technology. Also list two precautions to 2
be taken while using computers to avoid any health hazard.
OR
List any four net etiquettes.

24 What will be the output of the following code: 2


import pandas as pd
B=pd.Series(data=[45,50,55,45,78,54])
print(B>=55)
Carefully observe the following code:
25 2
import pandas as pd
D1={'R1':5000,'R2':8000,'R3':12000,'R4': 18000}
D2={'A' :13000,'B':14000,'C':12000}
D3={Y1:D1,Y2:D2}
df=pd.DataFrame(D3)
print(df)

Answer the following:


i. List index of the DataFrame df
ii. List the column names of DataFrame df.
SECTION C
26 Write outputs for SQL queries (i) to (iii) based on the given table Employee: 3

TABLE: EMPLOYEE
EID NAME SALARY Pcent DEPT DOJ
E01 GURPREET 20000 45 PHY 2022-06-11
E02 MALIKA 23000 56 CHEM 2022-02-19
E03 NADAR 15000 45 PHY 2021-12-04
E04 SAHIB 30000 67 CS 2021-11-10
E05 MEHAK 50000 78 CHEM 2021-06-20

i. SELECT LENGTH(NAME) FROM EMPLOYEE WHERE EPARTMENT=’CHEM’


ii. SELECT NAME FROM EMPLOYEE WHERE
MONTH(DOJ)=06;
iii. SELECT MOD (Pcent, DAY(DOJ)) FROM EMPLOYEE WHERE
DEPARTMENT= ‘PHY’;
27 Write a Python code to create a DataFrame with appropriate column headings from the list 3
given below:

[[‘INDIA’,'Gurman',101],[“Sri Lanka”,'Rajveer',102],[‘Japan’, 'Samar' ,103],


[‘Iran’,'Yuvraj',104]]
Print data whose name is ‘Yuvraj’

28 Consider the given DataFrame ‘Store’: 3

Name Price
0 Campus Shoes 1500
1 Washing Machine 12000
2 HP laptop 50000
3 Dell Laptop 45000

Write suitable Python statements for the following:


i. Add a column called Quantity with the following data:
[100,150,300,500].
ii. Add a new item namely Soap having price 50
iii. Rename the column Price with ‘Amount’
29 i. Stealing of identity online for financial benefit is called ______________ 3

ii. Chasing and keep track of activities of a person online is called ____________

iii. Fake Lottery email is an example of ______________

OR
Define CC licences, Trademark Infringement. Give two example for which copy right is
provided.

30 Based on table Players given below, write suitable SQL queries for the following Table: 3
players
PID Name Points Gender City Sports
2022 Abhishek 56 M Agra Hockey
4012 Prateek 76 M Mumbai Cricket
3456 Sneha 88 F Agra Football
4534 Nancy 90 F Mumbai Hockey
6745 Himnashi 67 M Delhi Football
2134 Anchal 88 F Dubai Volley Ball
3245 Mehar 77 F Moscow Cricket
3786 Nishant 56 M Moscow Badminton

i. Display Gender wise highest points


ii. Display Sports wise lowest marks.
iii. Display City Wise Max and Avg of points
Or
Why do we use having clause? what will happen if both where and having clauses are
used in single query

SECTION D
31 Write suitable SQL query for the following: 5
i. Display 8 characters extracted from 4th left character onwards from the string
‘CBSE Board Exam Year 2022’
ii. Display the position of occurrence of string ‘Exam’ in the string
‘CBSE Board Exam Year 2022’
iii. Find 7 to the power 3
iv. Display the remainder of 343 divided by 8.
v. Remove all the expected leading and trailing spaces from a column Name of the
table employees
OR
Explain the following SQL functions using suitable examples.
i. LCASE()
ii. RTRIM()
iii. MID()
iv. DAY()
v. POWER()

32 IT Care Ltd. an, international IT company is planning to set up its India campus at Delhi 5
with its head office in Mumbai. The Delhi office campus has four main buildings- ADMIN,
SALES, MANUFACTURE, and ACCOUNTS.

You as a network expert have to suggest the best network related solutions for their
problems raised in (i) to (v), keeping in mind the distances between the buildings and other
given parameters
ADMIN ACCOUNTS

MUMBAI Delhi Campus


MANUFACTURE SALES

Shortest distances between various buildings:


ADMIN TO ACCOUNTS 80 m
ADMIN TO SALES 190 m
ADMIN TO MANUFACTURE 150 m
ACCOUNTS TO SALES 95 m
ACCOUNTS TO MANUFACTURE 50 m
SALES TO MANUFACTURE 85 m

MUMBAI Head Office to DELHI campus 2000 KM

Number of computers installed at various buildings are as follows:


ADMIN 110
ACCOUNTS 75
EXAMINATION 40
RESULT 12
DELHI HEAD OFFICE 20

i) Where should be server placed among four buildings at Delhi campus?


ii) Which topology would you suggest for these blocks and why?
iii) Which networking device will you suggest for interconnecting all the computers
of various buildings? And why?
iv) Company is planning to get its website designed which will allow customers to
see different types of IT Offers and Products, provide suggestion and can apply
for featuring in advertisement. Out of the static or dynamic, which type of
website will you suggest?
v) Which of the following will you suggest to establish the online face to face
communication between the people in the ADMIN office of delhi campus and
Mumbai head office?
a) Cable TV b) Email c) Video conferencing d) Text chat

33 Write Python code to plot a bar chart for Mobiles sales for quarters 5
Also give suitable python statement to save this chart and assign file name ‘Mybar’.
OR
Write a python program to plot a line chart based on the given data to depict the
Monthly scoring rate of a batsman for four months and also assign suitable labels and title.

Month=[1,2,3,4]
Scoring rate=[140,132,148,164]
SECTION E
34 Ravi database administrator has designed a database for a Medical shop. Help him by writing 1+1+2
queries of the following questions based on the given table:

TABLE: Med_Shop

MCODE SNAME COLOR PRICE DOE


M001 Capsule BLUE 990 2022-01-26
M002 Tablet RED 599 2021-12-25
M003 Syrup GREY 399 2021-11-26
M004 Capsule GREEN 1299 2019-11-25
M005 Syrup WHITE 399 2021-12-28
i. Write a query to display Color names in lower case.
ii. Write a query to find the total number of medicine expire in year 25
iii. Write a query to find the average of Price for capsule
OR (Option for part iii only)

Write a query to get the expire month name of medicine


35 Given Below is DataFrame df that contains data about results of Schools participated in 1+1+2
national level sports and ‘NO1’, ‘NO2’, ‘NO3’, ‘NO4’, ‘NO5’ as indexes shown below.
Answer the following questions:

School Tot_students Topper First_Runnerup


NO1 APS 40 32 8
NO2 DPS 30 18 12
NO3 KVS 20 18 2
NO4 JNV 18 10 8
NO5 SBS 28 20 8

Predict the output of the following python statement:


i. df.shape
ii. df[1:3]
iii. Write Python statement to display the data of Topper column of indexes NO2
to NO5.
OR (Option for part iii only)

Write Python statement to compute and display the difference of data of Top
_students column and Topper column of the above given DataFrame.
KENDRIYA VIDYALAYA SANGATHAN, JAMMU REGION
SAMPLE PAPER SET 13
CLASS XII SUB: INFORMATICS PRACTICES (065)

TIME: 3 HOURS M.M.70


General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 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 03 Long Answer type questions carrying 05 marks each.
7. Section E has 02 questions carrying 04 marks each. One internal choice is
given in Q35 against part c only.
8. All programming questions are to be answered using Python Language only.

PART A

1. _____________ Topology is based on a central network which acts as hub 1


i. STAR
ii. MESS
iii. TREE
iv. BUS

2. Online personal accounts like Paytm account, Phonepe account etc. are examples of 1
i. Digital property
ii. Digital Wallets
iii. Digital Certificates
iv. Digital Signature

3. Discarded electrical or electronic devices are known as_? 1


i. Digital Repository
ii. E- Waste
iii. E-wallets
iv. E-Heap

4. In SQL, which keyword is used in select clause of SQL query to select only one copy of 1
each set of duplicate rows?

i. Unique
ii. Primary key
iii. Check
iv. Distinct
5. All aggregate functions except_______ignore null values in their input collection. 1

i. a.count(sal)
ii. count(*)
iii. avg()
iv. sum()

6. Linux, MySQL and Mozilla Firefox software come under_______ category. 1


i. Proprietary
ii. FOSS
iii. Freeware
iv. Shareware

7. Write the output of the following SQL commands 1


Select round(458.45,-1):

i. 450
ii. 460
iii. 458
iv. 500

8. The string function that returns the index of first occurance of substring is 1
i. insert()
ii. instr()
iii. instring()
iv. infstr()

9. Which one of the following functions is not a built in aggregate function in SQL? 1
i. avg( )
ii. max( )
iii. sum( )
iv. largest( )

10. Given a Pandas series called Sequences, the command which will display the first 4 rows is 1
i. print(Sequences.head(4))
ii. print(Sequences.Head(4))
iii. print(Sequences.heads(4)
iv. print(Sequences.Heads(4))
11. Select the correct statement 1
(a) import panda as pd
(b) import pandas as pd
(c) import pd as pandas
(d) import pd as panda

12. DataFrame in pandas can be created from which of the following? 1


i. Series
ii. List of Dictionaries
iii. Structured ndarray
iv. All of these

13. Which amongst the following is not an example of a browser? 1


i. safari
ii. opera
iii. Kaspersky
iv. Netscape
14. The NOW() function in MySql is an example of 1
a. Math function
b. Text function
c. Date Function
d. Aggregate Function

15. .............................. is a document that provides legally binding guidelines for the use and 1
distribution of software.

16. Using someone else’s twitter handle to post something, will be termed as: 1
a.fraud
b.identity theft
c.online stealing
d.violation

Q17 and 18 are ASSERTION AND REASONING based questions.


Mark the correct
i. Both A and R are true and R is the correct explanation for A
ii. Both A and R are true and R is not the correct explanation for A
iii. A is True but R is False
iv. A is false but R is True
17. Assertion (A): - There is a centralized control in case of Star topology. 1

Reasoning (R):- A hub can transfer data packets only to the intended node in a
network.

18. Assertion (A):- DataFrame is a two dimensional labelled array. Its column type can 1
be heterogeneous i.e.,of varying types

Reasoning (R): - We need a DataFrame with a Boolean index to use the Boolean
indexing.

PART B
19. Name four softwares used for video conferencing. 2

OR
Write the difference between Hub and Switch

20. Write a query to display name, job, salary and hiredate of employees who are hired 2
between may 20, 1990 and December 31,1991. Order the query in ascending order of
hiredate. (table emp)

21. What is the purpose of Order By clause in SQL? Explain with the help of suitable 2
example.

22. Write code to change the indexes of the given series object in any random order. 2
s1=pd.Series(data=[100,200,300,400],index=[‘I’,’J’,’K’,’L’])

23. Write about preventive measures about health concerns due to overuse of Digital 2
technology.
OR
How can we prevent identity thefts ?
24. What will be the output of the following code: 2
>>>import pandas as pd
>>>A=pd.Series(data=[25,45,70,40])
>>>print(A<=40)
25. Consider the following DataFrame, classframe 2
Rollno Name Class Section CGPA Stream
St1 1 Aman IX E 8.7 Science
St2 2 Preeti X F 8.9 Arts
St3 3 Kartikey IX D 9.2 Science
St4 4 Lakshay X A 9.4 Commerce
Write commands to :
i. Add a new column ‘Activity’ to the Dataframe
ii. Add a new row with values ( 5 , Mridula ,X,F, 9.8, Science)

SECTION C
26. Sanjeev is executing the following queries: 3

i) Select len(“ OMICRON VARIENT “);


ii) Select len(ltrim(“ OMICRON VARIENT “))
iii) Select len(rtrim(“ OMICRON VARIENT “))

(There are 3 spaces before and after the string)


What is the output of the following queries.

27. Write a python code to create a dataframe with appropriate headings from the list 3
given below
[‘S101’, ‘Amy’, 70], [‘S102’, ‘Bandhi’, 69], [‘S104’, ‘Cathy’, 75], [‘S105’,’Gundaho’, 82]
28. Consider the dataframe SHOP given below: 3
Item Qty City Price
101 Biscuit 100 Delhi 10
102 Jam 110 Kolkata 25
103 Coffee 200 Kolkata 55
104 Sauce 56 Mumbai 55
105 Chocolate 170 Delhi 25
Write commands to :
(i) Write short code to show the information having city=”Delhi”
(ii) Calculate Qty* Price and assign to column ‘Net_Price’
(iii) Display name of all rows

29. Sumita has recently shifted to a new city and school. She does not know many 3
people in her new city and school. But all of a sudden, someone is posting
negative, demeaning comments on her social networking profile etc.

She is also getting repeated mails from unknown people. Every time she goes
online, she finds someone chasing her online.

i. What is this happening to Sumita?


ii. What immediate action should she take to handle it?
Is there any law in India to handle such issues? Discuss briefly.

Or
What is Intellectual property? What are the different types of Intellectual property?
What things can not be copyrighted?
30. Consider the table – Teacher :
No Name Age Department Dateofadm Salary Gender
1 Jugal 34 Computer 1997/01/10 12000 M
2 Sharmila 31 History 1998/03/24 20000 F
3 Sandeep 32 Maths 1996/12/12 30000 M
4 Sangeeta 35 History 1999/07/01 40000 F
5 Rakesh 42 Maths 1997/09/05 25000 M
6 Shyam 50 History 1998/06/07 30000 M
7 Shivam 44 Computer 1997/02/25 21000 M
8 Shalakha 33 Maths 1997/07/31 20000 F
Predict the output for given queries:
a. select sum(salary) from teacher where gender=’M’ and department in
(‘Computer’, ‘Maths’);
b. select max(age)+min(age) from teacher where gender=’F’;
c. select department, avg(sal) from teacher group by department;
OR
Discuss the significance of Group by clause in detail with the help of suitable
example.

SECTION D
31. Heena has created a table ‘ student’ with the attributes id varchar(20), name 5
varchar(50), city varchar(50), contactno varchar(11)
She wants to write the queries for the following. Help her write the queries for
the
same
i. To extract the first four characters from the name
ii. To display the names in the lower case
iii. To display the characters from 4th position of column city
iv. Display the remainder of 100 divided by 9.
v. Remove all the expected leading and trailing spaces from a column Name
of the table ‘Student’.
OR
Predict the output for the following queries
(* represents space)
i. select trim(‘ *To*Be*Continued***’)
ii. select left(‘preoccupied’, 4)
iii. select mid(‘informatics practices’, 6,5)
Explain the following SQL functions using suitable examples.

iv. DAYNAME()
vi. POWER()

32. Be Happy Corporation has set up its new centre at Noida, Uttar Pradesh for its office 5
and web-based activities. It has 4 blocks of buildings.

The distance between the various blocks is as follows:


A to B 40 m
B to C 120m

C to D 100m

A to D 170m

B to D 150m

A to C 70m
Numbers of computers in each block

Block A 25
Block B 50

Block C 125

Block D 10

(a) Suggest and draw the cable layout to efficiently connect various blocks of buildings
within the Noida centre for connecting the digital devices.

(b) Suggest the placement of the following device with justification

(i) Repeater

(ii)Hub/Switch

(c) Suggest the most suitable Block to house the server in the company at Noida.

(d)Which kind of network (PAN/LAN/WAN) will be formed if the Noida office is


connected to its head office in Mumbai?

(e) Which fast and very effective wireless transmission medium should preferably be
used to connect the head office at Mumbai with the centre at Noida?
33. Write the python code to plot the given histogram with the following data 5
set:
Score=[8,10,15,25,28,35,47,49,50,63,67,53,57,58,69]

Also give suitable python statement to save this chart.


OR
Write a python program to plot the below given line chart with suitable label in
the x axis, y axis and a title.

Also give suitable python statement to save this chart.

SECTION E
34. Shreya, a student has designed a database for a student for her teacher. Help her 1+1+1+1
by writing answers of the following questions based on the given
table: student
No Name Stipend Stream mark Grade
1 Karan 400 CS 78 B
2 Kiran 500 IP 88 A
3 Robert 450 BIO 89 A
4 Rubina 200 CS 92 A
5 Vikas 300 BIO 95 A
6 Rohan 500 CS 80 NULL
Write the queries for the following table student:
1). Display the records in the ascending order of Name
ii). Display the number of students in a particular Stream
iii). Display the average marks of the students stream wise
iv). Display the student who got the maximum marks

OR (Option for part iii &iv only) 2

iii.Write a query to display maximum marks in each Stream.

35. System analyst of ABC corporation has designed the DataFrame df that contains
data about various departments of the company as shown below. Answer the
following questions:

Dept Tot_Employee Avg_age Avg_salary


1 Actt 40 32 25000 1+1+2
2 Sales 30 28 35000
3 HR 20 28 32000
4 Mkt 18 30 40000
5 Prod 28 40 42000

A. Predict the output of the following python statement:


i. df.size
ii. ii. df[1:3]
B. Write Python statement to display the data of Salay column of indexes 2
to 4.
OR (Option for part iii only)
Write Python statement to change the value of salary column to 40000 of
the above given DataFrame.
KENDRIYA VIDYALAYA SANGATHAN, JAMMU REGION
SAMPLE PAPER SET 14
CLASS XII SUB: INFORMATICS PRACTICES
TIME: 3 HOURS M.M.70
General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 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 03 Long Answer type questions carrying 05 marks each.
7. Section E has 02 questions carrying 04 marks each. One internal choice is
given in Q35 against part c only.
8. All programming questions are to be answered using Python Language only.

PART A

1. Which of the following is not a network topology : 1


i. Star
ii. Mesh
iii. Tree
iv. Bug

2. The following is automatically granted to the creator or owner of any 1


invention
(a) Patent
(c) Trademark
b) Copyright
(d) License
3. The primary law in India dealing with cybercrime and electronic commerce is 1
(a) India's Technology (IT) Act, 2008
(b) Digital Information Technology (DIT) Act, 2000
(c) Information Technology (IT) Act, 2000
(d) The Technology Act, 2008

4. Which one of the following would arrange the rows in ascending order in SQL ? 1
(A) SORT BY
(B) ALIGN BY
(C) GROUP BY
(D) ORDER BY
5. What SQL statement do we use to find the total number of records present in the 1
table Report?
(i) Select * from Report;
(ii) Select Count(*) from Report;
(iii) Select Sum() from Report;
(iv) Select Total() from Report;
6. GPL stands for 1
(a) Guided Public License
(b) Global Public License
(c)General Public License
(d) General Public Letter

7. Write the output of the following SQL command: 1


SELECT round(789.567, -2);
a. 789.5
b. 780.567
c. 800
d. 789
8. All aggregate functions except _______________ ignore null values in their 1
input collection.
i. Count(column_name)
ii. Count(*)
iii. Avg()
iv. Sum()
9. The avg() function in MySql is an example of ___________________. 1
a. Math function
b. Text function
c. Date Function
d. Aggregate Function
10. Given a Pandas series called Sequences, the command which will display the first 6 1
rows is __________________.
a. print(Sequences.head(6))
b. print(Sequences.Head(6))
c. print(Sequences.heads(6)
d. print(Sequences.Heads(6))
11. Which python library is not used for data science? 1
(a) Panda
(b) Numpy
(c) Matplotlib
(d) Tkinter

12. Which library is imported to draw charts in Python? 1


(a) csv
(b) matplotlib
(c) numpy
(d) pandas

13. In the ___________ field of the e-mail, enter the recipients whose address you 1
want to hide from other recipients. 1
(A) Carbon Copy
(B) To
(C) Blind Carbon Copy
(D) All of the above
14. The trim()function in MySql is an example of . 1
a. Math function
b. String function
c. Date Function
d. Aggregate Function
15. A contract between the creator and the user to allow the user use his/her work with some 1
price is
(a) Agreement
(c) License
(b) Copyright
(d) Patent

16. The rights of the owner of information to decide how much information is to be 1
shared/exchanged/distributed, are collectively known as
(a) Intelligent Portable Rights
(b) Intellectual Property Rights
(c) Interactive Property Rights
(d) Instance Portability Rights

Q17 and 18 are ASSERTION AND REASONING based questions. Mark


the correct c
i. Both A and R are true and R is the correct
explanation for A
ii. Both A and R are true and R is not the correct
explanation for A
iii. A is True but R is False
iv. A is false but R is True
17. Assertion (A): - Digital footprint is the trail of data we leave behind when we visit any 1
website (or use any online application or portal) to fill-in data or perform any transaction.

Reasoning (R):- While online, all of us need to be aware of how to conduct ourselves,
how best to relate with others and what ethics, morals and values to maintain.

18. Assertion (A): A cookie is a text file, containing a string of information, which is 1
transferred by the website to the browser when we browse it to track the user's
browsing activity.

Reason (R)
A cookie is a type of malware that harms the computer

PART B
19. Explain the terms WWW and Internet. 2

OR
Discuss the functions of web server.

20. Raunak wanted to display the list of employees who did not get commission. 2
Therefore, he wrote the following query in SQL :
SELECT emp_name from emp where comm=NULL;
He did not get the correct answer. Identify the error and write the correct SQL
statement
21. Can we use Where clause after Group By clause ? Name the clause which is 2
used to restrict the number of records returned by the Group By clause.

22. Write a program in Python to create the series of all the alphabets of ''Happy'' with 2
default index. Print the first three alphabets
23. Nowadays children are fond of playing computer games. What is the health 2
hazard that can occur due to excessive use of computer/smart phone screens ?
OR
What is the difference between Creative Commons license and copyright?
24. Write the output of the given command: 2
import pandas as pd
s=pd.Series([1,2,3,4,5,6],index=['A','B','C','D','E','F'])
print(s[s%2==0])
25. Consider the following DataFrame STUdf,
2

ROLLNO NAME CLASS MARKS

Stu1 1 AMAN IX 42

Stu2 2 RAMAN X 37

Stu3 3 SURAJ IX 40

Write commands to:


a. Add a new column STREAM to the DataFrame
b. Add a new row with values (4, Sheetal, X, 41)

SECTION C
26. Write outputs for SQL queries (i) to (iii) which are based on the given table 3
PURCHASE:

TABLE: Salesperson

SID Name Phone DOB Salary Area

S101 Amit Kumar 98101789654 1967-01-23 67000.00 North

S102 Deepika Sharma 99104567834 1992-09-23 32000.00 South

S103 Vinay Srivastav 98101546789 1991-06-27 35000.00 North

S104 Kumar Mehta 88675345789 1967-10-16 40000.00 East

S105 Rashmi Kumar 98101567434 1972-09-20 50000.00 South


i. SELECT Area, COUNT(*)FROM Salesperson
GROUP BY Area;
ii. SELECT Area, COUNT(*)FROM Salesperson
GROUP BY Area HAVING COUNT(*) > 1;
iii. SELECT mid(name,2,5)FROM Salesperson
27. Write a Python code to create the following Dataframe df from a Dictionary: 3
Name Age
0 Alex 10
1 Bob 12
2 Clarke 13
3 John 11
28. Consider the given DataFrame ‘Stock’: 3

Rollno Name Class Section Marks Stream


S1 1 Sheetal XI A 87 Science
S2 2 Preet XI B 89 Arts
S3 3 Kartik XI A 92 Science
S4 4 Laksh XI A 94 Commerce

Write suitable Python statements for the following:


i. Add a new column ‘Percentage’ to the Data frame.
ii. Add a new row with values ( 5 , Rohit ,XI, A ,98,Science)
iii. Remove the column Stream.
29. Sumit has to prepare a project on “Swachh Bharat Shreshth Bharat”. He 3
decides to get information from the Internet. He downloads three web pages
(webpage1, webpage 2, webpage 3) containing information on the given
topic. 1. He read a paragraph on from webpage 1 and rephrased it in his own
words. He finally pasted the rephrased paragraph in his project. 2. He
downloaded three images of from webpage 2. He made a collage for his
project using these images. 3. He also downloaded an icon from web page 3
and pasted it on the front page of his project report
i. Step1 An Example of __________
ii. Step 2 An act of __________
iii. Step 3 An act of _________

OR
What is Intellectual Property Right (IPR)? Mention any two types of IPRs.

30. Based on table Electronics given here, write suitable SQL queries for the 3
following:

BRAND APPLIANCE_NAME DISCOUNT PRICE QUANTITY


LG REFRIGERATOR 15 19800 63
SAMSUNG SMART PHONE 20 22300 26
LLOYD TELEVISION 22 12900 12
LG AIR CONDITIONER 15 23500 32
GODREJ WASHING MACHINE 18 18900 48
SONY TELEVISION 12 35600 52
SAMSUNG WASHING MACHINE 15 20110 35
i. Display Brand wise highest price.
ii. Display Brand wise lowest discount.
iii. Display total quantity of brand “LG”.
OR
How HAVING clause is different from WHERE clause in SQL. Explain with the help
of suitable example.
SECTION D
31. Write suitable SQL query for the following: 5
(i) To display total characters in a string field “FacultyName”.
(ii) To round the argument x that contains number 234.6789 to 3
decimal places.
(iii) To return the last 5 characters from a string field “LastName”.
(iv) To display Day name of your date of birth field.
(v) To display 2 characters starting from the 3rd position from the string
field “Address”
OR
Explain the following SQL functions using suitable examples.
i. LCASE()
ii. LEFT()
iii. INSTR()
iv. NOW()
v. ROUND()

32. ABC International School, Delhi has different wings as shown in the diagram : 5

Distance between the wings are as follows:


W3 to W1 70 m

W1 to W2 40 m

W2 to W4 15 m

W4 to W3 100 m

W3 to W2 120 m

W1 to W4 80 m
Number of computers in each of the wings :
W1 125
W2 40

W3 42

W4 60
Based on the above information, answer the following questions : 5
(a) Suggest the most suitable cable layout for the above connections.
(b) In which wing would you place the server? Explain the reason for
your selection.
(c) Suggest the kind of network required (out of LAN, MAN, WAN) for
connecting Administrative Wing and Middle Wing.
(d) Suggest the placement of the following devices with justification:
(i) Repeater
(ii) Switch/Hub
(e) There is one more branch of ABC International School in Mussoorie.
The schools want to link ABC International School, Delhi with
ABC International School, Mussoorie. Suggest the software(s)
or app(s) to share the files and videos.
33. Write code to draw the following bar graph representing the total number of medals won 5
by Australia.

Also give suitable python statement to save this chart.


OR
The table below shows the Marks of two students for the four unit tests for academic
session 2019-2020. Write the code to draw a line graph with Test Names on the X
axis and Marks on the Y axis.
Tests Marks
Rohit Suman
Unit1 85 97
Unit2 88 99
Unit3 89 90
Unit4 87 92

SECTION E
34. Shreya, a database administrator has designed a database for a clothing shop. Help 1+1+2
her by writing answers of the following questions based on the given
table: TABLE: CLOTH
Table : PARTICIPANTS

PNO EVENT SNAME CLASS DOB

P1 DEBATE SANYAM 12 2001-12-25

P2 DEBATE SHRUTI 10 2003-11-10

P3 DEBATE MEHER 12 2001-11-10


P4 QUIZ SAKSHI 11 2002-10-12

P5 QUIZ RITESH 12 2001-10-12

P6 QUIZ RAHUL 10 2003-10-12

P7 CROSSWORD AMEER 11 2002-05-09

P8 CROSSWORD MINAKSHI 12 2001-05-09

(i) To display details of all PARTICIPANTS of CLASS 10 and 12


(ii) To display the SNAME and CLASS of all PARTICIPANTS in ascending
order of their SNAME.
(iii) To display the number of PARTICIPANTS along with their respective
CLASS, of every CLASS.

OR (Option for part iii only)

Write a query to count class wise number of events from PARTICIPANT


Table
35. Consider a dataframe STOCK created with the following information.
ITEMS ID QUANTITY

0 PEN 1001 500


1+1+2
1 PENCIL 1004 300

2 ERASER 1007 280

A. Predict the output of the following python statement:


i. STOCK.shape
ii. STOCK[1:2]
B. Write Python statement to display the data of ITEMS and ID.
OR (Option for part iii only)
(i) Write Python statement to display the total number of all ITEMS
in the STOCK
SAMPLE QUESTION PAPER
CLASS XII
INFORMATICS PRACTICES (065)
TIME: 3 HOURS M.M.70
General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 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 03 Long Answer type questions carrying 05 marks each.
7. Section E has 02 questions carrying 04 marks each. One internal choice is
given in Q35 against part c only.
8. All programming questions are to be answered using Python Language only.

PART A
1. Which of the following topologies needs least cable length ? 1
a. Star
b. Tree
c. Bus
d. None of the above

2. You were not able to create the IP project, therefore you downloaded a project from 1
the internet and submitted it to your teacher by your name. This wrong/unethical act is
considered as ___________ .
a. Copyright

b. Hacking

c. Plagiarism

d. Trademark

3. Out of the following, which crime(s) will come under cyber crime category ? 1
a. Identity theft
b. Invasion of privacy
c. Online harassment
d. All of the above

4. An aggregate function performs a calculation on _________ and returns a single value. 1

a. single value
b. multiple values
c. no value
d. None of the above

5. What SQL statement to print all the records present in the table Report? 1
(i) Select * from Report;
(ii) Select Count(*) from Report;
(iii) Select Sum() from Report;
(iv) Select Total() from Report;
6. Technology not protected by copyright and available to everyone, is categorized as: 1
a. Proprietary
b. Open Source
c. Experimental
d. Shareware
7. Write the output of the following SQL command : 1

select round(3456.885, 2);

a. 3456.88

b. 3456.89

c. 3400

d. 3500

8. Which of the following are correct aggregate functions in SQL : 1


(i) AVERAGE()
(ii) MAX()
(iii) COUNT()
(iv) TOTAL()
9. Manish wants to select all the records from a table named “Students” where the value 1
of the column “FirstName” ends with an “a”. Which of the following SQL statement will
do this?
a. SELECT * FROM Students WHERE FirstName = ‘a’;
b. SELECT * FROM Students WHERE FirstName LIKE ‘a%’;
c. SELECT * FROM Students WHERE FirstName LIKE ‘%a’;
d. SELECT * FROM Students WHERE FirstName = ‘%a%’;
10. What will be the output of the following program ? 1
import pandas as pd
x=6
S1=pd.Series(x,index=[1,2,4,6,8,9])
print(S1)
(A) 1 6
2 6
4 6
6 6
8 6
9 6
dtype: int64
(B) 0 6

dtype: int64
(C) 124689 666666 dtype: int64

(D) None of the above

11. Using Python Matplotlib __________ can be used to display information as a series of 1
data points.
a. line chart
b. bar graph
c. histogram
d. None of the above

12. Which one of the following is an attribute of the series in Pandas to set the index label 1
for the given object ?
a. label
b. index
c. loc
d. All of the above

13. A __________ is a collection of interconnected _________ designed with a goal in 1


mind.
a. webpage, website
b. web browser, webpage
c. server, client
d. website, webpage

14. The LEFT()function in MySql is an example of . 1


a. Math function
b. Text function
c. Date Function
d. Aggregate Function
15. E-waste is harmful to the environment and human health if not properly treated or 1
disposed of, therefore they must be handled with care. What are the health hazards
which can be caused by E-waste ?
a. Lung cancer
b. DNA damage
c. Brain damage
d. All of the above
16. A software company purchases new computers every year and discards the old ones 1
into the local dumping yard. Write the name of the most appropriate category of
waste that the organisation is creating every year, out of the following options :
(i) Business Waste
(ii) Commercial Waste
(iii) Solid Waste
(iv) E-Waste
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the
correct option
i. Both A and R are true and R is the correct explanation for A
ii. Both A and R are true and R is not the correct explanation for A
iii. A is True but R is False
iv. A is false but R is True
17. Assertion (A): - An Internet troll is a person who deliberately sows discord on the 1
Internet by starting quarrels or upsetting people.
Reasoning (R):- : We can download and use any material available on the Internet.
18. Assertion (A):- Data visualization refers to the graphical representation of information 1
and data using visual elements like charts, graphs and maps etc.
Reasoning (R): : To install matplotlib library we can use the command
pip install matplotlib.
PART B
19. How do Computer networks reduce hardware costs of an organization? Explain with 2
the help of example
OR
Compare BUS topology with STAR topology. Give example.
20. If there are 10 rows in ‘Emp’ table and 5 rows in ‘Department’ table, How many rows 2
will be displayed by the following query?
SELECT * FROM Emp, Department;
Write the term used for the Join being used on the two tables mentioned above.
21. What do you understand by the Degree and Cardinality of a relation. 2
22. : 2
A=pd.Series([2,4,6], index=[0,1,2])
B=pd.Series([1,3,5], index=[1,2,3])
(i)
(ii)
23. 35 What do you mean by Identity theft? Explain with the help of an example. 2
OR
What do you understand by Net Etiquettes? Explain any two such etiquettes.
24. A series S1 with the values (2,3,1). 2
Find the output of the following two statements considering the above created series :
a. print(S1**3)
b. print(S1*3)

25. Consider the following DataFrame, classframe 2

Rollno Name Class Section CGPA Stream


St1 1 Aman IX E 8.7 Science
St2 2 Preeti X F 8.9 Arts
St3 3 Kartikey IX D 9.2 Science
St4 4 Lakshay X A 9.4 Commerce

Write commands to :
1. Add a new column ‘Activity’ to the Dataframe
2. Add a new row with values ( 5 , Mridula ,X, F , 9.8, Science)
SECTION C
26. Write outputs for SQL queries (i) to (iii) which are based on the given table 3
LOAN

TABLE: LOAN
AccNo Name Loan_Amt EMI Int_Rate Start_Date Interest
1001 R.K. Gupta 300000 36 12.00 19-07-2009 1200
1002 S. P. Sharma 500000 48 10.00 22-03-2008 1800
1003 K.P. Jain 300000 36 NULL 08-03-2007 1600
1004 M.P. Yadav 800000 60 10.00 06-12-2008 2250
1005 S.P. Sinha 200000 36 12.50 03-01-2010 4500
1006 P. Sharma 700000 60 12.50 05-06-2008 3500
1007 K.S. Dhall 500000 48 NULL 05-03-2008 3800

a. Select count(*) from LOANS where name Like ‘Sharma%’;


b. Select Count(*) from LOANS where Int_Rate is NULL
c. Select min(Loan_Amount) , max(Loan_Amount) from LOANS

27. Write a program in Python Pandas to create the following DataFrame df1: 3
S.No City Maxtemp Mintemp Rainfall
0 1 Delhi 40 32 24.1
1 2 Benglaru 31 25 36.2
2 3 Chennai 35 27 40.8
3 4 Mumbai 29 21 35.2
4 5 Kolkata 39 23 41.8

28. Consider the following dataframe ndf as shown below : 3


Col1 Col2 Col3 Res
T1 62.893165 100.0 60.00 True
T2 94.734483 100.0 59.22 True
T3 49.090140 100.0 46.04 False
T4 38.487265 85.4 58.60 False
What will be the output produced by following statements :-
i. print( ndf.loc [ :, ’Column3’ : ] )
ii. print( ndf.iloc[2: , : 3] )
iii. print( ndf.iloc [ 1:3 , 2:3 ])
29. XYZ Company developed software, related to face recognition with a team of 15 3
software developers. XYZ company Registered the software with a face symbol to
easily recognize their software. Before approval of software by the registering
firm, Rohit one of the team member of the software published the same software
in internet under different name as it is his own development. XYZ firm recognized
this activity and informed to the police. The police people arrested the Rohit and
removed the software from the internet. Police advice the XYZ firm to apply for
patent as the software is a new invention.
a. XYZ firm registered the software with face symbol to easily recognize their
software .In this context face symbol is called?
b. The activities done by the Rohit is called as ______________
c. Patents are valid for how many years.?
OR
What do you mean by cyber security? How one can protect His/Her data.
30. A relation Vehicles is given below : 3

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 SQLcommands to:


a. Display the average price of each type of vehicle having quantity more than
20.
b. Count the type of vehicles manufactured by each company.
c. Display the total price of all the types of vehicles.

i.
OR
State any two differences between single row functions and multiple row
functions with examples.
SECTION D
31. Write the SQL functions which will perform the following operations: 5
i To display the day of the month of the current date .
ii To display the length of string , “ hello “.
iii To display the name of the day eg, Friday or Sunday from your
date of birth, dob.
iv. To display the string in upper case ‘I love india’
v. To compute the 23 using sql function.
OR
Explain the following SQL functions using suitable examples.
i. LCASE()
ii. LEFT()
iii. INSTR()
iv. NOW()
v. ROUND()

32. Oberoi Industries has set up its new center at Mangalore for its office and web based 5
activities. It has 4 blocks of buildings as shown in the diagram below :
Center to center distances between various blocks :-
Block A to Block B 50 m
Block B to Block C 150 m
Block C to Block D 25 m
Block A to Block D 170 m
Block B to Block D 125 m
Block A to Block C 90 m
Number of Computer :-

Block A 25
Block B 50
Block C 125
Block D 10
i. What type of network will be formed if all blocks are connected?
ii. Suggest the most suitable place (i.e. Block) to house the server of this
organization with a suitable reason.
iii. Suggest the placement of the following devices with justification.
(a) Repeater (b) Hub / Switch
iv. The organization is planning to link its front office situated in the city in a hilly
region where cable connection is not feasible, suggest an economic way to
connect way to connect it with reasonably high speed.
v. Which type of network will it form.
33. Consider the following graph. Write a program in python to draw it. (Height of Bars are 5
10,1,0,33,6,8)

Also give suitable python statement to save this chart.


OR
Write a Python program to display a bar chart of the number of students in a school.
Sample data:
Class: I,II,III,IV,V,VI,VII,VIII,IX,X
Strength: 38,30,45,49,37,53,48,44,36,46
SECTION E
34. Consider a table SALESMAN with the following data: 1+1+2
SNO SNAME SALARY BONUS DATE OF JOIN

A01 Beena Mehta 30000 45.23 29-10-2019


A02 K. L. Sahay 50000 25.34 13-03-2018
B03 Nisha Thakkar 30000 35.00 18-03-2017
B04 Leela Yadav 80000 NULL 31-12-2018
C05 Gautam Gola 20000 NULL 23-01-1989
C06 Trapti Garg 70000 12.37 15-06-1987
D07 Neena Sharma 50000 27.89 18-03-1999
Write SQL queries using SQL functions to perform the following operations:
1 Display salesman name and bonus after rounding off to zero decimal places.
2 Display the position of occurrence of the string “ta” in salesman names.
3 Display the four characters from salesman name starting from second character.
OR (Option for part iii only)
Display the month name for the date of join of salesman
35. Consider a set of information for an Exam conducted for students with following details
:
Names Marks Trials Passed

Sanya 95 2 yes
1+1+2
Krish 70 3 no

Rishav 96.5 1 yes

Deepak 75 2 no

Kriti 92 1 yes
For the above Dataframe df ,write single line statements for each of the following
parts (a) to (c), which use Pandas method :
a. To display the 'Names' and 'Marks' columns from the DataFrame.
b. To change the 'Marks' in the 4th row (i.e. for index 3) to 91.5
c. To display the rows where number of 'Trials' in the examination is
less than 2
OR (Option for part iii only)
To display the maximum value of the column Marks

You might also like