QP Ip Sample Papers
QP Ip Sample Papers
QP Ip Sample Papers
(जम्मू संभाग )
SAMPLE PAPER
FOR CLASS XII
INFORMATICS PRACTICES (065)
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.
(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
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:
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
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?
7 Which SQL statement do we use to find out the total of values present in price column 1
in the table 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
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
Section B
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
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.
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:
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
Name Price
0 Mobile 150
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.
SECTION D
31 5
Write the names of SQL functions which will perform the following operations:
Conference Human
Resource Block
Block
Finance
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]
Write SQL queries using SQL functions to perform the following operations:
a) Display employee name and bonus after rounding off to zero decimal
places.
second character.
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. print(df[::1])
b. print(df.iloc[::-1])
c. print(df[-1:]+df[:-1])
d. print(df.reverse())
a. print(df.size)
b. print(df.shape)
c. print(df.index)
d. print(df.axes)
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
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?
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?
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?
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
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:
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.
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
{‘A’:[‘ALOK’,’MANOJ’,’RAM’,’RAVI’],’B’:[20,30,40,50],’C’:[1000,2000,3000,4000]}
Name Price
0 Note Book 100
1 Project File 120
2 Pen Drive 325
3 IP Book 500
She is also getting repeated mails from unknown people. Every time she goes
online, she finds someone chasing her online.
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
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
35 Consider the following dataframes and write the command to perform 1+1+
following operations on the dataframes Cls1 and Cls2: 2
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
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.
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) 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
OR
Consider the following graph .Write the python program to plot line graphs showing
daily sales of “Drinks” and “Food” items for five days
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
.
a) 1
b) 2
c) 3
d) 4
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.
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)
(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:
(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:-
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:
(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
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?
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
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:
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.
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
[[110,'Gurman',98],[111,'Rajveer',95],[112,'Samar' ,96],[1113,'Yuvraj',88]]
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
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
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
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
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:
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)
(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:
OR
What are the different ways in which authentication of a person can be performed?
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
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
Main Compound 5
Resource Compound 15
Training Compound 150
Finance Compound 20
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.
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?
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?
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?
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
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:
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.
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)
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
Name Price
0 Nancy Drew 150
1 Hardy boys 180
2 Diary of a wimpy kid 225
3 Harry Potter 500
She is also getting repeated mails from unknown people. Every time she goes
online, she finds someone chasing her online.
MUMBAI CAMPUS
DELHI HEAD OFFICE
ACCOUNTS
EXAMINATION
ADMIN RESULT
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
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”)
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 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?
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])
import numpy as np
a=np.array ( [ 26, 59, 44, 39, 80, 66, 24, 31, 22, 30, 85 ])
__________________________ Statement 1
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
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
OR
What will be the output of the following SQL Statements:
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
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])
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 :
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
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;
DISTANCE
ADMIN to TECHY 85 m
Block
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
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‟)
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
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
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
OR
Discuss the significance of ORDER by clause in detail with the help of suitable
example.
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?
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]
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']
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.
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
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
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
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:
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.
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
Name Price
0 Campus Shoes 1500
1 Washing Machine 12000
2 HP laptop 50000
3 Dell Laptop 45000
ii. Chasing and keep track of activities of a person online is called ____________
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
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
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
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)
PART A
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
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()
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
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
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
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.
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.
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.
(i) Repeater
(ii)Hub/Switch
(c) Suggest the most suitable Block to house the server in the company at Noida.
(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]
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
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:
PART A
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
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
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
Stu1 1 AMAN IX 42
Stu2 2 RAMAN X 37
Stu3 3 SURAJ IX 40
SECTION C
26. Write outputs for SQL queries (i) to (iii) which are based on the given table 3
PURCHASE:
TABLE: Salesperson
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:
32. ABC International School, Delhi has different wings as shown in the diagram : 5
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.
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
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
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
a. 3456.88
b. 3456.89
c. 3400
d. 3500
dtype: int64
(C) 124689 666666 dtype: int64
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
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
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
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)
Sanya 95 2 yes
1+1+2
Krish 70 3 no
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