0% found this document useful (0 votes)
194 views46 pages

Practices Practices: Informatics

Uploaded by

Deepanshu digari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
194 views46 pages

Practices Practices: Informatics

Uploaded by

Deepanshu digari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

Informatics

Class 12 CCT Question Bank – Science Domain

Practices
Practices
Good specifications will always improve
programmer productivity far better than
any programming tool or technique.
— Milt Bryce

2022

CCT Questions
CLASS XII

281 | P a g e
Class 12 CCT Question Bank – Science Domain

Question 1:
Kritika is a new learner for the python pandas, and she is aware of some concepts
of python. She has created some lists, but is unable to create the Series that will
have chemical element name as value and symbol as index. Help her by identifying
the statement which will create the data series.
import pandas as pd
Name= ['Hydrogen', 'Helium', 'Lithium', 'Beryllium']
Symbol=['H', 'He', 'Li', 'Be']

1: Help her by identifying the statement which will create the data series.

a) C=pd.series(Name,index=Symbol) b) C=pd.Series(Name,index=Symbol)

c) C=pd.Series(Symbol,Name) c) C=df.Series(Name,index=Symbol)

She has written a code to create a panda series S1 of even numbers, but she got the
result, as shown below
0 2
1 4
2 6
3 7
dtype: int64

2: Help her to choose correct code to modify S1 for desired result


a) S1[3]=8
b) S1.loc[3]=8
c) S1.iloc[3]=8
d) All are correct

3: Choose the correct statement/ method to get number of elements in series:


a) S1.size
b) S1.size()
c) S1.index
d) S1.shape()

282 | P a g e
Class 12 CCT Question Bank – Science Domain

4: print last three elements from series.


a) S1.tail(3)
b) S1.iloc[(len(s1)-3):]
c) S1.loc[(len(s1)-3):]
d) All are correct

Question 2:
Consider the following Series object school
Lucknow 350
Delhi 230
Mumbai 350
Punjab 400
Bihar 322
Write python code to:
1: Change the value of state Punjab by 460.
a) School(‘punjab’)=460 b) school[‘Punjab’]=460
c) school.iloc[3]=460 d) Both b and c are correct

2: Display schools of state Bihar and Mumbai.


a) print([‘Bihar’,’Mumbai’])
b) print(school.Bihar,school.Mumbai)
c) print(school[[‘Bihar’,’Mumbai’]])
d) print(school([‘Bihar’],[‘Mumbai’])

3: Display which state has maximum number of schools


a) print(max(school)) b) print(school.max())
c) print(school.sort_values().tail(1)) d) both a and c

4: Delete the details of Delhi from series.


a) school.drop(‘Delhi’,inplace=True) b) school.del(‘Delhi’)
c) school.pop(‘Delhi’) d) school.pop([‘Delhi’])

283 | P a g e
Class 12 CCT Question Bank – Science Domain

Question 3:
Sumit a student of class XII wants to create a Series, He had written following
code, Help him to choose statement to get the desired result.His aim is to create
series which will store total marks as value and students name as index.
import pandas as __________ #statement 1
Name = ['Amit','Harsh','Rajnish','Manish','Aman','Dolly','Suman']
Tmarks =[345,200,350,400,450,250,370]
Mark=pd.________________ #statement2
Mark.____________=Name #statement 3
print(______) # statement4
1: Statement 1 will be
a) pd b) p c) df d) data

2: Statement 2 will be
a) Series(data=Tmark) b) Series(Tmark)
c) Series(value=Tmark) d) Both a and b are correct

3: statement 3 will be
a) loc b) iloc c) index d) [index]

4: statement 4 will be
a) Tmark b) Name c) Mark d) ‘Mark’

Question 4:
Ravi a student of class XII wants to create a Series. Consider the following Series
object Mark. He had written code for series Mark, help him to write correct
statement to accomplish the task.
Amit 345
Harsh 200
Rajnish 350
Manish 400
Aman 450
Dolly 250
Suman 370

284 | P a g e
Class 12 CCT Question Bank – Science Domain

print(__________) # statement1, to display marks of Amit.


print(__________ ) # statement2, Display details of those students who score less
than 300
________________#statement 3, Delete the details of Rajnish, Manish and Dolly.
________________# Increase the marks of students by 5 who score more than 300.

Question 5:
Annu, has created a Series that stores the registered migrants in some states,
import pandas as pd
Migrants=[334,8910,6789,14677,8291,17632]
Regis_Mig=pd.Series(Migrants)
Regis_Mig.index=[‘Punjab’, ’Delhi’, ’Haryana’, ’Rajasthan’, ’Tamil Nadu’,
’Maharashtra’]

1: what will she should write to get output:


Delhi 8910
Haryana 6789
dtype: int64
a) print(Regis_Mig.iloc[1:3]) b) print(Regis_Mig.loc[1:3])
c) print(Regis_Mig(Delhi,Haryana)) d) print(Regis_Mig)

2: Punjab 334
Haryana 6789
Tamil Nadu 8291
dtype: int64
a) print(Regis_Mig.iloc[:3]) b) print(Regis_Mig.loc[::2])
c) print(Regis_Mig.iloc[::2]) d) print(Regis_Mig[[‘’,’’,’’]])

3: Print the states having more than 8000 registered migrants.


a) print(Regis_Mig[Regis_Mig>8000]) b) print(Regis_Mig>8000)
c) print(Regis_Mig(Regis_Mig>8000)) d) Both b and c are correct

285 | P a g e
Class 12 CCT Question Bank – Science Domain

4: output of print(Regis_Mig.sort_values().tail(3)) is:


a) Rajasthan 14677
Tamil Nadu 8291
Maharashtra 17632
dtype: int64
b) Delhi 8910
Rajasthan 14677
Maharashtra 17632
dtype: int64
c) Punjab 334
Delhi 8910
Haryana 6789
dtype: int64
d) Punjab 334
Haryana 6789
Tamil Nadu 8291
dtype: int64

Question 6:
Zeenat has created the following data frame dataframe1 to keep track of data
about aids, of different states.
TOYS BOOKS UNIFORM SHOES
ANDHRA 7916 6189 610 8810
ODISHA 8508 8210 508 6798
M.P. 7226 6149 611 9611

1: Which among the following option will give 8508, 8210 as output
a) print(max(dataframe1[' TOYS ',' BOOKS '])
b) print((dataframe1. TOYS.max(),(dataframe1. BOOKS .max())))
c) print(max(dataframe1[' TOYS’])
d) print(max(dataframe1[' BOOKS '])

286 | P a g e
Class 12 CCT Question Bank – Science Domain

2.Which of the following statement/s will delete the 3rd column?


a. del dataframe1['Marks1']
b. dataframe1.pop('Marks1')
c. drop dataframe1['Marks1']
d. pop dataframe1['Marks1']
Choose the correct option:
a) both (a) and (b)
b) only (b)
c) (a), (b) and (c)
d) (a), (b) and (d)

Question 7:
Consider the following DataFrame df1
POPULATION HOSPITALS SCHOOLS
DELHI 10927986 189 7916
MUMBAI 12691836 208 8508
KOLKATA 4631392 149 7226
CHENNAI 4328063 157 7617
1. Write command that will give the following output:
DELHI 10927986
MUMBAI 12691836
KOLKATA 4631392
CHENNAI 4328063

i. print(df1[‘POPULATION’])
ii. print(df1. POPULATION)
iii. print(df1(POPULATION))
iv. print(df1(‘POPULATION’))
chose the correct option
a) Only i b) Only i and ii c) Only i and iii d) Only iv

287 | P a g e
Class 12 CCT Question Bank – Science Domain

2. Display all details of DELHI


a) df1.loc[‘DELHI’:] b) df1.iloc[0:]
c) df1[DELHI] d) Both a and b

Question 8:
Rohit has created a dataframe, Consider the dataframe Df1 which stores details of
students. Now further he wants add more columns, what will be the
command/statement, he should choose to achieve desired results.
NAME ACCOUNTS MATHS BST IP ECO
10 Ritu 88 67 87 97 56
11 Mridul 67 78 77 87 90
21 Yashvi 87 89 78 82 92
12 Deepak 67 82 76 98 78
13 Jatin 56 66 77 87 67

Write python code to


1. add a new column ‘Total’ to display total marks of each student.
NAME ACCOUNTS MATHS BST IP ECO Total
Ritu 88 67 87 97 56 395
Mridul 67 78 77 87 90 399
Yashvi 87 89 78 82 92 428
Deepak 67 82 76 98 78 401
Jatin 56 66 77 87 67 353

2. add a new column ‘AVG’.


3. change BST marks of Ritu to 90.
4. remove details of Yashvi.

Question 9:
Wild life department has appointed Sumit as data analyst, He has prepared a
dataframe to do some analysis, Observe the following Dataframe df1,
Tiger Deer Bear Fox
0 35 115 70 125
1 65 52 15 65
2 75 45 40 120
3 50 55 50 123
4 25 68 82 89

288 | P a g e
Class 12 CCT Question Bank – Science Domain

1: Mr. Sumit 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.
Tiger Deer Bear Fox
Assam 35 115 70 125
UP 65 52 15 65
Odisha 75 45 40 120
Sikkim 50 55 50 123
Manipur 25 68 82 89
a) df1.index=['Assam','U.P.','Odisha','Sikkim','Manipur']
b) df1[]=['Assam','U.P.','Odisha','Sikkim','Manipur']
c) df1[index]= ['Assam','U.P.','Odisha','Sikkim','Manipur']
d) df1.index()=['Assam','U.P.','Odisha','Sikkim','Manipur']
2:
Tiger Deer Elephant Bear Fox
35 115 20 70 125
65 52 25 15 65
75 45 38 40 120
50 55 21 50 123
25 68 16 82 89
a) df1.loc[Élephant]= [20,25,38,21,16]
b) df1.insert(2, 'Elephant', [20,25,38,21,16])
c) df1.iloc[‘Elephant’]= [20,25,38,21,16]
d) df1.append(‘Elephant’:[20,25,38,21,16])
3: What code should write to get state wise Elephants details
Assam 20
U.P. 25
Odisha 38
Sikkim 21
Manipur 16
Name: Elephant, dtype: int64
a) print(df1['Elephant'])
b) print(df1.loc[‘Elephant’])
c) print(df1.Elephant)
d) both a and c

289 | P a g e
Class 12 CCT Question Bank – Science Domain

Question 10:
Raman 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
1: Which of the following code snippets will return the MaxTemp and Rainfall for
year 2018 and 2019?
a. Climate[['MaxTemp','Rainfall']][1:3]
b. Climate['MaxTemp', 'Rainfall'][1:3]
c. Climate.iloc[1:3]
d. Climate.iloc[1:3,1:2]

2: Display the temperature difference between MaxTemp and MinTemp for all
the rows in the dataframe Climate.
a. Climate=Climate["MaxTemp"]-Climate["MinTemp"]
b. print(Climate["maxt"]-Climate["mint"])
c. print(Climate["MaxTemp"]-Climate["MinTemp"])
d. print(Climate.Climate["MaxTemp"]-Climate["MinTemp"])

3: To display 2 rows from the top in the dataframe, which of the following
statement is correct:
a. print (Climate.head()=2 )
b. print (Climate.head(n==2) )
c. print (Climate.head(range(2)) )
d. print (Climate.head(2) )

290 | P a g e
Class 12 CCT Question Bank – Science Domain

4: Which of the following statement/s will give the exact number of values in
each column of the dataframe?
a. print(Climate.count())
b. print(Climate.count(0))
c. print(Climate.count)
d. print(Climate.count(axis='index'))
Choose the correct option:
a) both (a) and (b)
b) only (b)
c) (a), (b) and (c)
d) (a), (b) and (d)

Question11:
Given below are two statements one labelled as Assertion (A) and other is
labelled as a Reason (R).

Assertion (A) : A histogram is basically used to represent data in the form of


some groups.
Reason (R): It is a type of bar plot where the X-axis represents the bin ranges
while the Y-axis gives information about frequency. The hist() function is used to
compute and create a histogram.

Consider the above statement and choose the correct answer from the options
given below:
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.

Question12:
Given below are two statements one labelled as Assertion (A) and other is
labelled as a Reason (R).

Assertion (A) : Scatter plot is plotted using the scatterplot() method.


Reason (R): This is similar to Matplotlib, but additional argument data is
required.

291 | P a g e
Class 12 CCT Question Bank – Science Domain

Consider the above statement and choose the correct answer from the options
given below:
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.

Question13:
Read the passage given below and answer the following question:

In today’s world, a lot of data is being generated on a daily basis. And sometimes
to analyse this data for certain trends, patterns may become difficult if the data is
in its raw format. To overcome this data visualization comes into play. Data
visualization provides a good, organized pictorial representation of the data which
makes it easier to understand, observe, analyse. In this tutorial, we will discuss
how to visualize data using Python.
Python provides various libraries that come with different features for
visualizing data. All these libraries come with different features and can support
various types of graphs. In this tutorial, we will be discussing four such libraries.
• Matplotlib
• Seaborn
• Bokeh
• Plotly

(i) Data visualization provides a . . . . . . . . . representation of the data which


makes it easier to understand, observe, analyse.
(a) good (b) good, pictorial
(c) pictorial (d) good, organized pictorial

(ii) Which library is used to that supports graph for data visualisation.
(a) graphics (b) Math (c) Matplotlib (d) pandas

Question14:
Given below are two statements one labelled as Assertion (A) and other is
labelled as a Reason (R).

Assertion (A): A bar plot or bar chart is a line.


Reason (R): A bar chart represents the category of data with rectangular bars
with lengths and heights that is proportional to the values which they represent.
It can be created using the bar() method

292 | P a g e
Class 12 CCT Question Bank – Science Domain

Consider the above statement and choose the correct answer from the options
given below:
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.

Question15:
Given below are two statements one labelled as Assertion (A) and other is
labelled as a Reason (R).

Assertion (A): Seaborn is a high-level interface built on top of the Matplotlib.


Reason (R): It provides beautiful design styles and colour palettes to make more
attractive graphs.
Consider the above statement and choose the correct answer from the options
given below:
A. Both (A) and (R) are true, but (R) is not the correct explanation of (A).
B. Both (A) and (R) are true, and (R) is the correct explanation of (A).
C. (A) is true but (R) is false.
D. (A) is false but (R) is true.

Question16:
Given below are two statements one labelled as Assertion (A) and other is labelled
as a Reason (R).

Assertion (A): The data visualisation should be light and must highlight essential
aspects of the data.
Reason (R): looking at important variables, what is relatively important, what are
the trends and changes. Besides, data visualisation must be visually appealing but
should not have unnecessary information in it.
One can answer this question in multiple ways: from technical points to
mentioning key aspects, but be sure to remember saying these points:
1. Data positioning
2. Bars over circle and squares
3. Use of colour theory
4. Reducing chart junk by avoiding 3D charts and eliminating the use of pie charts
to show proportions
5. why sunburst visualization is more effective for hierarchical plots

293 | P a g e
Class 12 CCT Question Bank – Science Domain

Consider the above statement and choose the correct answer from the options
given below:
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.

Question17:
Observer The following code of python and give the answer in true or false -
1. import pandas as pd
2. import matplotlib.pyplot as plt
3. data = pd.read_csv("tips.csv")
4. plt.plot(data['tip'])
5. plt.plot(data['size'])
6. plt.title("Scatter Plot")
7. plt.xlabel('Day')
8. plt.ylabel('Tip')
9. plt.show()
A. Line 1 and Line 2 are importing library to program file. (True/False)
B. In Line 3 Data will be inputted manually in data object. (True/False)
C. Line 6 will put the “Scatter Plot” above the diagram. (True/False)
D. If we skip Line 9. Still the plot will be visible. (True/False)
Question18:
Given below are two statements one labelled as Assertion (A) and other is
labelled as a Reason (R).

Assertion (A): Anil wants to visualise Lowe/Upper Quartile, Median &


dispersion of his data.
Reason (R): He may use box-plot in python to obtain Lowe/Upper Quartile,
Median & dispersion.

Consider the above statement and choose the correct answer from the options
given below:
A. Both (A) and (R) are true, and (R) is the correct Solution of (A).
B. Both (A) and (R) are true, but (R) is not the correct Solution of (A).
C. (A) is true but (R) is false.
D. (A) is false but (R) is true.

294 | P a g e
Class 12 CCT Question Bank – Science Domain

Question19:
Given below are two statements one labelled as Assertion (A) and other is labelled
as a Reason (R).

Assertion (A): The plot() function is used to draw points (markers) in a diagram
Reason (R): By default, the plot() function draws a line from point to point. The
function takes parameters for specifying points in the diagram. Parameter 1 is an
array containing the points on the x-axis. Parameter 2 is an array containing the
points on the y-axis. If we need to plot a line from (1, 3) to (8, 10), we have to pass
two arrays [1, 8] and [3, 10] to the plot function
Consider the above statement and choose the correct answer from the options
given below:
A. Both (A) and (R) are true, and (R) is the correct Solution of (A).
B. Both (A) and (R) are true, but (R) is not the correct Solution of (A).
C. (A) is true but (R) is false.
D. (A) is false but (R) is true.

Question 20:
Given below are two statements one labelled as Assertion (A) and other is
labelled as a Reason (R).

Assertion (A): Specify that you want a scatter plot with the kind argument:
kind = 'scatter'
Reason (R): A scatter plot needs an x- and a y-axis.
In the example below, we will use "Duration" for the x-axis and "Calories" for the
y-axis.
Include the x and y arguments like this:
x = 'Duration', y = 'Calories'

Consider the above statement and choose the correct answer from the options
given below:
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.

Question 21:
A School in Kanpur uses database management system to store student details. The
school maintains a database 'school_record' under which there are two tables.
Student Table: Maintains general details about every student enrolled in school.

295 | P a g e
Class 12 CCT Question Bank – Science Domain

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.

A. Identify the SQL Query which displays the data of StuLibrary table in
ascending order of Student-ID.
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.

B. The Primary Key for StuLibrary Table is/are …….


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

296 | P a g e
Class 12 CCT Question Bank – Science Domain

C. Which of the following SQL Query will fetch number of issued books issue
date wise which have not been returned yet?
a. SELECT Issued_date, count(BookID) ,StuID from StuLibrary where
Return_date is NULL GROUP BY Issued_date;
b. SELECT Issued_date, count(BookID) from StuLibrary where Return_date =
NULL GROUP BY Issued_date;
c. SELECT Issued_date, count(BookID) from StuLibrary where Return_date is
‘NULL’ GROUP BY Issued_date;
d. SELECT Issued_date, count(BookID) from StuLibrary where Return_date is
NULL GROUP BY Issued_date;

D. Which of the following SQL Query will display the class(es) with number of
students greater than 30?
a. SELECT StuClass, count(StuId) from StuLibrary GROUP BY StuClass HAVING
count(StuId)>30;
b. SELECT StuClass, count(StuId) from StuLibrary GROUP BY StuId HAVING
COUNT(StuId)>30;
c. SELECT StuClass, count(StuId) from StuLibrary GROUP BY StuClass HAVING
SUM(StuId)>30;
d. SELECT StuClass, count(StuId) from StuLibrary GROUP BY StuClass WHERE
COUNT(StuId)>30;

E. Which 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_date WHERE
COUNT(*)>5;
b. SELECT Issued_date from StuLibrary GROUP BY Return_date HAVING
count(*)>5
c. SELECT Issued_date from StuLibrary GROUP BY Issued_date HAVING
count(*)>5
d. SELECT Issued_date from StuLibrary GROUP BY Return_date WHERE
COUNT(*)>5

297 | P a g e
Class 12 CCT Question Bank – Science Domain

Question 22:
Tejasvi 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 aprimary key, CARNAME, COMPANY, COLOR, COST (in lakh rupees) of the car
and DOM which is the Date of Manufacture of the car.
Help her by answering the below mentioned questions based on the table
CARMARKET given below:
TABLE: CARMARKET
CARCODE CARNAME COMPANY COLOR COST DOM
C01 BALENO SUZUKI BLUE 5.90 2019-11-07
CO2 INDIGO TATA SILVER 12.90 2020-10-15
C03 GLC MERCEDES WHITE 62.38 2020-01-20
C04 A6 AUDI RED 58.55 2018-12-29
C05 INNOVA TOYOTA BLACK 32.82 2017-11-10
C06 WAGON-R SUZUKI WHITE 12.11 2016-11-11
C07 BREZZA SUZUKI GOLDE 9.80 2016-10-03
N

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


i. Display the car name 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;

ii. Display 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;

298 | P a g e
Class 12 CCT Question Bank – Science Domain

iii. Display the carname, name of the company in lower case of all cars whose
year of dom is 2020.
a. select carname, lcase(company) from carmarket where year(dom)=2020;
b. select carname, lcase(company) from carmarket where year of(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 year
from(dom)=2020;

iv. Display 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);

v. What is the cardinality and degree of the table CARMARKET?


a. Cardinality=8and Degree=6
b. Cardinality=6andDegree=7
c. Cardinality=7andDegree=6
d. Cardinality=7andDegree=8

Question 23:
Consider the table CarMarket given in Q 2 and guess the correct output of the SQL
Queries given below :
i. SELECT CARNAME, ROUND(COST,1) FROM CARMARKET WHERE
CARCODE =’C04’;
a. 58.5
b. 58.6
c. 58.0
d. 59.0

299 | P a g e
Class 12 CCT Question Bank – Science Domain

ii. SELECT CARNAME, COLOR, INSTR(COLOR,'E') FROM CARMARKET WHERE


YEAR(DOM)>2019;
a. BALENO BLUE 4 b. INDOGO SILVER 1
GLC WHITE 1
c. INDOGO SILVER 4 d. INDOGO SILVER 5
GLC WHITE 4 GLC WHITE 5

iii. SELECT CARNAME, LCASE(COMPANY) FROM CARMARKET WHERE


MONTHNAME(DOM)=‘JANUARY’;
a. BALENO suzuki
b. GLC MERCEDES
c. GLC mercedes
d. Innova Toyota
iv. SELECT COUNT(*),YEAR(DOM) FROM CARMARKET GROUP BY
YEAR(DOM) HAVING COUNT(*)=2;
a. 1 2019
2 2020
1 2018
1 2017
2 2016

b. 1 2019
1 2018
1 2017

c. 1 2020
1 2020
1 2016
1 2016

300 | P a g e
Class 12 CCT Question Bank – Science Domain

d. 2 2020
2 2016

v. SELECT CARNAME, ROUND(COST,-1) FROM CARMARKET WHERE


MONTH(DOM)=12;
a. A6 59
b. A6 60
c. A6 58.6
d. A6 57.55

Question 24:
Consider the table STUDENT given below

I) State the command that will give the output as :

i. select name from student where class=’XI’ and class=’XII’;


ii. select name from student where not class=’XI’ and class=’XII’;
iii. select name from student where city=”Agra” OR city=”Mumbai”;
iv. select name from student where city IN(“Agra”, “Mumbai”);

301 | P a g e
Class 12 CCT Question Bank – Science Domain

Choose the correct option:


a. Both (i) and (ii).
b. Both (iii) and (iv).
c. Any of the options (i), (ii) and (iv)
d. Only (iii)
II) What will be the output of the following command?
Select * from student where gender =”F” order by marks;
a. b.

c. d.

III) Prachi has given the following command to obtain the highest marks
Select max(marks) from student where group by class;
but she is not getting the desired result. Help her by writing the correct
command.
a. Select max(marks) from student where group by class;
b. Select class, max(marks) from student group by marks;
c. Select class, max(marks) group by class from student;
d. Select class, max(marks) from student group by class;

IV) State the command to display the average marks scored by students of each
gender who are in class XI?
i. Select gender, avg(marks) from student where class= “XI” group by gender;
ii Select gender, avg(marks) from student group by gender where class=”XI”;
iii. Select gender, avg(marks) group by gender from student having class=”XI”;

302 | P a g e
Class 12 CCT Question Bank – Science Domain

iv. Select gender, avg(marks) from student group by gender having class = “XI”;
Choose the correct option:
a. Both (ii) and (iii)
b. Both (ii) and (iv)
c. Both (i) and (iii)
d. Only (iii)

V) Help Ritesh to write the command to display the name of the youngest
student?
a. select name, min(DOB) from student ;
b. select name, max(DOB) from student ;
c. select name, min(DOB) from student group by name ;
d. select name, maximum(DOB) from student;

Question 25:
Write the output produced by the following SQL commands:
a) SELECT POW(2,3);
b) SELECT ROUND(123.2345, 2),ROUND(342.9234,-1);
c) SELECT LENGTH("Informatics Practices");
d) SELECT YEAR (“1979/11/26”), MONTH (“1979/11/26”), DAY
(“1979/11/26”), MONTHNAME (“1979/11/26”);
e) SELECT LEFT("INDIA",3), RIGHT("ComputerScience",4);
f) SELECT MID("Informatics",3,4), SUBSTR("Practices",3);

303 | P a g e
Class 12 CCT Question Bank – Science Domain

Question 26:
Note: Consider the records in Table Employee below wherever needed in Query:

Read the paragraph carefully and then write the correct output option for the
SQL statements given after the paragraph
MID ()/SUBSTRING ()/SUBSTR () String functions of SQL returns the specified
number of characters from the middle of the string. Its Syntax is -
SUBSTRING (str,m,n)
Or
MID(str,m,n)
Or
SUBSTR (str,m,n)
Or
SUBSTR (str from m for n)
There are 3 arguments. The first argument is the source string. The second
argument is the position of first character to be displayed. The third argument is
the number of characters to be displayed.
If the third argument is missing, then starting from the position specified, the rest
of the string is returned. It is also possible to use a negative value for the second
argument ie. Position (pos).
In such a case, the beginning of the substring is pos characters from the end of the
string,
Note: SUBSTR is the same as SUBSTRING

304 | P a g e
Class 12 CCT Question Bank – Science Domain

INSTR (str,substr) returns the position of the first occurrence of substring substr
in string str.
Select the correct output option
a) mysql> SELECT INSTR('Computers', 'pet');
i) 4 ii) 3 iii) 0 iv) No
b) mysql> SELECT INSTR(First_Name,'Kiran') FROM Employee;
i) +--------------------------------------+ ii) +-------------------------------------+
| INSTR(First_Name,'Kiran') | | INSTR(First_Name,'Kiran') |
+------------------------------------+ +------------------------------------+
|0 | |0 |
|4 | |3 |
|4 | |3 |
|0 | |0 |
|0 | |0 |
+-------------------------------------+ +------------------------------------+
iii) +---------------------------------------+ iv) +-------------------------------------+
| INSTR(First_Name,'Kiran') | | INSTR(First_Name,'Kiran') |
+--------------------------------------+ +------------------------------------+
|0 | |0 |
|0 | |3 |
|4 | |4 |
|0 | |0 |
|0 | |0 |
+--------------------------------------+ +------------------------------------+

c) mysql> SELECT SUBSTRING('Informatics', 4);


i) ‘Info’ ii) 'formatics' iii) 'ormatics' iv) ‘tics’
d) mysql> SELECT SUBSTRING('Computers', -3);
i) ‘-Com’ ii) 'moC' iii) 'sre' iv) ‘ers’

e) mysql> SELECT MID('Computers', -5, 3);


i) ‘etu’ ii) 'ute' iii) 'mpu' iv) ‘upm’
f) mysql> SELECT SUBSTRING('Computers', -4, 2);
i) ‘te’ ii) 'et' iii) 'ut' iv) ‘tu’
g) mysql> select MID(first_name,3,2) FROM Employee where city like ‘%a_’;

305 | P a g e
Class 12 CCT Question Bank – Science Domain

i) +-----------------------------+ iii) +-----------------------------+


| MID(first_name,3,2) | | MID(first_name,3,2) |
+-----------------------------+ +-----------------------------+
| mt | | ta |
| aw | | wn |
+-----------------------------+ +-----------------------------
+
ii) +-----------------------------+ iv) +-----------------------------+
| MID(first_name,3,2) | | MID(first_name,3,2) |
+-----------------------------+ +-----------------------------+
| mt | | mt |
| wn | | wa |
+-----------------------------+ +-----------------------------
+

Question 27:
Read the text carefully and then write the correct output of the SQL
statements:
COUNT() function is used to count the number of values in a column. COUNT()
takes one argument which can be any column name, an expression based on a
column, or an asterisk (*). When the argument is a column name or an expression
based on a column, COUNT() returns the number of non-NULL values in that
column. If the argument is a *, then COUNT() counts the total number of rows
satisfying the condition, if any, in the table.
Aggregate functions and NULL values:
None of the aggregate functions takes NULL into consideration. NULL is simply
ignored by all the aggregate functions. For example, the statement:
SELECT COUNT(*) FROM shoes;
produces the following output:
+---------------+
| COUNT(*) |
+---------------+
| 13 |
+---------------+

306 | P a g e
Class 12 CCT Question Bank – Science Domain

Indicating that there are 13 records in the Shoes table. Whereas the query:
SELECT COUNT(margin) FROM shoes;
produces the output:
+----------------------+
| COUNT(margin) |
+----------------------+
| 10 |
+----------------------+
This output indicates that there are 10 values in the margin column of Shoes
table. This means there are 3 (13-10) NULLs in the margin column.

Write output of the following:


a) SELECT COUNT(distinct type) FROM shoes; _____________
b) SELECT COUNT(margin) FROM shoes WHERE margin > 2; __________
c) SELECT type, COUNT(*) FROM shoes GROUP BY type having count(*)>4;
___________
d) SELECT COUNT(qty) FROM shoes WHERE qty is NULL; _____________
e) SELECT COUNT(*) FROM shoes WHERE qty is NULL; _____________

307 | P a g e
Class 12 CCT Question Bank – Science Domain

Question 28:
Read the text carefully and then write the correct output of the SQL
statements:
ROUND(X,D) / ROUND(X) function rounds the argument X to D decimal places. If
number of decimal places is not specified or is zero, the number rounds to the
nearest integer OR (0decimal places). If the value of D is negative.

A) Write the correct output of the following :


a) mysql> SELECT ROUND(-1.23); ______________________
b) mysql> SELECT ROUND(-1.58); ______________________
c) mysql> SELECT ROUND(1.43); _______________________
d) mysql> SELECT ROUND(6.298, 1); ____________________
e) mysql> SELECT ROUND(4.235, -1); ____________________
f) mysql> SELECT ROUND(56.235, -1); ___________________

B) Consider the decimal number x with value 8459.2654.


i. Select SQL statement to round it off to a whole number
a) SELECT ROUND(x,0);
b) SELECT ROUNDOFF(x,0);
c) SELECT ROUNDTO(x,0);
d) SELECT ROUND(0,x);

ii. Select SQL statement to round it to 2 places before the decimal.


a) SELECT ROUND(x,2);
b) SELECT ROUND(x,-2);
c) SELECT ROUND(-2,x);
d) SELECT ROUND(2,x);

308 | P a g e
Class 12 CCT Question Bank – Science Domain

Question 29:
Assertion and Reason based Questions
Read (A) and (R) carefully and then select the correct option.
a) Assertion (A): A Table can have only one Primary Key to identify a row
uniquely.
Reason (R): At the time of creation of table X, the data base administrator
specified Y as the Primary key. Later on he realized that instead of Y, the
combination of column P and Q should have been the primary key of the
table. He added combination of P and Q as the second primary key.
i. Both A and R are true and R is the correct explanation of A
ii. Both A and R are true but R is not the correct explanation of A
iii. A is true but R is false
iv. A is false but R is true
v. Both A and R are false

b) Assertion (A): A Primary key can be defined at the time of creation of a


table or later on by using Alter Table Command.
Reason (R): At the time of creation of table X, the data base administrator
specified Y as the Primary key. Later on he realized that instead of Y, the
combination of column P andQ should have been the primary key of the
table. He dropped the old primary key and created a new primary key using
Alter Table statement of SQL.
i. Both A and R are true and R is the correct explanation of A
ii. Both A and R are true but R is not the correct explanation of A
iii. A is true but R is false
iv. A is false but R is true
v. Both A and R are false

c) Assertion (A): A Primary key can have unique values.


Reason (R): There is a table T1 with combination of columns C1, C2, and C3
as its primary key. we can enter duplicate values in other columns but not
in C1, C2 and C3.
i. Both A and R are true and R is the correct explanation of A
ii. Both A and R are true but R is not the correct explanation of A
iii. A is true but R is false
iv. A is false but R is true
v. Both A and R are false

309 | P a g e
Class 12 CCT Question Bank – Science Domain

d) Assertion (A): A Primary key cannot be left blank.


Reason (R): There is a table T1 with alternate keys C4 and C5. We cannot
enter Null values in any of these columns.
i. Both A and R are true and R is the correct explanation of A
ii. Both A and R are true but R is not the correct explanation of A
iii. A is true but R is false
iv. A is false but R is true
v. Both A and R are false
Question 30:
i) Which type of SQL function work with a single-row at a time?
(a) Multiple-row functions (b) Single-row functions
(c) Both (a) and (b) (d) None of the above
ii) Which function accepts a character string as an input and provides character
string or numeric values as an output?
(a) Text (b) Date (c) Time (d) Math
iii) Which of the following function converts the characters of an argument string
to the uppercase characters?
(a) UCASE( ) (b) UPPER( )
(c) Both (a) and (b) (d) None of the above
iv) The default date format is
(a) MM-DD-YYYY (b) YYYY-MM-DD
(c) DD-MM-YYYY (d) None of these

v) Which of the following function returns an integer that indicates the position
of the first occurrence of the sub-string within the string?
(a) INSTR( ) (b) RTRIM( ) (c) LENGTH( ) (d) TRIM( )

vi) Which of the following function returns the name of the month from selected
date?
(a) MONTH(date) (b) MONTH_NAME(date)
(c) MONTHNAME(date) (d) NAME_MONTH()

310 | P a g e
Class 12 CCT Question Bank – Science Domain

vii) Which of the following function returns only the day number from month of
selected date?
(a) DAY(date) (b) DAYNO(date)
(c) DAY_NUMBER(date) (d) DATE(date)
viii) What will be returned by the given query? SELECT INSTR('INDIA', 'DI');
(a) 2 (b) 3 (c) −2 (d) −3

ix) Write the output of the following SQL command


SELECT ROUND (47.89);
(a) 47.88 (b) 47.8 (c) 48.0 (d) 50
x) Choose the correct query to display the length of customer’s name (CNAME)
for those customers whose name end with R or L from table Customers.
(a) mysql>SELECT LEN(CNAME)FROM Customers WHERE CNAME LIKE ‘%R’ OR
CNAME LIKE ‘%L’;
(b) mysql>SELECT LENGTH(CNAME)FROM Customers WHERE CNAME LIKE
‘%R’ OR CNAME LIKE ‘%L’;
(c) mysql>SELECT LENGTH(CNAME)FROM Customers WHERE CNAME = ‘%R’ OR
CNAME = ‘%L’;
(d) mysql>SELECT LENGTH(CNAME)FROM Customers WHERE CNAME LIKE
‘%R’ OR ‘%L’;

Question 31:
A computer network extends interpersonal communications by electronic means
with various technologies, such as email, instant messaging, online chat, voice
and video telephone calls, and video conferencing. A network allows sharing of
network and computing resources. Users may access and use resources provided
by devices on the network, such as printing a document on a shared network
printer or use of a shared storage device.
1. A group of two or more digital system interconnected with each other is
called ________________
A. Internet
B. Intranet
C. Network
D. Net

311 | P a g e
Class 12 CCT Question Bank – Science Domain

2. Which of the following are examples of network in our everyday life?


A. Social Network
B. Mobile Network
C. Airlines network
D. All of the above

3. Computer in a network is called ______________


A. Network Computer
B. Node
C. Special Computer
D. Server

Question 32:
Communication media is defined as means of delivering or receiving a message,
information, or data. The means through which the information is passed can be in
verbal or non-verbal type. There has to be a common language known by both the
sender or receiver to transfer information successfully.
1. Devices in a network can be connected through _______________
A. Wired media
B. Wireless media
C. Both of the above
D. None of the above.

2. For communication, data in a network is divided into smaller chunks called


____________
A. Small data
B. Parcel
C. Packets
D. Photons

3. Which communication media can penetrate solid objects?


A. Radio wave
B. Microwave
C. Infrared wave
D. Ultraviolet waves

Question 33:
Which of the following can be used as communication medium in wired economic
LAN?
A. Ethernet Cable B. Optical fibre
C. Wi-Fi D. All of the above

312 | P a g e
Class 12 CCT Question Bank – Science Domain

Question 34:
Suppose your internet provider has advertised to give you a speed of 80 Mbps
(Megabits per second) and you have a file of say 80 MB then how much time will it
take? Let’s calculate, we know that there are 8 bits in 1 byte so speed should be
divided by 8 as our file is in bytes not in bits.
So speed will be 80/8 = 10 MBps
Now 80 MB file will be transferred in 80/10 = 8 seconds.
This is how we calculate the downloading speed and time of files.

Q1. What is bound rate?

Q2. GBps stands for _____


A. Gigabyte per second
B. Gigabits per second
C. Megabits per second
D. Morebits per second

Question 35:
Case Study 01:
Web server is a special computer system running on HTTP through web pages. The
web page is a medium to carry data from one computer system to another. The
working of the webserver starts from the client or user. The client sends their
request through the web browser to the webserver. Web server takes this request,
processes it and then sends back processed data to the client. The server gathers
all of our web page information and sends it to the user, which we see on our
computer system in the form of a web page. When the client sends a request for
processing to the web server, a domain name and IP address are important to the
webserver. The domain name and IP address are used to identify the user on a
large network.

a) Web servers are:


1. IP addresses
2. Computer systems
3. Webpages of a site
4. A medium to carry data from one computer to another

b) What does the webserver need to send back information to the user?
1. Home address
2. Domain name
3. IP address
4. Both b and c

313 | P a g e
Class 12 CCT Question Bank – Science Domain

c) What is the full form of HTTP?


1. Hypertext Transfer Protocol
2. Hypertext Transfer Procedure
3. Hyperlink Transfer Protocol
4. Hyperlink Transfer Procedure

d) The _____ translates internet domain and host names to IP address


1. Domain name system
2. Routing information protocol
3. Google
4. Network time protocol

e) Computer that requests the resources or data from other computer is called as
____ computer
1. Server
2. Client
3. None of the above
4. a and b

f) DNS stands for:


1. Domain Name Security
2. Domain Number System
3. Document Name System
4. Domain Name System

Question 36:
Shaurya uses computer and mobile for his personal use. Study the following cases
and answer the questions given below.
Once he got the message in Telegram that CBSE is announcing the result of class
XII tomorrow at 10:10 pm. He forwarded the message to his few friends. But later
he came to know that no such Announcement was there in CBSE official web-site.
he is violating:
A. net etiquettes B. Communication etiquettes
C. copy right D. None of the above

314 | P a g e
Class 12 CCT Question Bank – Science Domain

Question 37:
Assertion (A): Digital footprint is the trail of data we leave behind when we visit
any website (or use any online application or portal) to fill-in data or perform any
transaction.
Reason (R): While online, all of us need to be aware of how to conduct ourselves,
how best to relate with others and what ethics, morals and values to maintain.
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

Question 38:
Which of the following is False in case of Child Pornography
Statement I: Images/movies or texts that depicts sexual activity of anyone under
18 years of age is Child pornography.
Statement II: IT ACT 2000 does not protect from Child Pornography
Statement III: IT ACT section 67 is amended that browsing sites of Child
Pornography is also an Offence.
a) Statements I and III
b) Statement II is only
c) Statement III is only
d) Statements I and II

Question 39:
The garbage of electronic gadgets such as computer peripherals, laptop
accessories, mobiles is known as _________.
(a) Electronic waste (b) Electrical waste
(c) Garbage of Goods (d)None of the above

Question 40:
The cadmium used in semiconductors and registers can damage a human’s
a). kidney, heart
b) Liver, bones & kidney
c) Neurological system
d) Human eyes

Question 41:
Statement A: Social media are websites or applications that enable their users to
participate in social networking but they cannot create and share content with
others in the community.

315 | P a g e
Class 12 CCT Question Bank – Science Domain

Statement B: We should not waste precious time in responding to unnecessary


emails or comments unless they have some relevance for us.
a. Both statements are correct.
b. Both statements are incorrect
c. Statement A is correct, but Statement B is incorrect
d. Statement A is incorrect, but Statement B is correct

Question 42:
Mr. Sharma is writing a document on Cyber Crime. While writing he came to
know about Plagiarism. Which of the following statements is/are Fales?
Statement I: Plagiarism is using someone’s work and not giving credit for it
Statement II: Plagiarism is entering into someone’s computer to steal data
Statement III: Plagiarism is Criminal offence
a) Statement II only
b) Both Statements I and III
c) Statement II and III
d) Statements I, II, III

Question 43:
Which of the following is True.
Statement I: Phishing is catching fish in a game
Statement II: Phishing is sending an email or text message sent to steal user’s
information such as Credit card data, Login credentials, Personal information
Statement III: Phishing need not be targeted to a specific person or organization
a) Statement I and II are only True
b) Statement II only True
c) Statements III only True
d) Statements I, II and III are all True

Question 44:
---------------- is the act of unauthorised access to a computer, computer network
or digital system.
a. Illegal access
b. Virus
c. Hacking
d. None of the above

316 | P a g e
Class 12 CCT Question Bank – Science Domain

Question 45:
A ____ is a type of contract between the creator of an original work permitting
someone to use their work, generally for some price.
a. Agreement
b. License
c. Patent
d. Copyright

Question 46:
An internet address or web address, a URL (Uniform Resource Locator) is a URL
and standardized naming convention for addressing documents accessible over
the Internet and Intranet. The URL makes it possible for a computer to locate and
open a web page on a different computer on the Internet.

Q1: Assertion (A): URL is naming convention for addressing documents accessible
over the Internet.
Reason (R): The URL makes it possible for a computer to locate and open a web
page on a different computer on the Internet

Consider the above statements, choose the correct answer from the options given
below:
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.

Q2: Write name of label 1, 2, 3, 4 in given URL

Q3: Which of the following protocol is used for WWW?


A. FTP
B. SMTP
C. TCP
D. HTTP

317 | P a g e
Class 12 CCT Question Bank – Science Domain

Question 47:
Most people give Ray Tomlinson the title of email’s inventor. He came up with the
idea while working for ARPANET, the government-funded research project that
eventually became the internet. At the time, you could only leave messages for
people using the same computer. Tomlinson created a program that gave users the
ability to send messages between connected computers on the ARPANET system.

Q1: Unsolicited commercial email is known as:


A) Malware
B) Virus
C) Spam
D) Spyware

Q2. Which of the following protocol is used for e-mail services?


A) SMAP
B) SAIP
C) SMTP
D) STIP

Q3. Ideally, what characters should be used in a password to make it strong?


A) Letters and numbers only
B) Mixed Case (Upper and Lower)
C) Special characters
D) All of above

Question 48:
Q 1: Assertion (A): Content of Web pages cannot be change at runtime.
Reason (R): Same content is delivered every time the page is loaded, if website is
a static website.

Consider the above statements, choose the correct answer from the options given
below:

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.

318 | P a g e
Class 12 CCT Question Bank – Science Domain

Q 2: Assertion (A): Web hosting is the activity of providing storage space for a
website that is connected to the Internet.
Reason (R): When a company that has space on servers and people buy space to
store their websites so they can appear on the Internet, this is an example of web
hosting
Consider the above statements, choose the correct answer from the options given
below:
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.

Q3. Which of the following explains Cookies nature?


A. Non-Volatile
B. Volatile
C. Intransient
D. Transient

Question 49:
Q1: Assertion (A) A browser, short for web browser, is the software application
that is used to search for, reach and explore websites.
Reason (R) The primary function of a web browser is to render HTML
Code
Consider the above statements, choose the correct answer from the options given
below:
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.

Q2: Verification of a login name and password is known as___________.


A. configuration
B. accessibility
C. authentication
D. logging in

Q3: _______________ are set of rules and procedures for communicating.


A. Programs
B. Algorithms
C. Protocols
D. Mails

319 | P a g e
Class 12 CCT Question Bank – Science Domain

Question 50:
Q1: _______ is a type of telephone service is an alternative to a regular phone line.
A. Wireless
B. DSL
C. ISDN
D. Dialup

Q2: Which of the following networks extends a private network across public
networks?
A. Local area network
B) virtual private network
C) enterprise private network
D) storage area network

Q3: The ____________ translates internet domain and host names to IP address.
A. domain name system
B. routing information protocol
C. network time protocol
D. internet relay chat

320 | P a g e
Class 12 CCT Question Bank – Science Domain

Information Practices - Answers Keys


Answer 1: 1. b 2. d 3. a 4. d
Answer 2: 1. d 2. c 3. d 4. a
Answer 3: 1. a 2. d 3. c 4. c
Answer 4:
1. print(Mark[‘Amit’])
2. print(Mark[Mark>300])
3. Mark.drop([‘Rajnish’,’ Manish’,’ Dolly’],inplace=True)
4. NMark=Mark[Mark>300]+5
Answer 5: 1. a 2. c 3. a 4. b
Answer 6: 1. b 2. a
Answer 7: 1. b 2. d
Answer 8:
a) Df1[‘Total’]=Df1[‘ACCOUNTS’]+Df1[‘MATHS’]+ Df1[‘BST’]+ Df1[‘IP’]+
Df1[‘ECO’]
b) T=[395,399,428,401,353]
Df1[Total]=T
c) T=pd.Series([395,399,428,401,353])
Df1.[‘Total’]=T
d) Both a and c
2. Df1[‘AVG’]=Df1[‘Total’]/5
3. Df1.loc[:0,['BST']]=90
4.Df1.drop(2,axis=0)
Answer 9: 1. a 2. b 3. d
Answer 10: 1. c 2. c 3. d 4. d
Answer 11: A
Answer 12: A
Answer 13: (I) D
(II) C

321 | P a g e
Class 12 CCT Question Bank – Science Domain

Answer 14: D
Answer 15: B
Answer 16: A
Answer 17: A – True
B – False
C – True
D - False
Answer 18: A
Answer 19: A
Answer 20. A

A. d) Both Query ii) and iii) will display the desired data.
B. c) BookID, Issued_date
C. d)SELECT Issued_date, count(BookID) from StuLibrary where
Return_date is NULL GROUP BY Issued_date ;
Answer 21 D. a) SELECT StuClass, count(StuId) from StuLibrary GROUPBY
StuClass HAVING count(StuId)>30;
E. c)SELECT Issued_date from StuLibrary GROUP BY Issued_date
having count(*)>5
i d) Select carname, round(cost,1) from carmarket;
ii b) select carname, color, instr(color,'E') from carmarket;
iii a) select carname, lcase(company) from carmarket where
Answer 22 year(dom)=2020;
iv b) select count(*),year(dom) from carmarket group by
year(dom);
v c) Cardinality=7 and Degree=6
i b) 58.6
ii d) INDOGO SILVER 5
GLC WHITE 5
Answer 23 iii c) GLC mercedes
iv d) 2 2020
2 2016
v b) A6 60

322 | P a g e
Class 12 CCT Question Bank – Science Domain

i b. Both (iii) and (iv)


select name from student where city=”Agra” or city=”Mumbai”;
or
select name from student where city IN(“Agra”, “Mumbai”);

d. Only (iii)
iii. select name from student where city=”Agra” or
city=”Mumbai”;

ii b.

Answer 24

iii d. Select class, max(marks) from student group by class;


b. Both (ii) and (iv)

iv Select gender, average(marks) from student group by gender where


class=”XI”;
or
Select gender, average(marks) from student group by gender having
class = “XI”;

v b. select name,max(DOB) from student ;


a) 8
b) 123.23 340
c) 21
Answer 25 d) 1979 11 26 November
e) IND ence
f) form actices
a) iii) 0
b) iii) +------------------------------------+
| INSTR(First_Name,'Kiran') |
+-------------------------------------+
|0 |
|0 |
|4 |
|0 |
|0 |
Answer 26 +-------------------------------------+
c) iii) 'ormatics'
d) iv) ‘ers’
e) ii) 'ute'
f) i) ‘te’
g) +-----------------------------+
| MID(first_name,3,2) |
+-----------------------------+
| mt |

323 | P a g e
Class 12 CCT Question Bank – Science Domain

| aw |
+-----------------------------+
a) 3
b) 5
Answer
c) school 6
27 d) 0
e) 1
A)
a) -1

b) -2

c) 1

Answer d) 6.3
28
e) 0

f) 60
B)
a) a) SELECT ROUND(x,0);

b) b) SELECT ROUND(x,-2);
A) iii. A is true but R is false
Answer B) i. Both A and R are true and R is the correct explanation of A
29 C) i. Both A and R are true and R is the correct explanation of A
D) iii. A is true but R is false
i (b) Single-row functions
ii (a) Text
iii (c) Both (a) and (b)
iv (b) YYYY-MM-DD
v (a) INSTR( )
Answer
vi (c) MONTHNAME(date)
30 vii (a) DAY(date)
viii (b) 3
ix (c) 48.0
x (b) mysql>SELECT LENGTH(CNAME)FROM Customers WHERE
CNAME LIKE ‘%R’ OR CNAME LIKE ‘%L’;
Answer 31: (i) C (ii) D (iii) B
Answer 32: (i) C (ii) C (iii) A
Answer 33: A
Answer 34:
(1) It is a measure of the speed at which the data is being transferred in a
communication channel. The rate indicates the number of electrical oscillations

324 | P a g e
Class 12 CCT Question Bank – Science Domain

per second that occurs within a data transmission. The higher the baud rate, the
more bits per second that are transferred.
(2) A
Answer 35: Case Study 01:
a) 2 b) 4 c) 1
d) 1 e) 2 f) 4
ANSWER 36: B
ANSWER 37: B
ANSWER 38: B
ANSWER 39: A
ANSWER 40: B
ANSWER 41: D
ANSWER 42: A
ANSWER 43: B
ANSWER 44: C
ANSWER 45: B
ANSWER 46: 1. B
2. Label1: Protocol
Label 2: Sub Domain
Label 3: Domain
Label4: Path
3. D
ANSWER 47: 1. C 2. C 3. D
ANSWER 48: 1. B 2. B 3. D
ANSWER 49: 1. B 2. C 3. C
ANSWER 50: 1. C 2. B 3. A

325 | P a g e
Class 12 CCT Question Bank – Science Domain

के न्द्रीय विद्यालय सगं ठन, लखनऊ सभ


ं ाग
Kendriya Vidyalaya Sangathan, Lucknow Region
326 | P a g e

You might also like