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

myCBSEguide

Class 12 - Informatics Practices


Sample Paper - 01 (2022-23)

Maximum Marks: 70
Time Allowed: : 3 hours

General Instructions:

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


2. All questions are compulsory.
3. Section A has 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. To change the 5th column's value at 3rd row as 35 in dataframe DF, you can write
a) DF.iat[3, 5] = 35
b) DF[4, 6] = 35
c) DF[3, 5] = 35
d) DF.iat[4, 6] = 35
2. Identify the right type of chart using the following hints.
a) Scatter plot
b) Pie chart
c) Line chart
d) Bar chart
3. In which of the topology, network components are connected to the same cable?
a) Star
b) Bus
c) Ring
d) Mesh
4. By default, ORDER BY clause lists the results in _______ order.
a) Same
b) Any
c) Descending
d) Ascending
5. The least restrictive open source licence is ________ licence.
a) BSD
b) Apache
c) GNU
d) MIT
6. The length of a network segment in a LAN network is more than 100 metres. Select the device to be connected to
maintain the strength of signal:

Copyright © myCBSEguide.com. Mass distribution in any mode is strictly prohibited.


1 / 10
myCBSEguide
a) Router
b) Repeater
c) Switch
d) Gateway
7. Which of the following is the online textual or multimedia conversation?
a) None of these
b) HTML
c) Chatting
d) VoIP
8. Consider the following query
SELECT * FROM employee ORDER BY salary ________, name ______;
To display the salary from greater to smaller and name in alphabetical order which of the following options should be
used ?
a) Desc, Asc
b) Ascending, Descending
c) Asc, Desc
d) Descending, Ascending
9. Which of the following button allows you to move to the previously visited page on the browser?
a) Back
b) Last
c) Reverse
d) Previous
To practice more questions & prepare well for exams, download myCBSEguide App. It provides complete study
material for CBSE, NCERT, JEE (main), NEET-UG and NDA exams. Teachers can use Examin8 App to create similar
papers with their own name and logo.
10. ________ refers to stealing of required information by seeking and exploting weakness in a computer.
a) Hacking
b) Trademark
c) Piracy
d) Digital Property Rights
11. Which clause is similar to HAVING clause in MySQL?
a) SELECT
b) WHERE
c) FROM
d) None of these
12. Which aggregate function returns the count of all rows in a specified table?
a) None of these
b) COUNT
c) SUM
d) DISTINCT
13. Which type of firewall installed directly into the computer as programs?
a) Both Hardware firewall and Software firewall
b) None of these
c) Software firewall
d) Hardware firewall
14. Which of the following term that encapsulates the legal issues related to the use of Internet?

Copyright © myCBSEguide.com. Mass distribution in any mode is strictly prohibited.


2 / 10
myCBSEguide
a) Cyber stalking
b) None of these
c) Cyber law
d) Cyber crime
15. Which method will be add inside the file to display plot?
a) show()
b) execute()
c) plot()
d) display()
16. Which of the following will give the same answer irrespective of the NULL values in the specified column:
a) MIN()
b) None of these
c) MAX()
d) SUM()
17. Assertion (A): We can add two series objects using addition operator(+) or calling explicit function add().
Reason (R): While adding two series objects index matching is implemented and missing values are filled with NaN by
default.
a) Both A and R are true and R is the correct explanation of A.
b) Both A and R are true but R is not the correct explanation of A.
c) A is true but R is false.
d) A is false but R is true.
18. Assertion (A): Open source software source code is available and the user can make modifications as per their need.
Reason (R): Sometimes you need to make payments for open source Software.
a) Both A and R are true and R is the correct explanation of A.
b) Both A and R are true but R is not the correct explanation of A.
c) A is true but R is false.
d) A is false but R is true.
Section B
19. Write two advantages of using Internet.

OR

What can a user do with WWW?


20. How to display the name 'RAHUL' and 'DEEPAK' into lowercase?
21. Write the output of the following SQL query.

mysql>SELECT TRUNCATE(5.3456, 1);

22. Find the output of the following SQL queries:


i. SELECT ROUND(7658.345,2);
ii. SELECT MOD(ROUND(13.9,0),3);
23. Give some examples of computer worms.

OR

List any two health hazards related to excessive use of Technology.


24. In pandas, S is a series with the following result:
S=pd.Series([5,10,15,20,25])

Copyright © myCBSEguide.com. Mass distribution in any mode is strictly prohibited.


3 / 10
myCBSEguide
The series object is automatically indexed as 0,1,2,3,4. Write a statement to assign the series as a, b, c, d, e index
explicitly.
25. How to access multiple columns in DataFrame?
Section C
26. What is the use of COUNT function?
27. Help Renu in predicting the output of the following queries.
i. SELECT ROUND(8.72,3);
ii. SELECT ROUND(9.8);
28. Write the code to create the following DataFrame
Name Marks Subject
a Abhi 75 Maths

b Chirag 82 Science

c Tushar 69 English
d Mahi 70 Science

e Vanshika 92 Computer
29. What is digital property rights? Write the names of some digital property rights.

OR

Which measure is used to avoid online scam?


30. Write the output of the following queries:

i. mysql >SELECT LENGTH('NAME');

ii. mysql >SELECT MID('INFORMATION', 3, 2);

OR

Find the output of the following SQL queries:


i. SELECT SUBSTR('FIT INDIA MOVEMENT', 5);
ii. SELECT INSTR('ARTIFICIAL INTELLIGENCE', 'IA');
Section D
31. Write the output of following queries.

i. mysql>SELECT POWER(9, 3);

ii. mysql>SELECT MID('SHUCHI GOYAL', 8,5);

iii. mysql>SELECT RIGHT('Dushyant',5);

iv. mysql>SELECT INSTR('SQL FUNCTIONS', 'C');

v. SELECT LEFT('Elpis', 2);

OR

Write a suitable SQL query for the following:


i. Returns the value of 5 raised to the power of 3

Copyright © myCBSEguide.com. Mass distribution in any mode is strictly prohibited.


4 / 10
myCBSEguide
ii. Display the position of occurrence of string 'TECH' in the string 'ELPIS TECHNOLOGY'.
iii. Round off the value 81.89.7328 to two decimal place.
iv. Display the remainder of 450 divided by 7.
v. Remove all the expected leading and trailing spaces from a column empid of the table 'EMPLOYEE'.
32. Write the code in Pandas to create the following DataFrame
Name Designation Salary

1 Abhi DBA 35000


2 Vanshika Pragrammer 40000

3 Riya Tester 32000

4 Chirag Content Writer 25000


5 Tushar Business Analyst 30000

6 Khushal Sales Executive 37000

7 Mahi Web Designer 42000


Write the commands to do the following operations on the DataFrame given above:
i. To select the column Designation.
ii. To change index label from 1 to E101, 2 to E102,... and so on.
To practice more questions & prepare well for exams, download myCBSEguide App. It provides complete study
material for CBSE, NCERT, JEE (main), NEET-UG and NDA exams. Teachers can use Examin8 App to create similar
papers with their own name and logo.
33. Write a code to plot a bar chart to depict the pass percentage of students in CBSE exams for the years 2015 to 2018 as
shown below.

Section E
34. Read the text carefully and answer the questions:
Ankit has created the following dataframe "Climate" to record the data about climatic conditions of four years.
Year MaxTemp MinTemp Rainfall

2017 32 20 123

2018 33 22 140
2019 35 21 135

2020 34 23 160
i. Which code snippets will return the MaxTemp and Rainfall for year 2018 and 2019?
ii. Display the temperature difference between MaxTemp and MinTemp for all the rows in the dataframe Climate.
iii. Write the statement to display two rows from the top in the dataframe.

OR

Copyright © myCBSEguide.com. Mass distribution in any mode is strictly prohibited.


5 / 10
myCBSEguide
Which of the following statement(s) will give the exact number of values in each column of the dataframe?
print(Climate.count()), print(Climate.count(0)), print(Climate.count), print(Climate.count(axis='index'))
35. Read the text carefully and answer the questions:
Institute of Distance Learning is located in Pune and is planning to go in for networking of four wings for better
interaction. The details are shown below:

The distance between various wings

Student Wing to Admin Wing 150 m

Student Wing to Admission Wing 100 m

Student Wing of Lib Wing 325 m


Admission Wing to Admin Wing 100 m

Admission Wing to Lib Wing 125 m

Admin Wing to Lib Wing 90 m

Number of computers

Student Wing 225

Admission Wing 50
Admin Wing 10
Lib Wing 25
i. Suggest the type of networking (LAN, MAN, WAN) for connecting Lib Wing to Admin Wing. Justify your
answer.
ii. Suggest the most suitable place (i.e. wing) to house the server, with a suitable reason.
iii. Suggest and placement of the following devices with reasons.
i. Repeater
ii. Switch

OR

What is the use of firewall in network?

Copyright © myCBSEguide.com. Mass distribution in any mode is strictly prohibited.


6 / 10
myCBSEguide

Class 12 - Informatics Practices


Sample Paper - 01 (2022-23)

Solution

Section A
1. (a) DF.iat[3, 5] = 35
Explanation: DF.iat[3, 5] = 35
2. (c) Line chart
Explanation: Line chart
3. (b) Bus
Explanation: Bus
4. (d) Ascending
Explanation: Ascending
5. (d) MIT
Explanation: MIT
6. (b) Repeater
Explanation: The repeater amplifies the input signal to make up the loss in strength.
7. (c) Chatting
Explanation: Chatting
8. (a) Desc, Asc
Explanation: Desc, Asc
9. (a) Back
Explanation: Back
10. (a) Hacking
Explanation: Hacking
To practice more questions & prepare well for exams, download myCBSEguide App. It provides complete study
material for CBSE, NCERT, JEE (main), NEET-UG and NDA exams. Teachers can use Examin8 App to create similar
papers with their own name and logo.
11. (b) WHERE
Explanation: WHERE
12. (b) COUNT
Explanation: COUNT
13. (c) Software firewall
Explanation: Software firewall
14. (c) Cyber law
Explanation: Cyber law
15. (a) show()
Explanation: show()
16. (d) SUM()
Explanation: SUM()
17. (a) Both A and R are true and R is the correct explanation of A.
Explanation: Both A and R are true and R is the correct explanation of A.
18. (a) Both A and R are true and R is the correct explanation of A.
Explanation: Both A and R are true and R is the correct explanation of A.
Section B

Copyright © myCBSEguide.com. Mass distribution in any mode is strictly prohibited.


7 / 10
myCBSEguide
19. i. It is used for communication, entertainment, searching information and for providing many types of services.
ii. It provides the facility of E-mail.

OR

Using WWW, a user can download files, listen to music, view video files and jump to other documents or websites by
using hypertext links.
20. To convert a uppercase string into lowercase use LOWER() function

mysql>SELECT LOWER('RAHUL');
mysql>SELECT LOWER('DEEPAK');

21. 5.3
22. i. Output - 7658.35
ii. Output - 2
23. MS-Blaster, Mellisa worm, SQL Slammer worm are the common examples of worms.

OR

The continuous use of devices like smartphones, computer desktop, laptops, headphones 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.
24. S=pd.Series([5, 10, 15, 20, 25], index = ['a', 'b', 'c', 'd', 'e'])

25. DataFrame_Object.loc[:, startcolumn : stopcolumn]

Section C
26. COUNT() function returns the total number of values or rows of the specified field or column. COUNT (*) is a special
function, as it returns the count of all rows in a specified table. It includes all the null and duplicate values.
27. i. ROUND() function rounds a number to certain decimal places. Here, number of decimal places is 3 and the number
is 8.72 . So, the output will be 8.720
ROUND (8.72, 3);

8.720
ii. ROUND() function rounds a number to certain decimal places. Here, number of decimal places is 0. So, as per
rounding rules the integer part increases by 1 to give 10.
ROUND (9.8);

28. import pandas as pd


data = {'Name' : ['Abhi', 'Chirag', 'Tushar', 'Mahi ', 'Vanshi ka'],
'Marks' : [75, 82, 69, 70, 92],
'Subject' : ['Maths', 'Science', 'English', 'Science', 'Computer']}
df=pd.DataFrame (data, index = ['a', 'b', 'c', 'd ', 'e'])
print(df)

Copyright © myCBSEguide.com. Mass distribution in any mode is strictly prohibited.


8 / 10
myCBSEguide
29. Digital property includes data, internet accounts and other rights in the digital world, including contractual rights and
intellectual property rights. Data are the files and information stored and used by computers. Digital property right
dispute arise when some form of counterfeiting or piracy occurs between companies.

OR

Do not click on any link in a mail that tells you to change any of you passwords or security code.
30. i. 4
ii. FO

OR

i. Output - INDIA MOVEMENT


ii. Output - 8
Section D
31. i. 729
ii. GOYAL
iii. hyant
iv. 8
v. El

OR

i. Select POW(5,3); Result: 125


ii. select INSTR('ELPIS TECHNOLOGY','TECH');
iii. select round(81.89.7328,2);
iv. select mod(450,7);
v. select trim(empid) from users;

32. import pandas as pd


import numpy as np
array = np.array([['Abhi','DBA', 35000], ['Vanshika', 'Programmer', 40000],
['Riya', 'Tester', 32000], ['Chirag', 'Content Writer', 25000],
['Tushar', 'Business Analyst', 30000], ['Khushal', 'Sales Executive', 37000],
['Mahi', 'Web Designer', 42000]])
index_values = [1, 2, 3, 4, 5, 6, 7]
column_values = ['Name', 'Designation', 'Salary']
df = pd.DataFrame(data = array, index = index_values, columns = column_values)
print(df)

i. df ['Designation' ]
ii. df.rename (index={1 : 'E101' , 2 : 'E102' , 3 : 'E103', 4 : 'E104', 5 : 'E105 ', 6 : 'E106', 7 : 'E107'}, inplace = True)
To practice more questions & prepare well for exams, download myCBSEguide App. It provides complete study
material for CBSE, NCERT, JEE (main), NEET-UG and NDA exams. Teachers can use Examin8 App to create similar
papers with their own name and logo.

33. import matplotlib.pyplot as plt


import numpy as np
objects=('2015', '2016', '2017', '2018')

Copyright © myCBSEguide.com. Mass distribution in any mode is strictly prohibited.


9 / 10
myCBSEguide
y_pos=np.arange(len(objects))
percentage=[82, 83, 85, 90]
plt.bar(y_pos, percentage, color='Grey')
plt.xticks(y_pos, objects)
plt.ylabel('Pass Percentage')
plt.xlabel('Years')
plt.show()

Section E
34. i. Climate.iloc[1:3, 1:2]
With the iloc() function the 1st parameter is the row slice, 2nd parameter is the column index set. Here 2018,
2019 are in index 1, 2 and columns to be shown are 'MaxTemp and 'Rainfall'.
ii. print(Climate["MaxTemp"]-Climate["MinTemp"])
The dataframe numeric columns can be subtracted from each other by indexing them to the dataframe names.
iii. print (Climate.head(2))
The head() function can be used to display the first n rows from a dataframe. Here Climate.head(2) will return
the first two rows.

OR

The call to count(), count(0) and count(axis='index') all return the exact number of values in each column. The
count() is an aggregate function that counts the number of records.
35. i. Since, the distance between Lib Wing and Admin Wing is small. So type of networking is small, i.e. LAN.
ii. Since, maximum number of computers are in Student Wing, so suitable place to house the server is Student
Wing.
iii. i. Repeater should be installed between Student Wing and Admin Wing as distance is more than 60 m.
ii. Switch should be installed in each wing to connect several computers.

OR

Firewall prevents unauthorised access in the network.

Copyright © myCBSEguide.com. Mass distribution in any mode is strictly prohibited.


10 / 10

You might also like