IP Sample Paper 8
IP Sample Paper 8
Sample Paper 8
INFORMATICS PRACTICES (065)
CLASS XII 2023-24
Time: 3 Hours Max. Marks: 70
General Instructions:
1. This question paper contains five sections, 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 02 questions carrying 04 marks each.
7. Section E has 03 questions carrying 05 marks each.
8. All programming questions are to be answered using Python Language only.
Section A
1. Which function returns the length of the string in bytes?
(a) LENGTH ( ) (b) DATE ( )
(c) TIME ( ) (d) MATH ( )
3. A software which is available for free and the code is open for all, it is called as _____.
(a) Proprietary software (b) Free and open source software
(c) Free software (d) None of these
5. As soon we get any good news from any source in social media:
(a) We should forward to many people so that they can be benefited.
(b) We should never forward to anyone.
(c) We should confirm the news from any reliable source before forwarding.
(d) We should forward to our family and friends only.
6. Abhishek uses computer and mobile for his personal use. He uploaded one video on his youtube channel, where he
used one background music downloaded from somewhere on Internet, he may be violating _____.
(a) copyright (b) intellectual property right
(c) plagiarism (d) None of these
7. _____ is a set of moral principles that governs the behaviour of a group or an individual and regulates the use of
computers.
(a) Copyright (b) Computer ethics
(c) Property rights (d) Privacy law
11. series1 = pd.Series ({‘India’ : ‘New Delhi’, ‘UK’ : ‘London’, ‘Japan’ : ‘Tokyo’})
print(series1)
Above code is an example of
(a) creating series from dictionary (b) creating series from scalar values
(c) creating series from an array (d) creating series from tuple
13. _____ network topology in which there are bi-directional links between each possible node.
(a) Ring (b) Mesh
(c) Tree (d) None of these
15. Which SQL clause is used to restrict the rows returned by a query?
(a) SELECT (b) ORDER BY
(c) WHERE (d) GROUP BY
16. Consider a table DOCTOR(ID, DocName, Department, DOJ, Gender, Salary). Which of the following query will
display the names and salaries of doctors in descending order of salaries.
(a) SELECT DocName, Salary FROM DOCTOR ORDER BY Salary DESC;
(b) SELECT DocName, Salary FROM DOCTOR WHERE ORDER BY Salary ASC;
(c) SELECT DocName, Salary FROM DOCTOR ORDER BY Salary ASC;
(d) SELECT DocName, Salary FROM DOCTOR WHERE ORDER BY Salary DESC;
17. Assertion (A) Star topology is a network layout in which all devices are connected to a central hub or switch.
Reason (R) The central hub acts as a central point of communication and controls the flow of data between devices.
(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 and R is true.
18. Assertion (A) Sorting is the operation to arrange data in a specific order, sort_values()function used to perform the
operation.
Reason (R) Row wise sorting cannot be performed in Python DataFrame objects.
(a) Both A and R are true and R is the correct explanation of A.
(b) Both A and R are true and R is not the correct explanation of R.
(c) A is true but R is false.
(d) Both A and R are false.
Section B
19. Given a DataFrame created as:
import pandas as p
Stud=p.Series({‘Name’:[‘Ria’,
‘Priya’, ‘Jack’], ‘Eco’:[56,67,89],
‘IP’:[90,87,45], ‘Eng’:[58,78,32]})
Studdf=p.DataFrame(Stud)
print(Studdf[0:2])
What will be the output of the above code?
20. The Python code written below has syntactical errors. Rewrite the correct code and underline the corrections made.
import pandas as pd
data1 = {ID [1, 2, 3], Name [Riya,
Preeti, Neeta]}
data2 = {ID [4, 5, 6], Name [Siya,
Pratik, Neeraj]}
df1 = pd.DataFrame(data1)
df2 = pd.DataFrame(data2)
result = pd.concat(df1, df2)
print()
21. Complete the given Python code to calculate the mean value of the ‘price’ column in the DataFrame ‘df’.
import _____ as pd
df = pd.DataFrame(‘item’ : [‘A’, ‘B’,
‘C’, ‘D’], ‘price’: [50, 30,
45, 20]})
mean_price = df[‘price’]_____()
print(mean_price)
22. Which SQL function is used to remove leading and trailing spaces from a character expression X, where X =
‘LEARNING ###MYSQL####’ (# denotes a blank space) and also give the output of X.
23. Which type of MySQL function accepts only numeric values? Give the name of some functions of that type.
25. What do you mean by network topology? Write different types of topology.
o
Mr. Chandervardhan is not able to identify the domain name in the given URL. Identify and write it for him. Also,
explain what is URL?
http://www.cbsenic.in/aboutus.htm
Section C
26.
Year Month Passengers
0 2010 Jan 25
1 2010 Mar 50
2 2012 Jan 35
3 2010 Dec 55
4 2012 Dec 65
Write the code to create the above DataFrame:
27. Write an SQL command to create the table BANK whose structure is given below
FieldName Data type Size Constraint
Address varchar 50
28. Abhishek uses computer and mobile for his personal use. Study the following cases and answer the questions given
below.
(a) Once he got the message in Whatsapp that CBSE is announcing the result of class XII tomorrow at 12:00 pm.
He forwarded the message to his few friends. But later, he came to know that no such announcement was there
in CBSE official website. In this case, he violated_____.
(b) He is getting abuse messages from an unknown number due to which he is thinking of quarreling with that
person. The unknown person can be called as _____.
(c) He registered himself in one website by giving his email id and phone number he is leaving _____.
o
Write some symptoms of a malware attack.
30. Mr. Manav, a database administrator in “Global Educational and Training Institute” has created following table
named “Training” for the upcoming training schedule:
Table : Training
Training_Id Name Email Id Topic City Fee
ND01 Mr. Rajan raj@gmail. corn Cyber Security New Delhi 10000
Section D
31. Consider the following table named “Product”, showing details of products being sold in a grocery shop.
Table : Product
PCode PName UPrice Manufacture
P01 Washing Powder 120 Surf
P02 Tooth Paste 54 Colgate
P03 Soap 25 Lux
P04 Tooth Paste 65 Pepsodent
P05 Soap 38 Dove
P06 Shampoo 245 Dove
Write SQL queries for the following and output(s) produced by executing the following queries on the basis of the
information given above in the table Product.
(i) Create the table Product with appropriate data types and constraints.
32. Mr. Krishnamurthy, who is a new user of Python Pandas, has created the following Series “Electrical” carrying
names of electrical appliances as values and their wattage as the index. He wants to perform certain operations on
the Series . You are supposed to help him in writing the commands :
Electrical
Index Name
12W LED
200W Fan
1000W Electric Iron
1200W Rice Cooker
(i) He wants to change the index of Electrical series “LED” element to “A”.
(ii) To display the record of ‘Fan”.
(iii) Remove dataset with index 1000 W.
(Option for part (iii) only)
o
Display the last rows of the dataset.
Section E
33. Consider the following graph. Write the code to plot it.
o
Draw the following bar graph representing the quantity of items in each month.
34. Consider the following table Graduate and write SQL commands for (i) to (v).
Table : Graduate
SNo Name Stipend Subject Average Div
1 Karan 400 Physics 68 1
2 Divakar 450 Computers 68 1
3 Divya 300 Chemistry 62 2
4 Arun 350 Physics 63 1
5 Sabina 500 Mathematics 70 1
6 John 400 Chemistry 55 2
7 Robert 250 Physics 64 1
8 Rubina 450 Mathematics 68 1
9 Vikas 500 Computers 62 1
10 Mohan 300 Mathematics 57 2
(ii) Display a report, listing Name, Stipend, Subject and amount of stipend received in a year assuming that the
Stipend is paid every month.
o
Write SQL queries for the questions from (i) to (v) on the basis of table Class.
(i) Select all the non-medical stream students from the table Class.
(ii) Arrange the records of Class name wise.
(iii) List the records whose grade is B or C.
(iv) Insert the new row with the following data. (06, ‘Jack’, 2800, ‘Humanities’, 98, ‘A’)
(v) Identify the attribute to be best suitable for primary key.
35. A company in Mega Enterprises has 4 wings of buildings as shown in the diagram :
W1 – 150
W2 – 15
W3 – 15
W4 – 25
Computers in each wing are networked but wings are not networked. The company has now decided to connect the
wings also.
(i) Suggest a most suitable cable layout for the above connections.
(ii) Suggest the most appropriate topology of the connection between the wings.
(iii) Suggest the placement of the following devices with justification, if the company wants minimised network
traffic.
EN