Professional Documents
Culture Documents
XII IP Set-4 MS by KVS RO C11hennai
XII IP Set-4 MS by KVS RO C11hennai
XII IP Set-4 MS by KVS RO C11hennai
6 matplotlib.pyplot 1
7 Add-on 1
8 Index 1
9 Static 1
10 Tree/Star 1
11 5 1
12 Surfing website / online ticket booking or any two correct activities that can leave 1
digital footprint.
13 1 1
14 Router 1
15 (a) Hyper Text Transfer Protocol (b) Uniform Resource Locator 1
16 Any two examples of e-waste. 1
17 Spam 1
18 Any two health hazards
19 Delete from activity; 1
20 Switch 1
21 Any one disadvantage 1
22 (i) print(happy_df.iloc[0 : 5 ] 1
(ii) print(df.shape) 1
(iii) (a) print(happy_df.Region) and (d) print(happy_df.iloc[:,1]) 1
(iv) 4 Canada 1
5 Finland
6 Netherlands
Name: Country, dtype: object
(v) (b) print(happy_df.max()) 1
23 (i) (a) SELECT MAX(ODate) FROM cityair; 1
(ii) (b) SELECT MONTHNAME(ODate) FROM cityair; 1
(iii) 114.6 1
(iv) 7 1
(v) DELETE FROM cityair WHERE Odate = “2019-03-01”; 1
24 import pandas as pd 2
import numpy as np
arr= np.random.randint(10,20,(10,))
s = pd.Series(arr)
½ mark for correct imports.
1 mark for correct numpy array creation.
½ mark for correct creation of Series.
25 Primary Key : A column of collection of columns to identify a tuple in a relation. It is 2
used to search / locate row in a relation. There can be only one primary key in a table.
1 mark for correct definition with proper significance.
1 mark for stating only one primary key in a table.
OR
TRIM () function is used to remove leading and trailing spaces from a string a table. It
can be used as
TRIM(String)
For example;
SELECT TRIM(' bar ');
-> 'bar'
1 mark for stating purpose of the functions
1 mark for correct example.
26 (i) Gender column datatype char(1) as all the possible values can be accommodated and 2
it will be space efficient.
(ii) INSERT INTO Student (Rollno, Sname, Subject, Marks) VALUES (“003”,
”SUMAN”, “IP”, 75);
OR
x = emp_df['Name']
y = emp_df['Salary']
pl.bar(x,y)
pl.xlabel("Name")
pl.ylabel("Salary")
pl.title("Name vs Salary")
pl.show()
print(housing_df[housing_df.loc[:,'bath']==2]) # 1Mark
print(housing_df.loc[:,'price']*100000) # 1 Mark
print(housing_df.head(3)) # 1 Mark
Give marks for any alternate method or the task done in multiple steps.
39 (i) SELECT LEFT(DESCRIPTION,3) FROM CLOTH; 5
(ii) SELECT LTRIM(DESCRIPTION) FROM CLOTH;
(iii) SELECT LEN(DESCRIPTION) FROM CLOTH;
(iv) SELECT COUNT(DISTINCT MCODE) FROM CLOTH;
(v) SELECT DAYNAME(LAUNCHDATE) FROM CLOTH;
OR
(i) SELECT SUM(PRICE) FROM CLOTH WHERE YEAR(LAUNCHDATE) = 2008;
(ii) SELECT MIN(PRICE) FROM CLOTH GROUP BY MCODE;
(iii) SELECT MAX(LAUNCHDATE) FROM CLOTH;
(iv) SELECT LOWER(DESCRIPTION) FROM CLOTH;
(v) SELECT MOD(PRICE,10) FROM CLOTH;
1 mark each for correct query. Any alternate method also should be given due credit.
40 (i) Block C would be the most suitable place to house server as it has maximum 5
number of computers.
(ii) The most suitable layout would be
A B
C D
Topology : Star/Tree
(iii) Modem should be placed where the server is therefore it should be placed at Block
C.
(iv) Dynamic website as the dynamic website can alter based on customer’s choice.
(v) WAN as the distance between the two locations would be more than 100KM