IP Sample Paper 5
IP Sample Paper 5
Sample Paper 5
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. Write the output of the following statement.
SELECT ROUND (1023.432, 1);
(a) 1023.5 (b) 1023.432
(c) 1023.43 (d) 1023.4
3. A/An _____ is a self replicating program which eats up the entire disk space or memory.
(a) Spyware (b) Adware
(c) Worm (d) Trojan
5. Jack is a good programmer and wants to contribute to the features of one of the softwares, that he uses. What kind
of software he can contribute to?
(a) Proprietary software
(b) Free software
(c) Open source software
(d) Shareware
6. Anil never writes a subject line in his mails. This is an instance of_____.
(a) Spamming (b) Phishing
(c) Not obeying of E-mail etiquettes (d) Trolling
7. Which among the following are good preventive measures against health hazards of technology use?
(a) Periodic walks between long usage of devices
(b) Using screen guards
(c) No overuse of technology
(d) All of these
8. _____ method is used to add title to the chart.
(a) title( ) (b) caption( )
(c) head( ) (d) heading( )
12. If emp_id contain the set {– 1, – 2, 2, 3, – 3, 1}, what will be the output on execution of the following MySQL
statement?
SELECT emp_id
FROM PERSON
ORDER BY emp_id;
(a) {– 3, – 2, – 1, 1, 2, 3} (b) {–1, 1, – 2, 2, – 3, 3}
(c) {1, 2, 3, –1, – 2, – 3} (d) None of the mentioned
14. Which of the following keywords is used to remove the redundancy from the database?
(a) Different (b) Unique
(c) Distinct (d) None of these
15. What is the significance of the statement “HAVING COUNT (emp_id)>2” in the following MySQL statement?
SELECT name, COUNT (emp_id), emp_no
FROM department
GROUP BY name
HAVING COUNT (emp_id)>2;
(a) Filter out all rows whose total emp_id below 2
(b) Selecting those rows whose total emp_id>2
(c) Both (a) and (b)
(d) None of the mentioned
18. Assertion (A) In March 1989, Tim Berners-Lee took the initiative towards the invention of WWW and wrote the
first proposal for the World Wide Web.
Reason (R) World Wide Web is a way of exchanging information between computers on the Internet.
(a) Both A and R are true and R is the correct explanation for A.
(b) Both A and R are true but R is not the correct explanation for A.
(c) A is true but R is false.
(d) A is false and R is true.
Section B
19. Amisha wants to group the result set based on some column’s value. Also, she wants that the grouped result should
appear in a sorted order. In which order will she write the two clauses (for sorting and for grouping). Give example
to support your answer.
20. The following query is producing an error. Identify the error and also write the correct query.
SELECT * FROM EMP ORDER BY NAME WHERE SALARY>=5000;
23. The Python code written below has syntactical errors. Rewrite the correct code and underline the corrections made.
import pandas as pd
data = (‘A’: Pd.Series([1, 2, 3]),
‘B’: Pd.Series([4, 5, 6]))
df = pd.dataframe(data)
Print(df)
24. Complete the given Python code: to read data from the CSV file ‘data.csv’ into a DataFrame and display the first 5
rows.
import _____ as pd
df = pd.read_csv(_____)
print(df.______(_____))
Section C
26.
LED OLED Curved
0 Samsung SONY Panorama
1 LG TOSHIBA Weston
2 BPL TATA Microsoft
Write the Python code to create the above DataFrame ‘tvdf’.
27. Insert any two rows into a table COLLEGE, whose structure is given below:
Roll_No Name Class Branch
29.
Table : Student
Roll Name Cla-ss DOB Gen-der City Marks
No
1 Anand XI 06-06-1997 M Agra 430
2 Chetan XII 07-05-1994 M Mumbai 460
3 Geet XI 06-05-1997 F Agra 470
4 Priti XII 08-08-1995 F Mumbai 492
5 Saniya XII 08-10-1995 F Delhi 360
6 Neha X 08-12-1995 F Burdwan 324
7 Nishant X 12-06-1995 M Burdwan 429
Based on above table Student, write the output of the following queries.
(i) SELECT Name FROM Student WHERE City IN(“Agra”, “Mumbai”);
(ii) SELECT * FROM Student WHERE Gender=“F” AND Class= “XII”ORDER BY Marks;
(iii) SELECT Gender, AVG(Marks) FROM Student GROUP BY Gender HAVING Class=“XI”;
o
Table : Sales
Column Name
Store_ID
Sales_Date
Sales_Amount
Write queries to find:
(i) The amount for each store.
(ii) The list of all the store name whose total Sales amount is over 5000.
(iii) The total number of stores in the Sales table.
30. Sneha found that her picture posted on a social networking site, has been merged with an unknown person and
published.
(i) What should she do?
(ii) Later she found that after posting some images in social media, some people were writing negative messages.
This is an instance of....
(iii) Using someone’s Twitter handle to post something will be termed as...
o
List e-Waste hazards on environment and on human health.
Section D
31. A DataFrame “States” contains data as follows:
SName Covidcases
0 Punjab 2090
1 WB 1600
2 Kerala 4000
32.
Table : WORKER
WNO NAME DOJ DOB GENDER DCODE
1001 George K 2013-09-02 1991-09-01 MALE D01
1002 Ryma Sen 2012-12-11 1990-12-15 FEMALE D03
1003 Mohitesh 2013-02-03 1987-09-04 MALE D05
1007 Anil Jha 2014-01-17 1984-10-19 MALE D04
1004 Manila Sahai 2012-12-09 1986-11-14 FEMALE D01
1005 R SAHAY 2013-11-18 1987-03-31 MALE D02
1006 Jaya Priya 2014-06-09 1985-06-23 FEMALE D05
Based on above table WORKER, write the SQL queries for (i) to (iv).
(i) To display WNO, NAME, GENDER from the table WORKER in descending order of WNO.
(ii) To display the NAME of all the FEMALE workers from the table WORKER.
(iii) To display the WNO and NAME of those workers from the table WORKER, who are born between ‘1987-01-
01’ and ‘1991-12-01’.
(iv) To count and display MALE workers who have joined after ‘1986-01-01’.
Section E
33. Write the Python code to plot the graph as shown below:
o
Observe the following graph and write the Python code to get the desired graph.
34. Write SQL command for questions (i) to (v) on the basis of table Interiors.
Table : Interiors
No Item Type Dateofstock Price Disc-ount
name
1 Red rose Double Bed 23/02/02 32000 15
2 Soft touch Baby Cot 20/01/02 9000 10
3 Jerry’s home Baby Cot 19/02/02 8500 10
4 Rough wood Office Table 01/01/02 20000 20
5 Comfort zone Double Bed 12/01/02 15000 20
6 Jerry look Baby Cot 24/02/02 7000 19
7 Lion king Office Table 20/02/02 16000 20
8 Royal tiger Sofa 22/02/02 30000 25
9 Park sitting Sofa 13/12/01 9000 15
10 Dine Paradise Dining Table 19/02/02 11000 15
11 White wood Double Bed 23/03/03 20000 20
12 James 007 Sofa 20/02/03 15000 15
13 Tom look Baby Cot 21/02/03 7000 10
(i) To show all information about the sofas from the Interiors table.
(ii) To list the Itemname which are priced at more than 10000 from the Interiors table.
(iii) To list Itemname and Type of those items, in which Dateofstock is be 22/01/02 from the Interiors table in
descending order of Itemname.
(iv) To display Itemname and Dateofstock of items whose discount is more than 15.
(v) To insert a new row in the table with the following data:
14, “True Indian”, “Office Table”, {28/03/03}, 15000, 20
o
Define the following terms:
(i) INSERT Command
(ii) SELECT Command
(iii) DELETE Command
(iv) DCL Command
(v) WHERE Clause
35. Trine Tech Corporation (TTC) is a professional consultancy company. The company is planning to set up their
nev offices in India with its hub at Hyderabad. As a network adviser, you have to understand their requirement and
suggest them the best available solutions. Their queries are mentioned as (i) to (v) below.
EN