Info Pract Xii Ms PB 1 Set 3

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

KENDRIYA VIDYALAYA SANGATHAN, JAIPUR REGION

FIRST PREBOARD EXAMINATION 2023-24


CLASSXII
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 carrying02 marks each.
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has03 Long Answer type questions carrying 05marks each.
7. Section E has02 questions carrying 04 marks each. One internal choice is given in Q 35
against part c only.
8. All programming questions are to be answered using Python Language only.
9.

PARTA
1. It is a world-wide network which is a collection of many other networks 1
a) Internet
b) Website
c) Web Page
d) LAN
An a) Internet
s
2. It is an act of copying another person’s data idea, words or work and pretended that 1
they are our own.
a) Copyright
b) Virus
c) Plagiarism
d) IPR
An b) Plagiarism
s
3. Choose the method(s) used for managing e-Waste. 1
a) Reducingb) Reusingc) Recycling d) All of these
An d) All of these
s
4. Which type of values will not be considered by SQL while executing the following 1
statement?
SELECT COUNT(column name) FROM STOCK;
a) Null value
b) Text value
c) Numeric value
d) Date value
An a) Null value
s
5. In a table SHOP, column “Margin” contains the data 1
set(2.00,2.00,NULL,4.00,NULL,3.00,3.00).What will be the output after the execution of
the query given below?
SELECT AVG(Margin) FROM SHOP;
a) 2.9 b) 2.8 c)2.00 d) None of these

An b) 2.8
s
6. ‘P’ in IPR stands for 1
a) Proprietary
b) Platform
c) Patent
d) Property
An d) Property
s
7. Which of the following is not a category of MySQL functions? 1
a) Text Functions
b) Mathematical Functions
c) Aggregate Functions
d) Arithmetic Functions
An d) Arithmetic Functions
s
8. Select the output of the following SQL Command : - 1
SELECT ROUND(568.45,-1)
a) 570
b) 550
c) 568
d) 600
An a) 570
s
9. Which of the following function is similar to LCASE () function? 1
a) Lowercase()
b) Lower()
c) Lower_case()
d) All of the these
An b) lower()
s
10. To display Third Element of a Series object S,you will write : 1
a) S[:3]
b) S[2]
c) S[3]
d) S[:2]
An b) S[2]
s
11. Choose statement from the statements given below which is not correct in the context of 1
a DataFrame?
a) size is Mutable
b) Can perform Arithmetic operators on rows and columns.
c) Homogeneous tabular data structure
d) Two dimensional
An c) Homogeneous tabular data structure
s
12. Which attribute is not used with the Dataframe? 1
a) size
b) column
c) empty
d) ndim
An b) column
s
13. A computer program designed to simulate conversation with human users especially is 1
known as
a) e-mail
b) Chat group
c) Whatsapp
d) Chat bot
An d) Chat bot
s
14. Suppose you have a DATETIME “2023-11-10 12:50:10” value. Which function extracts 1
the date part of the given DATETIME value.
a) CURRENT()
b) NOW()
c) SYSDATE()
d) DATE()
An d) DATE()
s
15. What is the name of the IT law that India is having in the Indian Legislature? 1
a) India’s Technology(IT) Act,2000
b) India’s Digital Information Technology(DIT),Act,2000
c) India’s Information Technology(IT),Act ,2000
d) The Technology Act,2008
An c) India’s Information Technology(IT),Act ,2000
s
16. Which of the following are automatically granted to creators and authors? 1
a) Copyright
b) Patent
c) Trademark
d) Netiquette
An a) Copyright
s
Q17and18areASSERTIONANDREASONING basedquestions. Mark thecorrect
choiceas
i. BothAand Raretrue andRisthecorrectexplanationforA
ii. BothAand Raretrueand Ris not the correctexplanation forA
iii. Ais Truebut Ris False
iv. Ais false butR is True
17. ASSERTION (A):E-waste can be toxic and harmful for nature 1
REASONING(R):E-Waste that do not organically break down can, over time, can seep
directly into the environment
An i) Both A and R are true and R is the correct explanation for A
s
18. ASSERTION(A):drop() function removes data from a Dataframe temporarily. 1
REASONING(R): Axis parameter is not compulsory with drop() function.
An iv) A is false but R is True
s
PARTB
19 What do you understand by a website? Mention any two points of difference between 2
aWebsite and Webpage?
OR
“Switch is an intelligent Hub”. State Yes or No with reason.
An Website
s A website is a collection of webpages and related content that is identified by a
common domain name and published on a web server.
- Website is a collection of webpage whereas web page is an individual page and
part of a website
- Website has domain name whereas webpage URL to access it
- Website is larger than a webpage
- Website takes longer to develop as compared to web page
1 mark for definition and 1 mark for any two correct point of difference
OR
Yes, switch is an intelligent hub because it sends received or incoming data/packets to
its recipient node only and provide point-to–point communication using MAC address.
1 mark for Yes and 1 mark for correct reason

20 Gopi Krishna is using a table Employee which has columns - 2


Code,Name,Salary,Deptcode. He wants to display maximum salary department wise
but he did not get the desired result. Rewrite the query given below with necessary
change to help him get the desired result.
SELECT Deptcode,MAX(Salary) FROM Employee;
An SELECT Deptcode, MAX(Salary) FROM Employee Group by Deptcode
s 2 marks for correct answer (Partial mark may be awarded)
21. In SQL, differentiate HAVING and WHERE clause? 2
An HAVING Clause
s - It is used only with GROUP BY clause to specify conditions on whole group or
aggregate function.
WHERE Clause
- It is used to specify condition on individual attribute(s) to filter the tuples/records, it
has no relation with GROUP BY clause
1 mark each for two correct point of differences

22. Consider the given data and write a python program to create a series named Subject 2
using a dictionary.
English 75
Hindi 78
Math 82
Science 88
An import pandas as pd ½ mark
s D={“English”:75,”Hindi”:78,”Math”:82,”Science”:88} ½ mark
Subject=pd.Series(D) ½ mark
print(Subject) ½ mark
23. Explain any two physical problems of using technology excessively. 2
OR
What is meant by digital footprint? Give example of one active and one passive digital
footprint?

An i. Sleep problem
s ii. Eyestrain
iii. Neck pain
iv. Headaches
v. Muscular pain
2 marks for any two correct point of differences

OR
Digital foorprints
A digital footprint is the trail of data created as a result of you online activity.
[1 mark]
Active Digital footprint – Logging in, posting comments, liking someone’s image etc [
½ mark]
Passive footprint – Your IP address, Browser history, clicking on a link or surfing on net
[ ½ mark]
24. What will be the output of the following code: 2

import pandas as pd
numbers=pd.Series([9,8,7,6,5],index=range(0,10,2))
print(numbers[1:3]

An 2 8
s 4 7
½ mark for each correct value of output ( ½ x 4 = 2 marks)
25. Answer the following questions based on the code given below : - 2
…………………….... # Statement 1
Ld=[{'a',10,'b':20},{'a':5,'b':10,'c':20}]
df=pd.DataFrame(Ld)
print(df)
i) Write the statement 1 in the above code.
ii) How many columns will be there in the dataframe.

An i) import pandas as pd [1 mark]


s ii) 3 columns [1 mark]
SECTION C
26. Write a python code to create a DataFrame with appropriate column headings from 3
the list given below:
[[201,’Gurmeet’,95],[202,’Praveen’,89],[203,’Suman’,97],[204.’Yogesh’,91]]
An import pandas as pd
s [½ mark]
data=[[201,'Gurmeet',95],[202,'Praveen',89],[203,'Suman',97],[204,'Yogesh',91]]
[ ½ mark]
df=pd.DataFrame(data,index=["S1","S2","S3","S4"],columns=["Rollno","Name","Marks"
]) [ 1 ½ marks]
print(df)
[ ½ mark]
27. Consider the given DataFrame ‘Fees’: 3

Cname Fee
0 XII 3500
1 XI 3000
2 X 2700
3 VII 1800

Write suitable Python statements for the following:


i. Add a column called ‘Section’ with the data: [‘A’,’B’,’C’,’D’]
ii. Add a new Class Name named ‘IX' having price 1800.
iii. Remove the column ‘Section’.
An i. Fees[“Section”]= [‘A’,’B’,’C’,’D’] [1 mark]
s ii. Fees.loc[4]=[“IX”1800] [1 mark]
iii. Fees.pop(“Section”) or Fees=Fees.drop(“Section”,axis=1) [1 mark]
28. Write SQL commands for the statements (i) to (iii) which are based on the given table 3
WORKER.
PID SNAME FNAME GEN CITY PINCODE SALARY
1 SHARMA GEET F JAMMU 182141 50000
2 SINGH SURINDER M KANPUR 193222 75000
3 JCOB PETER M MUMBAI 185155 45000
4 ALVIS THOMAS M GURUGRAM 380025 50000
5 MOHAN GAURAV M KOLKATA 390026 33000
6 AZMI SIMI F NEW DELHI 110021 40000
7 KAUR MANPREET F JAMMU 182141 42000

i) SELECT SUM(SALARY) FROM PERSON WHERE GEN=’F’;


ii) SELECT GEN,COUNT(*) FROM PERSON GROUP BY GEN;
iii) SELECT MOD(SALARY,4000) FROM PERSON WHERE CITY=‘JAMMU’;

An i) [1 mark]
s Sum(Salary)
132000
ii) [1 mark]
GEN COUNT(*)
F 3
M 4
iii) [1 mark]
MOD(Salary,4000)
2000
2000
29 NISHA has recently changed his school so she is not aware of the people, but 3
someone is posting negative demeaning comments on his social media profile. She is
also getting repeated mails from unknown people. Every time she goes online, she
finds someone chasing him online.
i. Nisha is a victim of ___________.
ii. The action that Nisha should take to handle it.
iii. .......................... is a set of moral principles that governs the behavior of a group or
individual and regulates the use of computers.
OR
What do you understand by plagiarism? Why is it a punishable offence? Mention any
two ways to avoid plagiarism.

An i) Cyber bullying/Cyber stalking [1 mark]


s ii) She should tell to her parents/guardians about it and lodge an FIR to nearest
police station under IT Act of India, 2000 [1 mark]
iii) Netiquettes [1 mark]

OR
Plagiarism
It means using someone else’s work without giving them proper credit or showing it your
own creations.
It is a punishable offence because it may result in a financial loss to the creator or an
intellectual property and also violating IPR is also a punishable offence.
Ways to avoid plagiarism: -
1. Give credit to the creator
2. Mention the source of the information
3. Create your own content
4. Do not copy paste
1 mark for definition 1 mark for two correct points ( ½ each)
30 Consider a table “AGENT” with the following data: 3
Table : AGENT
SNO ANAME SALARY BONUS DOJ
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
Write SQL queries to perform the following operations.
(i) Display Agent name and bonus after rounding off to zero decimal places.
(ii) Display the month name of the date of join (DOJ) of all the agents who have no
bonus.
(iii) Display the minimum salary of all the agents.
OR
What is the purpose of GROUP BY clause in MySQL? How is it different from ORDER
BY clause?
Ans i) SELECT ANAME,ROUND(BONUS,2) FROM AGENT[1 mark]
ii) SELECT MONTHNAME(DOJ) FROM AGENT WHERE BONUS IS NULL[1
mark]
iii) SELECT MIN(SALARY) FROM AGENT[1 mark]
OR
Group By
Is used to create group of rows having similar values in the specified column.[1 mark]
Example : - SELECT DEPT, COUNT(*) FROM EMPLOYEE GROUP BY DEPT
ORDER BY is used to arrange tuples/rows in ascending or descending order according
to the values in a given column.
Example : - SELECT * FROM EMPLOYEE ORDER BY DEPT[1 mark]
SECTION D
31. Write suitable SQL query for the following: 5
i. Display 7 characters extracted from 7th character onwards from the string
‘INDIASHINING’.
ii. Display the position of occurrence of string ‘COME’ in the string‘WELCOME
WORLD’.
iii. Round off the value 78.779 to 2nd decimal place.
iv. Display the remainder of 149 divided by 6.
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. LENGTH()
ii.RTRIM()
iii. NOW()
iv. DAYNAME()
v. POWER()
v. POWER(
An i) SELECT SUBSTR(‘INDIASHINING’,7,7)/ SELECT
s SUBSTRING(‘INDIASHINING’,7,7) /
SELECT MID(‘INDIASHINING’,7,7)
[1 mark]
ii) SELECT INSTR(‘WELCOME WORLD’,’COME’)
[1 mark]
iii) SELECT ROUND(78.779,2)
[1 mark]
iv) SELECT MOD(149,6)
[1 mark]
v) SELECT TRIM(USERID) FROM USERS
[1 mark]
OR
i) LENGTH() Returns
Returns length/number of characters of a given string.
ii) RTRIM()  Returns a string by removing all trailing spaces from a given string
iii) NOW()  Return current date and time of the system
iv) DAYNAME() Returns day name of the day of given date
v) POWER()  Return x raise to the power of y
1 mark each for correct definition
32. VIKRAMA UNIVERSITY, Allahabad is setting up the network between its different 5
wings. There are four wings named as Science(S), Journalism(J), Arts(A) and Home
Science(H).

Distance between various wings

a. Suggest a suitable layout for networking the computers in each wing.


b. Name the wing where server needs to be installed.
c. Suggest the placement of Hub/Switch in the network.
d. Suggest type of wired media to provide internet accessibility to all wings.
e. University 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
w
type of website will you suggest?

An a. [1 mark star or bus topology ]


J
s A

S
H
b. Wing A [1mark]
c. In all the wings [1 mark]
d. Ethernet cable [1 mark]
e. Dynamic website [1 mark]

33 Mr. Gupta is working in a 5


game development industry
and he was comparing the
given chart on the basis of
the rating of the various
games available on the
play store.

Write the python code for the above graph and 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 pass
percentage of students in CBSE exams for the years 2018 to 2022 as shown below.

Year=[2018,2019,2020,2021,2022]
Pass_Percentage=[85,83,90,82,92]

An import matplotlib.pyplot as plt [ ½ mark]


s rating=[4.2,4.8,5.0,3.6,4.0]
games=["Subway surfer”,"Temple Run","Candy Crush","Bottle shot","Runner Best"]
plt.bar(rating,games) [1 mark]
plt.xticks([0,1,2,3,4],games)
plt.title("Rating of games") [½ mark]
plt.xlabel("Games") [½ mark]
plt.ylabel("Rating") [½ mark]
plt.show() [1 mark]
plt.savefig(‘games.jpg’) [1 mark]
OR
import matplotlib.pyplot as plt [ ½ mark]
Year=[2018,2019,2020,2021,2022]
Pass_Percentage=[85,83,90,82,92]
plt.plot(Year,Pass)[ 2 mark]
plt.title("Pass percentages in CBSE ")[ ½ mark]
plt.xlabel("Year")[ ½ mark]
plt.ylabel("Percentage")[ ½ mark]
plt.show()[ 1 mark]

SECTION E
34 Naveen, a database administrator has designed a database for a Computer Stock. Help 1+1+
him by writing answers of the following questions based on the given table: 2

TABLE: INVENTORY

Pid Pname Category Qty Price


1 Keyboard IQ 15 450
2 Mouse IQ 10 350
3 Wi-fi router NW 5 2600
4 Switch NW 3 3000
5 Printer O 4 17000

i. Write a query to display product name in upper case.


ii. To display the records in descending order of the price.
iii. To display category and category wise highest price of product.
OR (Option for part iii only)
To display category and category wise total quantities of product.

An i. SELECT UPPER(Pname) FROM INVENTORY [1 mark]


s ii. SELECT * FROM INVENTORY ORDER BY PRICE DESC [1
mark]
iii. SELECT CATEGORY, MAX(PRICE) FROM INVENTORY GROUP BY
CATEGORY; OR
SELECT CATEGORY, SUM(Qty) FROM INVENTORY GROUP BY
CATEGORY; [2 marks]
35. Assume a DataFrame df has following data of passengers for the year 2010 to 2012 for
January, March and December. Find output of the following python statements given 1+1+
below: - 2

Year Month Passengers


0 2010 Jan 25
1 2010 Mar 50
2 2012 Jan 35
3 2010 Dec 55
4 2012 Dec 65

i. df.columns
ii. df.shape
iii. df[df.Passengers>50]
OR (Option for part iii only)
df.tail(3)

An i) [“Year”,”Month”,”Passengers”]
s ii) (5,3)
iii)
Year Month Passengers
3 2010 Dec 55
4 2012 Dec 65
OR

Year Month Passengers


2 2012 Jan 35
3 2010 Dec 55
4 2012 Dec 65

You might also like