Class 12 IP Half Yearly Sample Paper 2022-23

Class 12 IP Half Yearly Sample Paper 2022-23

 

General instructions :

1. All questions are compulsory.

2. Marks are indicated against each question.

3. Question paper consist five sections A, B, C, D & E.

4. Section A consist of 21 Questions, one mark each.

5. Section B consist of 14 objective type question, one mark each.

6. Section C consist of 10 very short answer type questions, one mark each.

7. Section D consist of 10 short answer type question, two mark each.

8. Section E consist of 5 long answer type question, three mark each.

9. Internal choice have been given for question number 4 (Section A)

 

 

Section – A

SRQuestionsMarks
1Mr. Ankit is working in an organization as data analyst. He uses Python Pandas and Matplotlib for the same. He got a dataset of the passengers for the year 2010 to 2012 for January, March and December. His manager wants certain information from him, but he is facing some problems. Help him by answering few questions given below:

12 IP Q1

Code to create the above data frame:

 import pandas as ____________                                     #Statement 1

data={“Year”:[2010,2010,2012,2010,2012],

             “Month”:[“Jan”,”Mar”,”Jan”,”Dec”,”Dec”] ,

             “Passengers”:[25,50,35,55,65]}

df=pd1.____________________(data)                                #Statement 2

print(df)

iChoose the right code from the following for statement 1.

i. pd                            ii. pd1                       iii. data                           iv. p

1
iiChoose the right code from the following for the statement 2.

i. Dataframe             ii. DataFrame         iii. Series                       iv. Dictionary

1
iiiChoose the correct statement/ method for the required output: (5,3)

i. df.index                  ii. df.shape()           iii. df.shape                  iv. df.size

1
ivHe wants to print the details of “January” month along with the number of passengers, Identify the correct statement:

12 IP Q2

i.                     df.loc[[‘Month’,’Passengers’]][df[‘Month’]==’Jan’]

ii.                   df[[‘Month’,’Passengers’]][df[‘Month’]==’Jan’]

iii.                 df.iloc[[‘Month’,’Passengers’]][df[‘Month’]==’Jan’]

iv.                 df([‘Month’,’Passengers’]][df[‘Month’]==’Jan’)

1
vMr. Ankit wants to change the index of the Data Frame and the output for the same is given below. Identify the correct statement to change the index

12 IP 1V

i.                     df.index[]=[“Air India”,”Indigo”,”Spicejet”,”Jet”,”Emirates”]

ii.                   df.index[“Air India”,”Indigo”,”Spicejet”,”Jet”,”Emirates”]

iii.                 df.index=[“Air India”,”Indigo”,”Spicejet”,”Jet”,”Emirates”]

iv.                 df.index()=[“Air India”,”Indigo”,”Spicejet”,”Jet”,”Emirates”]

1
2Mr. Sharma is working in a 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

Q212IP

He is trying to write a code to plot the graph. Help Mr. Sharma to fill in the blanks of the code and get the desired output.

import__________________________                                                                     #Statement 1 Games=[“Subway Surfer”,”Temple Run”,”Candy Crush”,”Bottle Shot”,”Runner Best”] Rating=[4.2,4.8,5.0,3.8,4.1]

plt.______________(Games,Rating)                                                                  #Statement 2 plt.xlabel(“Games”)

plt.______________(“Rating”)                                                                            #Statement 3 plt._______________                                                                                              #Statement 4

iChoose the right code from the following for statement 1.

i. matplotlib as plt                                          ii. pyplot as plt

iii. matplotlib.pyplot as plt                          iv. matplotlib.plt as pyplot

1
iiIdentify the name of the function that should be used in statement 2 to plot the above graph

i. line()                    ii. bar()                            iii. hist()                        iv. barh()

1
iiiChoose the correct option for the statement 3

i. title(“Rating”)    ii. ytitle(“Rating”)        iii. ylabel(“Rating”)   iv. yaxis(“Rating”)

1
ivChoose the right function/method from the following for the statement 4.

i. display()              ii. print()                        iii. bar()                         iv. show()

1
vIn case Mr. Sharma wants to change the above plot to the any other shape, which statement, should he change

i. Statement 1        ii. Statement 2               iii. Statement 3           iv. Statement 4

1
3A School in Delhi uses database management system to store student details. The school maintains a database ‘school_record’ under which there are two tables

Q312IP

Student Table : Maintains general details about every student enrolled in school. StuLibrary Table : To store details of issued books. BookID is the unique identification number issued to each book. Minimum issue duration of a book is one Day:

iIdentify the SQL Query which displays the data of StuLibrary table inascending order of StudentID.

i)                   Select * from StuLibrary Order By BookID

ii)                 Select * from StuLibrary Order By StuID

iii)               Select * from StuLibrary Order By StuID ASC

iv)               Select * from StuLibrary Order By StuID DESC

 

Choose the correct option:

a. Both Query i) and iv) will display the desired data.

b. Both Query i) and ii) will display the desired data.

c. Both Query iii) and iv) will display the desired data.

d. Both Query ii) and iii) will display the desired data.

1
iiThe Primary Key for StuLibrary Table is/are …….

a.BookID                 b.BookID,StuID                 c.BookID,Issued_date              d.Issued_date

1
iiiWhich of the following SQL Query will fetch ID of those issued books whichhave not been returned?

a.       SELECT BookID from StuLibrary where BookID is NULL;

b.      SELECT BookID from StuLibrary where StuID is NULL;

c.       SELECT BookID from StuLibrary where Issued_date is NULL;

d.      SELECT BookID from StuLibrary where Return_date is NULL;

1
ivThe Alternate Key for Student Table will be ……….

a. StuName               b. StuContact                      c. StuAadhar                               d. StuClass

1
vWhich of the following SQL Query will display dates on which number of issued books is greater than 5?

a.SELECT Issued_date from StuLibrary GROUP BY Issued_datewhere COUNT(*)>5; b.SELECT Issued_date from StuLibrary GROUP BY Return_datehaving count(*)>5 c.SELECT Issued_date from StuLibrary GROUP BY Issued_datehaving count(*)>5

d. SELECT Issued_date from StuLibrary GROUP BY Return_datewhere COUNT(*)>5

1
4Tejasvi Sethi, a car dealer has stored the details of all cars in her showroom in a table called CARMARKET. The table CARMARKET has attributes CARCODE which is a primary key, CARNAME, COMPANY, COLOR, COST (in lakh rupees) of the car and DOM which is the Date of Manufacture of the car.

 

Answer any three questions based on the table CARMARKET from the below mentioned questions.

 

Table: CARMARKET

Q4IP12

 

Choose the correct SQL query to do the following (for parts 1 to 4)

 

 

iDisplay the carname along with the charges rounded off to 1 digit after decimal place.

 

 a. Select carname,round(cost) from carmarket;

b. Select carname,round.cost(1) from carmarket;

c. Select carname,round.cost() from carmarket;

d. Select carname, round(cost,1) from carmarket;

1
iiDisplay the carname, color and position of the character ‘E’ in the color of all the cars. a. select carname,color from carmarket where color like “%E%”;

b. select carname,color,instr(color,’E’) from carmarket;

c. select carname,color from carmarket where color = “%E%”;

d. select carname,color,substr(color,1,’E’) from carmarket;

1
iiiDisplay the carname ,name of the company in lower case of all cars whoseyear (of dom) is 2020.

a. select carname,lcase(company) from carmarket where year(dom) = 2020;

b. select carname,lcase(company) from carmarket where yearof(dom) like’2020%’;

c. select carname,lower(company) from carmarket where dom from’2020-01-01′ to ‘2020- 12-31’;

d. select carname,lower(company) from carmarket where yearfrom(dom) =2020;

1
ivDisplay the number of cars manufactured each year.

a. select count(*),year(dom) from carmarket where year(dom) = distinct;

b. select count(*),year(dom) from carmarket group by year(dom);

c. select count(carmarket),year(dom) from carmarket group by year(dom);

d. select count(distinct *),year(dom) from carmarket group by year(dom);

1
vWhat is the cardinality and degree of the table CARMARKET?

a. Cardinality = 8 and Degree = 6                  b. Cardinality = 6 and Degree = 7

c. Cardinality = 7 and Degree = 6                  d. Cardinality = 7 and Degree = 8

1
5Samarth is the hardware engineer of “Happy School”. He has been given the task of installing a network in the school lab which has around 40 computers.
iSuggest the most suitable type of network topology he should use in order to maximise speed and make each computer indepenent of network breakdowns.

a. Bus Topology                                                   b. Star Topology          

c. Ring Topology                                                 d. Mesh Topology

1
iiIn order to allow data transfer from server to only the intended computers which network device is required in the lab to connect the computers?

a. Switch                                                                 b. Hub

c. Router                                                                 d. Gateway

1
iiiAfter setting up the lab and internet in the lab, Samarth is now required to enable videos and animations to be played on the web browser for students of multimedia class. Which browser tool /service can be used for the same?

a. Plug ins                                                               b. Add ons

c. Control Panel                                                    d. Download Settings

1

Section – B

1IPR stand for :

a. Intelligent Property Right                           b. Intellectual Property Reserve

c. Intellectual Property Right                         d. Intellectual Product Right

1
2Abdul deleted all his chats from all his social media accounts and he think that all his traces are deleted completely. Is he right in thinking so?

a. Yes                                                                      b. No

c. May be                                                               d. Not sure

1
3The trail that is automatically created when a person uses the internet on any digital device like laptops, smart phones , tablets etc is called

a. Cyber bullying                                                 b. Phishing

c. Digital Footprint                                             d. Digital Activity

1
4Internet is an example of _______________topology

a. star                                                                      b. hybrid

c. mesh                                                                   d. tree

1
5Central computer which is powerful than other computers in the network is called as

a. Client                                                                   b. Server

c. Hub                                                                      d. Switch

1
6A website is a collection of :

a. HTML Document                                             b. graphics file

c. audio & video files                                           d. All of these

1
7The …………….. clause of SELECT query allows us to select only those rows in the result that satisfy a specified condition

a. Where                                                                  b. from

c. having                                                                  c. like

1
8What will be returned by the given query:

SELECT INSTR(“INDIA”,”DI”);

a. 2                                                                             b. 3

c. -2                                                                            d. -3

1
9Which of the following group function ignore NULL values

a. MAX                                                                       b. COUNT

c. SUM                                                                       d. All of these

1
10Which of the following is not an aggregate function:

a. AVG                                                                        b. SUM

c. WITH                                                                     d. MIN

1
11Ritika is new learner for the python pandas and she is aware of some concepts of python. She has created some list, but is unable to create the dataframe from the same . Help her by identifying the statement which will create the dataframe

import pandas as pd

Name=[‘Manpreet’,’Kavil’,’Manu’,’Ria’]

Phy=[70,60,76,89]

Chem=[30,70,50,65]

a. df=pd.DataFrame({“Name”:Name, “Phy”:Phy, “Chem”:Chem})

b. d=(“Name”:Name, “Phy”:Phy, “Chem”:Chem)

     dfpd.DataFrame(d)

c. df=pd.DataFrame([Name, Phy, Chem], columns=[“Name”,”Phy”,”Chem”,”Total”])

d. df=pd.DataFrame({Name:”Name”, Phy:”Phy”, Chem:”Chem”})

1
12What type of error is returned by the following statement ?

import pandas as pa

pa.Series([1,2,3,4], index=[‘a’, ‘b’, ‘c’])

a. Value Error                                                             b. Syntax Error

c. Name Error                                                            d. Logical Error

1
13Data Frame can be created from

a. lists                                                                            b. dictionaries

c. series                                                                         d. All of these

1
14Consider a following dataframe

import pandas as pd

s=pd.Series(data=[31,54,34,89,12,23])

df=pd.DataFrame(s)

Which statement will be used to get the output as 2?

a. print(df.index)                                                         b. print(df.shape())

c. print(df.ndim)                                                          d. print(df.values)

 

1

Section – C

Very Short answer type questions

1Write commands to print following details of a series object seal :

i) if the series is empty

ii) Indexes of the series

1
2Why does following code cause error ?

S1=pd.Series(range(1,15,3) , index=list(‘abcd’))

1
3Why does the following code cause error ?

S1= pd.Series(range(1,15,3),index=list(‘ababa’))

print(S1[‘ab’])

1
4Hitesh wants to display the last four rows of the DataFrame df and has written the following code:

df.tail( )

but last 5 rows are being displayed. Identify the error and rewrite the correct code so that last 4 rows get displayed.

1
5In SQL write the Query to display the list of tables stored in a database.1
6Sanjana want to display current time on her SQL window suggest her a command to display the current time.1
7What will be the output of the following code?

mysql> SELECT LCASE(‘INFORMATICS PRACTICES CLASS 12’);

1
8What will be the output of the following code:

mysql>SELECT CONCAT(LOWER(‘CLASS’), UPPER(‘XII’));

1
9Identify the type of topology from the following :

i) Each node is connected with the help of single cable

ii) Each node is connected with central switching through independent cables

1
10For web page where the information is changed frequently, for example stock, weather information which out of the following options would you advise.

Static Web page or Dynamic Web page

1

Section – D

Short answer type questions

1Consider two object x and y. x is a list whereas y is series. Both have value 20,40,90,110.

What will be the output of the following two statement considering that the above object have been created already?

i) print ( x*2)                       ii) print (y*2)

justify your answer.

2
2What will be the output produced by following code?

import pandas as pd

Stationery=[‘pencil’, ‘notebook’, ‘scales’, erasers’]

S1=pd.Series([20,33,52,10], index=Stationery)

S2=pd.Series([17,13,31,32], index=Stationery)

print(S1+S2)

S1=S1+S2

print(S1+S2)

2
3Marks is a list that stores marks of a student in 10 units tests. Write a program to plot the student’s performance in these 10 unit tests2
4Consider the following graph. Write the code to plot it

d4

2
5Draw the following bar graph representing the number of students in each class.

D5

2
6Differentiate between CHAR and VARCHAR datatype2
7Predict the output of the following queries:

Select Power(5,3);

Select MOD(5,3);

2
8Amit don’t know the purpose of the following SQL function. Explain him about them:

Powe( ) and mod( )

2
9Help Reshma in Predicting  the Output of the following queries:

i) Select round(8.72,3);

ii) Select round (9.8);

2
10What is Network ? Why is it needed ? Mention two advantages of Networking2

Section – E

Long answer type questions

1Write a program in python pandas to create the following DataFrame batsman from a Dictionary:

B_NONameScore1Score2
1Sunil Pillai9080
2Gaurav Sharma6545
3Piyush Goel7090
4Kartik Thakur8076

Perform the following operation on the DataFrame:

i) Display the Dataframe.

ii) Add both the scores of a batsman and assign to column “Total”

iii) Display the highest score in both Score1 and Score2 of the DataFrame.

3
2Consider the following table named “Product”, showing details of product being sold in a grocery shop:

PCodePNameUPriceManufacturer
P01Washing Machine120Surf
P02Toothpaste54Colgate
P03Soap25Lux
P04Toothpaste65Pepsodant
P05Soap38Dove
P06Shampoo245Dove

Write SQL queries for the following :

i) Create the table product with appropriate data types and constraints

ii) identify the primary key in product

iii) list  the product code, product name. if PName is the same then display the data in ascending order of Price

iv) Add new column discount to the table product

v) Calculate the value of the discount in the table product as 10 percent of the UPrice for all those product where the UPrice is more than 100, otherwise the discount will be 0.

3
3Satyam, a database analyst has created the following table:

Table : Student

RedNoSNameStreamOptionalMarks
S1001SunainaScienceCS99
S1002SajidCommerceIP95
S1003ManmeetHumanitiesIP100
S1004NidaCommerceIP98
S1005TalhaHumanitiesIP82
S1006PrayanshScienceCSNULL
S1007MuskanScienceCS95
S1008NavdeepScienecCS96

He has written following queries:

a) Select sum(MARKS) from student where Optional=’IP’and Stream=’Commerce’;

b) Select max(MARKS) + min(MARKS) from student where OPTIONAL= ‘CS’;

c) Select avg(MARKS) from student where OPTIONAL = ‘IP’;

d) Select length (SNAME) from student where MARKS is NULL;

help him in predicting the output of the above given queries.

3
4What do you mean by network topology? What are the most popular topologies3
5Write the different between the following :

i) Copyright and Patent

ii) Plagiarism and Copyright infringement

iii) Non-Ethical hacking and Ethical Hacking

iv) Active and Passive footprint

v) free software and free and open source software

3

*** BEST OF LUCK ***

 

Prepared By:

Syed Haider Ali (PGT)

 

Copywrite © 2020-2025, CBSE Python,
All Rights Reserved