Professional Documents
Culture Documents
SECTION – A
6 Which of the following is true about the MAX() and MIN() functions? 1
a. Both can be used for any data type b. MAX() returns the maximum value.
c. MIN() returns the smallest value. d. All are true.
Page 1 of 11
10 The practice of taking someone else's work or ideas and passing them of as one's 1
own is known as ___________
a. Copyright b. Theft c. Plagiarism d. None of these
a. cbse.gov.in b. www.cbse.gov.in/main
c. aboutus.htm d. main
15 NULL value in SQL means : 1
a. 0 value b. “ ” value
c. No value d . None of the these
16 network device is known as an intelligent hub . 1
a. Bridge b. Passive Hub c. Active Hub d. Switch
Directions (Q No. 17-18) In the questions given below there are two statements
marked as Assertion (A) and Reason (R) . Read the statements and choose the
correct option.
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.
17 Assertion (A): Series object is size mutable. 1
Assertion
Reason (R):(A): DataFrame
A series object is size
is value mutable.
mutable.
Reason
d. (A) is(R): A data
false, but frame
(R) is is value mutable.
true.
18 Assertion (A): Stealing money from someone’s wallet is a type of 1
cybercrime.
Reason (R): Cybercrime is a crime that involves a computer and a network.
d. (A) is false, but (R) is true.
SECTION –B
19 Explain the terms Web page and Home Page. 2
webpage-a document using http and that resides on a web-site is known as a web page.
Home page-it is the top level web page of a web site. this is the page that gets displayed
first of all when a web site is opened.
OR
Mention any four networking goals.
• Resource sharing.
• Reliability.
• Cost-effective.
• Fast data sharing.
Page 2 of 11
20 Rashmi, a database administrator needs to display house wise total 2
number of records of ‘Red’ and ‘Yellow’ house. She is encountering
an error while executing the following query:
Help her in identifying the reason of the error and write the correct
query by suggesting the possible correction (s).
Alternative answer
i) What will be the cardinality of the table if there is no NULL value for
marks?
Cardinality - 10
ii) Write the command to find out the no. of rows in this table.
SELECT COUNT(*) FROM STUDENT;
23 Give the output for following statement: 2
import pandas as pd
a = pd.DataFrame([1, 2, 5, None], index=['a', 'b', 'c', 'd'],columns=['one'])
print(a)
one
a 1.0
b 2.0
c 5.0
d NaN
Page 3 of 11
24 Consider the tables given below: 2
Table: Party
PartyId Description CostPerItem
P101 Birthday 400
P102 Wedding 700
P103 Farewell 350
P104 Engagement 450
Table: Client
ClientId ClientName Phone NoOfGuests PartyId
C101 A.K.Antony 99101956 80 P101
C102 Fauzia Aria 893466448 500 P102
C103 Rashi Khanna 981166568 50 P101
C104 S.K. Chandra 65877756 100 P104
(i) Name the Foreign key along with its table name
PartyId in table Client
(ii) Write SQL command to display Clientname,Phone, description and
Costperitem
SELECT Clientname,Phone, description, Costperitem FROM Party, Client
WHERE PARTY.PARTYID = CLIENT.PARTYID;
25 Write a python code to create an empty Dataframe. 2
import pandas as pd
df= pd.DataFrame()
print(df)
OR
Consider a given Series , SR:
a 50
b 40
c 55
d 45
Write a program in Python Pandas to update the index to E,F,G,H and delete the
first element.
#To change index
SR.index=[‘E’, ‘F’,’G’,’H’]
OR
SR.rename({‘a’:’E’,’b’:’F’,’c’:’G’,’d’:’H’})
#To delete first element
SR.drop(‘E’)
SECTION – C
SECTION – 1
Attempt any 15 questions from questions 1 to 21
Page 4 of 11
26 Write SQL command for(i) and output for (ii) &(iii) from the following queries: 3
TABLE: SPORTS
StudentNo Class Name Game1 Grade1 Game2 Grade2
10 7 Sameer Cricket B Swimming A
11 8 Sujit Tennis A Skating C
12 7 Kamal Swimming B Football B
13 7 Veena Tennis C Tennis A
14 9 Archana Basketball A Cricket A
15 10 Arpit Cricket A Athletics C
(i) Display the names of the students who have grade ‘A’ in either Game1
or Game2 or both.
SEELCT NAME FROM SPORTS WHERE GRADE1=’A’ OR GRADE2=’A’;
Give the output of the following SQL Statements
(ii) SELECT MAX(Name) FROM SPORTS;
Veena
(iii) SELECT GAME1,COUNT(*) FROM SPORTS GROUP BY Game1;
CRICKET 2
TENNIS 2
SWIMMING 1
BASKETBALL 1
Page 5 of 11
27 Write a python program to draw a bar chart with the following information: 3
Birds Population
Peacock
2600
Parrot
3000
Mona 1000
Flycatcher 5000
Crow 1200
OR
Write a python program to draw a histogram with following information:
10 15 10 10 15 10 20 20 20 20 20 25 25
The histogram should have following information
a) X-axis label should be “Score” and Y-axis should be “Frequency”
b) The title should be “Frequency of Score”
c) The Graph should be saved with name “Score.png”
Use proper import statements in the program
import matplotlib.pyplot as plt
Score=[10,15,10,10,15,10,20,20,20,20,20,25,25]
plt.hist(Score)
plt.xlabel(‘Score’)
plt.ylabel(‘Frequency’)
plt.title(‘Frequency of score’)
plt.savefig(‘Score.png’)
plt.show()
Page 6 of 11
28 Based on table STUDENT given here, write suitable SQL queries for the 3
following:
29 Mr. Anderson is a software developer who spend most of the time with computers. 3
Give him two advises to avoid health issues due to excess use of computers.
You can help avoid computer-related injuries with proper furniture, better posture and
good working habits. Parents should put sensible time limits on their children's computer
use and video-game playing. Your child should take regular breaks from using a
computer and should do some physical activities each day.
(ii) Briefly explain Intellectual Property Rights.
Intellectual property rights (IPR) refers to the legal rights given to the inventor or
creator to protect his invention or creation for a certain period of time.
OR
(i) Which of the following comes under Cyber Crime and Why:
a) Theft of a brand new sealed laptop
b) Access to a bank account for an unauthorized money transaction
c) Photocopying a printed confidential report
d) Modification in a company’s data with unauthorized access
(ii) Name any two measures to recycle e-waste.
1. Postpone upgrading for as long as you can. Think twice about getting
your phone or other devices upgraded.
2. Find opportunities for reuse.
3. Try returning the item to the manufacturer.
4. Take them to a dedicated e-waste recycling facility.
30 Consider the above given dataframe MARKS and write Python code for the 3
Following:
MATHS SCIENCE
SMITH 12 11
BIKRAM 16 17
CHANDAN 20 19
SECTION – D
Page 7 of 11
31 4
Consider the EMPLOYEES table having the following records.
+----+------------+-------+-----------+----------+--------------+
| ID | NAME | AGE | ADDRESS | SALARY |
+----+------------+-------+-----------+----------+--------------+
| 1 | Ramesh | 32 | Ahmedabad | 2000.00 |
| 2 | Khilan | 25 | Delhi | 1500.00 |
| 3 | kamlesh | 27 | Kota | 2000.00 |
| 4 | Chaitali | 25 | Mumbai | 6500.00 |
| 5 | Hardik | 27 | Bhopal | 8500.00 |
| 6 | Komal | 22 | MP | NULL |
| 7 | Muffy | 22 | Indore | 10000.00 |
Write SQL Query for:-
i) To delete the record of the employee(s) whose salary is between
2000 and 8000.
DELETE FROM EMPLOYEES WHERE SALARY BETWEEN 2000
AND 8000;
ii) To display employees having salary more than 5000 in
descending order of age.
SELECT * FROM EMPLOYEES WHERE SALARY>5000
ORDER BY AGE DESC;
iii) To display details of all employees having defined salary (i.e
salary is known).
SELECT * FROM EMPLOYEES WHERE IS SALARY IS NOT
NULL;
iv) Increase the salary of the employees living in Delhi and Mumbai
city by 10%.
UPDATE EMPLOYEES SET SALARY=SALARY*1.10 WHERE
ADDRESS IN(‘DELHI’,’MUMBAI’);
OR
What will be the result of the SQL Query:-
i) Select Name from employees where Address like ‘_ _ m%’;
Ramesh
Chaitali
ii) Select Age, Sum(Salary) from employees group by Age;
32 2000
25 8000
27 10500
22 10000
iii) Select Salary, Salary*0.1 As “Bonus” from employees;
Salary Bonus
2000 200
1500 150
……. ……..
iv) Select “Mr./Mrs” , name from employee where salary is NULL;
Mr./Mrs Komal
Page 8 of 11
32 Ekam, a Data Analyst with a multinational brand has designed the DataFrame df
that contains the four quarter’s sales data of different stores as shown below:
Store Qtr1 Qtr2 Qtr3 Qtr4
0 Store1 300 240 450 230
1 Store2 350 340 403 210
2 Store3 250 180 145 160
Answer the following questions:
i. Predict the output of the following python statement: 2
a. print(df.size)
15
b. print(df[0:2]) 1
Store Qtr1 Qtr2 Qtr3 Qtr4
0 Store1 300 240 450 230 1
1 Store2 350 340 403 210
ii. Delete the last row from the DataFrame.
df.drop(2)
iii. Write Python statement to add a new column Total_Sales which is the
addition of all the 4 quarter sales.
df[‘Total_Sales’]=df.Qtr1+ df.Qtr2+ df.Qtr3+ df.Qtr4
OR
(Option for part iii only)
Write Python statement to export the DataFrame to a CSV file named data.csv
df.to_csv(“data.csv”)
SECTION – E
33 What will be the output of the following: 5
import pandas as pd
arr = [100,200,300, 400,150, 160, 170]
s=pd.Series(arr)
i) print(s.tail())
6 170
ii) print(s.loc[3:5])
3 400
4 150
5 160
iii) print(s.iloc[:3])
0 100
1 200
2 300
iv) print(s.ndim)
1
v) print(s[0:6:3])
0 100
3 400
Page 9 of 11
34 Ayurveda Training Educational Institute is setting up its centre in Hyderabad with four 5
specialised departments for Orthopedics, Neurology and Pediatrics along with an
administrative office in separate buildings. The physical distances between these
department buildings and the number of computers to be installed in these
departments and administrative office are given as follows. Answer the queries as
raised by them in (i) to (v).
a) Suggest the most suitable location to install the main server of this
institution to get efficient connectivity.
Administrative office
b) Suggest the best cable layout for effective network connectivity of the
building having server with all the other buildings.
d) Suggest the topology of the network and network cable for efficiently
connecting each computer installed in each of the buildings out of
the following :
Topologies: Bus Topology, Star Topology
Network Cable: Single Pair Telephone Cable, Coaxial Cable, Ethernet Cable
e) The university is planning to connect its admission office in Delhi,
which is more than 1250km from university. Which type of network out of
LAN, MAN, or WAN will be formed? Justify your answer.
Page 10 of 11
35 Write the SQL functions which will perform the following operations. 5
Also give example:
OR
Mr. Manav, a database administrator in “Global Educational and Training
Institute” has created following table named “Training” for the upcoming training
schedule:
Training
TrId Name Gender Topic City Fee
ND01 Rajan M Cyber Security New Delhi 10000
GU01 Urvashi F ICT in Education Guru gram 15000
FD01 Neena F Cyber Security Faridabad 12000
ND02 Vinay M ICT in Education New Delhi 13000
GU02 Naveen M Cyber Crime Guru gram NULL
Page 11 of 11