Ip Sample Paper 3 Answer Key

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

SAMPLE PAER 3 ANSWER KEY SET-I

KENDRIYA VIDYALAYA SANGATHAN : BHUBANESWAR REGION


PRE-BOARD EXAMINATION 2022-23 CLASS XII INFORMATICS PRACTICES (065)
TIME: 3 HOURS M.M.70 MARKING SCHEME
Q SECTION-A Marks

1. Which device is used to regenerate the signals over long distance data transmission: 1
i. Switch
ii. Modem
iii. Repeater
iv. None of the above
Answer: (iii) Repeater , 1 mark for correct answer
2. Whenever we surf the Internet using smartphones we leave a trail of data reflecting the 1
activities performed by us online, which is our ?
i. Data print
ii. Digital activity
iii. Digital footprint
iv. Digital print
Answer: (iii) Digital Footprint, 1 mark for correct answer
3. Unsolicited commercial emails is known as …………..? 1
i. Spam
ii. Malware
iii. Virus
iv. Worms
Ans (i) , Spam 1 mark for correct answer

4. Find the output for the below sql statement: 1


Select substr(“BoardExam@2021”, 4, 7);
i. ardExam
ii. dExam@2
iii. rdExam
iv. rdExam@2
Answer: (iv) 1 mark for correct answer
5 What is the output of following : 1
Select Round(19999.299,-1);
i. 199999.3
ii. 20000.299
iii. 2000
iv. 20000
Answer :( iv) 1 mark for correct answer
6. Which of the following is Net Etiquette? 1
i. Be Ethical
ii. Be Responsible
iii. Be Respectful
iv. All of the above
Answer (iv) All of the above, 1 mark for correct answer
7. Which keyword is used to arrange the result of order by clause in descending order? 1
i. DSEC
ii. ASCE
iii. DESC
iv. ASC
Answer: (iii) DESC, 1 mark for correct answer

8. Which one of the following is a string function? 1


i. COUNT()
ii. SUBSTR()
iii. MOD()
iv. MAX()
Answer (ii) SUBSTR(), 1 mark for correct answer
9. Which one of the following functions is used to count the no of rows from the given table in MySQL? 1
i. COUNT(* )
ii. CARDINALITY( )
iii. COUNT(Column name )
iv. All the above
Answer: (i) COUNT(*), 1 mark for correct answer

10. To display First 15 rows of a series object ‘Ser1’, you may write: 1
i. Ser1.tail(15)
ii. Ser1.head()
iii. Ser1.head(15)
iv. Ser1.tail()
Answer : (iii) Ser1.head(15) , 1 mark for correct answer
11. Which of the following statement will install pandas library in python? 1
i. Pip install pandaspd
ii. pip install pandas as pd
iii. pip install pandas.pd
iv. pip install pandas
Answer: ( iv) pip install pandas, 1 mark for correct answer
12 Which protocol allow us to have voice calls over the internet? 1
i. HTTP
ii. VoIP
iii. Video Chat
iv. SMTP
Answer: (ii) VoIP , 1 mark for correct answer.
13 Which one is False about MAC address? 1
i. It is Physical Address of any device connected to the internet.
ii. We can change MAC address of a device.
iii. It is the address of NIC card install in network device.
iv. It is used for track the user’s over internet.
Answer: (ii) 1 mark for correct answer.
14 Which one of the following is an output for SQL statement given below: 1
SELECT DAYNAME('2022-12-07');
i. MONDAY
ii. WEDNESDAY
iii. SATURDAY
iv. FRIDAY
Answer: (ii) WEDNESDAY, 1 mark for the correct answer
15 The act of fraudulently acquiring someone’s personal and private information, such as online account names, 1
login information and passwordsis called as_____.
i. Phishing
ii. Identity Theft
iii. Plagiarism
iv. all the above
Answer: (ii) Identity Theft. 1 mark for correct answer.
16 The method used for X axis label a line graph is 1
i. plt.title()
ii. plt.ylabel()
iii. plt.xlabel()
iv. plt.line()
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): - E-waste cause of Damage to the immune system, Skin disease, Multi ailments and 1
Skin problems.
Reasoning (R):- Mostly all electronic waste comprises of toxic chemicals such as lead,beryllium, mercury
etc.
Answer: ( i) 1 mark for correct answer

18 Assertion (A): - When DataFrame is created by using Dictionary, keys of dictionary are set as columns of DataFrame. 1
Reasoning (R):- Boolean Indexing helps us to select the data from the DataFrames using a boolean vector.

Answer:- (ii) 1 mark for correct answer

SECTION-B
19 Define any 2 limitations of star topology? 2

OR

Write any 2 differences between Star and Bus topology?

Answer:
1. Requires more cable length than a linear topology.
2. Dependency on central node: If the hub, switch, or concentrator fails, nodes attached are disabled.
3. More expensive than linear bus topologies because of the cost of the hubs, etc.
4. Requires more cable to setup the network .
2 mark for any 2 correct points or any other relevant points.

STAR Topology BUS Topology

Star topology is a topology in which all Bus topology is a topology where each device is
devices are connected to a central hub connected to a single cable which is known as the
backbone.

In star topology, if the central hub fails then In a Bus topology, the failure of the network cable
the whole network fails. will cause the whole network to fail.

2 mark for any 2 correct differences or other relevant difference


20 Anjali writes the following commands with respect to a table employee having fields, empno, name, 2
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.

Answer:
This is because the column commission contains a NULL value and the aggregate functions do not take into
account NULL values. Thus Command1 returns the total number of records in the table whereas
Command2 returns the total number of non
NULL values in the column commission.
21 What is the difference between the order by and group by clause when used along with the select 2
statement. Explain with an example.

Answer:
The order by clause is used to show the contents of a table/relation in a sorted manner with respect to the
column mentioned after the order by clause. The contents of the column can be arranged in ascending or
descending order.
The group by clause is used to group rows in a given column and then apply an aggregate function eg max(),
min() etc on the entire group.
(any other relevant answer)
1 mark for correct explanation 1 mark for appropriate example
22 Consider a given Series , M1. Write a program in Python Pandas to create the series. 2
Marks
Term1 67
Index Term2 56
Term3 77
Term4 89
Answer:
import pandas as pd
M1=pd.Series([45,65,24,89],index=['term1','term2','t erm3','term4'])

½ mark for import statement


½ mark for usage of Series ()
½ mark for stating index as a list
½ mark for creating object m1
23 List any two health hazards related to excessive use of Technology. 2

OR

Priya is using her internet connection to book a train ticket. This is a classic example of
leaving a trail of web activities carried by her. What do we call this type of activity? What is the
risk involved by such kind of activity?

Answer:
The continuous use of devices like smartphones, computer desktop, laptops, head phones etc cause a lot of
health hazards if not addressed. These are:
i. Impact on bones and joints: wrong posture or long hours of sitting in an uncomfortable position can
cause muscle or bone injury.
ii. Impact on hearing: using headphones or earphones for a prolonged time and on high volume can cause
hearing problems and in severe cases hearing impairments.
iii. Impact on eyes: This is the most common form of health hazard as prolonged hours of screen time can
lead to extreme strain in the eyes.
iv. Sleep problem: Bright light from computer devices block a hormone called melatonin which helps us
sleep. Thus we can experience sleep disorders leading to short sleep cycles.

2 marks for any two correct points


OR
We call this type of activity as Digital Footprints

Risk involved :
It includes websites we visit emails we send, and any information we submit online,
etc., along with the computer’s IP address, location, and other device specific details. Such data could be used
for targeted advertisement or could also be misused or exploited.

1 mark for naming the activity


1 mark for mentioning any one risk
24 Given two series S1 and S2 2
S1 S2
A 39 A 10
B 41 B 10
C 42 D 10
D 44 F 10
Find the output for following python pandas statements?
a. S1[ : 2]*100
b. S1 * S2

Answer:

a. A 3900
B 4100

b. A 390
B 410
C NaN
D 440
F NaN

1 mark for each correct output

25 Consider the following DataFrame, DF 2

Rollno Name Class Section CGPA


St1 1 Aman IX E 8.7
St2 2 Preeti X F 8.9
St3 3 Kartikey IX D 9.2
St4 4 Lakshay X A 9.4
Write commands to :
i. Add a new column ‘Stream’ to the Dataframe with values (Science, Commerce, Arts, Science.)
ii. Add a new row with values ( 5 , Mridula ,X, F , 9.8, Science)

Answer:
i. DF[‘Activity’]=[‘Science’,’Commerce ’,’Arts’, ‘Science’]
ii. DF.loc[‘St5’]=[1,’Mridula’, ‘X’, ‘F’, 9.8, ‘Science’]
1 mark for each correct answer.
SECTION -C

26 TABLE NAME : PHARMADB 3


DrugID DrugName Manufacture Price PharmacyName Location
Date
5476 Amlodipine 2019-02-11 100.97 Rx Pharmacy Delhi
2345 Paracetamol 2011-05-07 150.25 Raj Medicos Haryana
1236 NebiStar 2021-06-02 160.27 MyChemist Delhi
6512 VitaPlus 2019-03-01 150.81 MyChemist Goa
5631 Levocitrezine 2018-04-12 110.23 RxPharmacy Mumbai
Based on the above table “PHARMADB”, Write outputs for SQL commands to i to iii:

i. SELECT SUBSTR(DrugName ,5,4) FROM PHARMADB WHERE PRICE>160;


ii. SELECT DRUGNAME FROM PHARMADB WHERE DAY(ManufactureDate)>10;
iii. SELECT ROUND ( Price, -1) FROM PURCHASE
WHERE Location= ‘Delhi’

Answer:
i. Star
ii. Amlodipine
Levocitrezine
iii. 100
200
1 mark for each correct output

27 Consider the following DataFrame “HOSPITAL” 3


City Hospitals schools
0 Delhi 189 7916
1 Mumbai 208 8508
2 Kolkata 149 7226
3 Chennai 157 7617

Write python pandas code to create the above dataframe HOSPITAL


Answer:
Import pandas as pd
d1={‘City':[‘Delhi’,’Mumbai’,’Kolkata’,’Chennai’],
'Hospital':[189,208,149,157],'Schools':[7916,8508,7226,7617]}
HOSPITAL=pd.DataFrame(d1)
print(df)

Answer:
½ mark for correct import statement
1 mark for correct dictionary
1 mark for correct use Dataframe method
½ mark for printstatement
28 DataFrame ‘STU_DF’: 3
rollno name marks
0 115 Pavni 97.5
1 236 Rishi 98.0
2 307 Preet 98.5
3 422 Paul 98.0
Perform the following operations on the DataFrame stuDF:
i. Add a new row in dataframe STU_DF with values [444,’karan’,88.0]
ii. Print no of rows and columns in dataframe STU_DF
iii. Delete row for rollno 307.

Answer:
i. STU_DF.loc[4,:]= [444,’karan’,88.0] or STU_DF.loc[4]= [444,’karan’,88.0]
ii. print(STU_DF.shape)
iii. STU_DF.drop(2, axis = 0)
1 marks for each correct statement.
29 3
Identify the type of cybercrime for the following situations:
i. A person complains that Rs. 4.25 lacs have been fraudulently stolen from his/her
account online via some online transactions in two days using NET BANKING.
ii. A person complains that his/her debit/credit card is safe with him still somebody
has done shopping /ATM transaction on this card.
iii. A person complains that somebody has created a fake profile of Facebook and defaming his/her
character with abusive comments and pictures
OR
As a citizen of India, what advice you should give to others for e-waste disposal ? Define them
In details.

Answer:

i. Bank Fraud
ii. Identity Theft
iii. Cyber Stalking
1 mark for each correct type
OR

As a citizen of india , We can advice the following principle of waste management:


Reduce , Reuse and Recycle.
1 mark for each correct advice with explanation.
30 3
Consider the following sql table ‘automobile’

wheel- num-of- Dateofmanufacture


index company body-style base cylinders price
0 bmw sedan 101.234 four 16925 1998-03-27
1 bmw sedan 101.261 six 20970 1999-05-23
2 honda sedan 96.538 four 12945 2000-03-02
3 honda sedan 96.519 four 10345 2001-02-01
4 toyota hatchback 95.727 four 5348 1999-03-01
5 toyota hatchback 95.173 four 6338 2000-05-11

Write SQL queries using SQL functions to perform the following operations:
i. Display company name and body wheel base after rounding off to nearest ten’s decimal places.
ii. Display the position of occurrence of the string “dan” in body style.
iii. Display the year of manufacturing for sedan;
OR
Helps Abhay to Compare Having clause and Order by clause with the help of example?
Answer:
i. Select company, round(wheel-base,-1) from automobile;
½ mark each for correct usage of Select and round()

ii. Select instr(body-style,’dan’) from automobile;


½ mark each for correct usage of Select and instr()

iii. Select year(dateofmanufacture) from automobile where body-style=’sedan’;


½ mark each for correct usage of Select and year()
OR
Having clause is used in conjunction with group by clause in MySQL. It is used to provide condition based
on grouped data. On the other hand, order by clause is an independent clause used to arrange records of a table
in either ascending or descending order on the basis of one or more columns
2 marks for correct explanation and 1 mark for example.
SECTION-D
31 Write the SQL functions which will perform the following operations: 5
i) To display the name of the month of the current date .
ii) To remove spaces from the beginning and end of a string, “ Panorama “.
iii) To display the name of the day eg, Friday or Sunday from your date of birth, dob.
iv) To display the starting position of your first name(fname) from your whole name (name).
v) To compute the remainder of division between two numbers, n1 and n2
OR
Define the following functions
i. LTRIM()
ii. MID()
iii. MOD()
iv. NOW()
v. INSTR()
Answer:
i. Select monthname(date(now()));
ii. Select trim(“ Panaroma “):
iii. Select dayname(date(dob))
iv. Select instr(name, fname);
v. Select mod(n1,n2)
1 mark for each correct answer OR1 mark for each definition of MYSQL funcytion
32 SHARMA Medicos Center has set up its new center in Delhi . It has four buildings as shown in the diagram 5
given below:

Distance between various building are as follows:

As a network expert, provide the best possible answer for the following queries:
i. Suggest a cable layout of connections between the buildings.
ii. Suggest the most suitable place (i.e. buildings) to house the server of this organization.
iii. Suggest the placement of the following device with justification:
a) Repeater b) Hub/Switch
iv. Suggest a system (hardware/software) to prevent unauthorized access to or from the network.
v. The company is planning to link its head office situated in Delhi with the offices in hilly
areas. Suggest a way to connect it economically.
Answer:
i. 1 mark for correct layout
ii. Research Lab
iii. Repeater: Between Accounts and Store, Hub/Switch in each block
iv. Firewall
v. Radio Wave
1 mark for each correct answer or for any other relevant answer
33 Observe the following figure. Identify the coding for obtaining this as output. 5
Also give suitable python statement to save this chart
OR
Write a Python program to display a bar chart of the popularity of programming Languages
Data:
Programming languages: Java, Python, PHP, JavaScript, C#, C++
Popularity: 22.2, 17.6, 8.8, 8, 7.7, 6.7
Also give suitable python statement to save this chart

Answer:
a) import matplotlib.pyplot as plt
eng_marks=[10,55,30,80,50]
st_name=["amit","dinesh","abhishek","piyush","rita"]
plt.plot(st_name,eng_marks)
plt.show()
plt.savefig("aa.jpg")
1 mark for correct import sattement
1 mark for correct declaration of marks and names
1 mark for correct use of plot method
1 mark for correct use of show method
1 mark for corect use of savefigmethod
OR
import matplotlib.pyplot as plt
x = ['Java', 'Python', 'PHP', 'JavaScript', 'C#', 'C++']
popularity = [22.2, 17.6, 8.8, 8, 7.7, 6.7]
plt.bar(x_pos, popularity)
plt.xlabel("Languages")
plt.ylabel("Popularity")
plt.title("PopularitY of Programming Language Worldwide")
plt.show()
plt.savefig(‘CS.jpg’)
½ mark for each correct statement
1 mark for correct savefig method
SECTION -E
34 Consider the Table CLUB given below:
1+1+
COACH_ID COACHNAME AGE SPORTS DATOFAPP PAY SEX 2
1 KUKREJA 35 KARATE 1996-03-27 10000 M
2 RAVINA 34 KARATE 1997-01-20 12000 F
3 KARAN 34 SQUASH 1998-02-19 20000 M
4 TARUN 33 BASKETBALL 1998-01-01 15000 M
5 ZUBIN 36 SWIMMING 1998-01-12 7500 M
Answer the followings based on the above mysql table ‘CLUB’
i. Write sql quesry to display the average pay for karate coach
ii. Write sql query to display month for date of appointment’DATEOFAPP
iii. Write sql query to display the details of male coach in ascending order of their age
OR
iv. Write SQL query to display game wise maximum pay of all caoches.

Answer:
i. SELECT AGV(PAY) FROM CLUB WHERE SPORTS=’KARATE’;
ii. SELECT MONTH(DATEOFAPP) FROM CLUB;
1 mark for each correct query
iii. SELECT * FROM CLUB WHERE SEX=’M’ ORDER BY AGE ASC;
OR
iii. SELECT SPORTS,MAX(PAY) ROM CLUB GROUP BY SPORTS;
2 mark for each correct query
35 Consider the following DataFrame, ClassDF with row index St1,St2,St3,St4 1+1+
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
Based on the above
dataframe answer the following:
A. Predict the output
i. ClassDF.T ii) ClasDF [ : : -2]
B. Write python statement to print Name,class and CGPA for Student St2 and St3
OR
write python Statement to print the name and class of students having CGPA more
than 9.0
Answer:
A. 1 mark for each correct answer
B. ClassDF.loc[St2:St3 , [‘Name’,’Class’,CGPA’]
OR
ClassDF[[‘Name’,’Class’][ClassDF.CGPA>9.0]
2 marks for each correct answer

You might also like