TIME: - 3 Hours MAX.
MARKS – 70
SAMPLE PAPER -I
General Instructions:
● Please check this question paper contains 37 questions.
● All questions are compulsory. However, internal choices have been provided in some questions.
Attempt only one of the choices in such questions
● The paper is divided into 5 Sections- A, B, C, D and E.
● Section A consists of 21 questions (1 to 21). Each question carries 1 Mark.
● Section B consists of 7 questions (22 to 28). Each question carries 2 Marks.
● Section C consists of 4 questions (29 to 32). Each question carries 3 Marks.
● Section D consists of 2 case study type questions (33 to 34). Each question carries 4 Marks.
● Section E consists of 3 questions (35 to 37). Each question carries 5 Marks.
● All programming questions are to be answered using Python Language only.
● In case of MCQ, text of the correct answer should also be written.
Section-A
1. State whether the following statement is True or False:
The UPDATE command in SQL is used to add one or more new rows to a table.
2. What will be the result of the following SQL query?
SELECT ROUND (78.987, 1);
(A) 78.9 (B) 79.0
(C) 79 (D) 78.99
3. An aspiring musician writes an original song and uploads it to a video-sharing platform.
A large corporation uses this song in their television advertisement without seeking her
permission. This is a clear violation of her:
(A) Patent (B) Trademark
(C) Copyright (D) Digital Footprint
4. Given data = [100, 200, 300] and idx = [‘X’, ‘Y’, ‘Z’], which command correctly creates a
Pandas Series with data as values and idx as the index?
(A) [Link](data=[idx], index=[data]) (B) [Link](data, idx)
(C) [Link](data, index=idx) (D) [Link]({idx: data})
5. Which network device is responsible for directing data packets between different
computer networks by examining their IP addresses?
(A) Hub (B) Switch
(C) Router (D) Repeater
6. What is the purpose of the MONTH(date) function in SQL?
(A) To return the full name of the month (e.g., ‘January’).
(B) To return the month as a numeric value (1-12).
(C) To return the number of days in that month.
(D) To return the last date of that month.
7. Software that is released under a license that grants users the rights to run, study,
change, and distribute the software and its source code for any purpose is called:
(A) Shareware (B) Freeware
(C) Proprietary Software (D) Free and Open Source Software (FOSS)
8. Which attribute of a Pandas DataFrame returns the total number of elements in it (i.e.,
rows multiplied by columns)?
(A) [Link] (B) [Link]
(C) [Link]() (D) [Link]
9. In SQL, a join that links tables based on an equality condition between the values in the
common columns is known as a(n):
(A) Cross Join (B) Equi-Join
(C) Self Join (D) Natural Join
10. In the URL [Link] what does the http part represent?
(A) The Domain Name (B) The File Path
(C) The Protocol (D) The Hostname
11. To calculate the class average on a test from a ‘Students’ table with a ‘Marks’ column,
which SQL aggregate function would you use?
(A) MEDIAN(Marks) (B) AVERAGE(Marks)
(C) AVG(Marks) (D) MEAN(Marks)
12. To convert all strings in a Pandas Series s to uppercase, which method would be most
appropriate?
(A) [Link]() (B) [Link]()
(C) [Link](upper) (D) [Link](‘upper’)
13. Which of the following is the most environmentally responsible method for disposing of
an old, non- functional laptop?
(A) Throwing it in the regular garbage bin.
(B) Selling it to a local scrap dealer.
(C) Sending it to a certified e-waste recycling facility.
(D)Storing it in the attic indefinitely.
[Link] SQL command is used to remove existing records from a table?
(A) DROP (B) REMOVE
(C) DELETE (D) ERASE
[Link] do you display the first 10 rows of a Pandas DataFrame df?
(A) [Link](10) (B) [Link][:9]
(C) [Link](10) (D) [Link](10)
[Link] which network topology is each device connected to exactly two other devices, forming a
circular pathway for data?
(A) Star (B) Ring
(C) Bus (D) Mesh
[Link] SQL function is used to remove spaces from the beginning (left side) of a string?
(A) TRIM() (B) RTRIM()
(C) LTRIM() (D) STRIP()
[Link] represent the trend of a company’s sales revenue over the past five years, which type
of plot would be most effective?
(A)Bar Graph (B) Histogram
(C) Line Plot (D) Scatter Plot
[Link] unauthorized reproduction and distribution of copyrighted material like software,
music, or films is commonly known as:
(A)Plagiarism (B) Hacking
(C) Phishing (D) Piracy
Direction: For questions 20 and 21, two statements are given: one labeled Assertion (A) and the
other labeled Reason (R). 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.
20. Assertion (A): When adding two Pandas Series that have non-overlapping indices, the
result contains NaN values.
Reason (R): Pandas aligns data by index labels before performing arithmetic operations,
and for any label not present in both Series, the result is considered missing (NaN).
21. Assertion (A): A switch is a more efficient network device than a hub.
Reason (R): A switch forwards data packets to all connected devices, whereas a hub
sends packets only to the specific intended recipient.
Section-B
22. Complete the given Python code: Create a pandas Series from a scalar value ‘10’ and
display the last 3 elements of the Series.
import as pd
series_data = [Link]( )
print(series_data. ( ))
[Link] is data protection? List two ways to protect your data.
[Link] Python code written below has syntactical errors. Rewrite the correct code and
underline the corrections made.
import pandas as pd
data = {Name [‘Riya’, ‘Preeti’, ‘Neeta’], ‘Age’: 25, 30, 22]}
df = [Link](Data)
for row in df:
print(row)
25. What will be the output of the given code?
import pandas as pd
s = [Link]([1,2,3,4,5],
index=[‘akram’, ‘brijesh’, ‘charu’,‘deepika’, ‘era’])
print(s[‘charu’])
26. Mr. Roy is a manager in a hotel and wants to find out some data from a table, where he
maintains the hotel records. He is not very expert with SQL commands and functions.
Help him to write the queries.
Table : Hotel
Roomld CName RoomType DtofArrival Ctarges
R1 Ritesh AC 2016-09-09 1800
R2 Suman Deluxe 2020-08-01 2000
R3 Abhi General 1995-04-05 3000
R4 Ram AC 1994-02-02 2500
R5 Nitin Deluxe NULL 7000
(i) Display count of the different room types from the table Hotel.
(ii) Display the average room charges of “AC” rooms.
27. Navya has just created a website for her company and now need to host it. Briefly discuss
the role of a web server in hosting a website.
or
Write one advantage each of star and bus topology used in networking. Draw a network
layout of bus topology to connect six computers.
28. What is the purpose of GROUP BY clause in MySQL? How is it different from ORDER BY
clause?
Section-C (4X3 = 12 Marks)
[Link] has written a code with a DataFrame and a CSV file “[Link]” containing records
of employees as follows:
Index Eno Ename Eage Esal
0 1 Ritesh 15 5600
1 2 Aakash 16 17000
2 3 Sumit 17 12500
3 4 Ria 20 18000
Write the Python code to read the data from the CSV file, display its first two records
and then rewrite the data to a new CSV file.
[Link] the following table Games. Write SQL commands for the following statements.
Table : Games
G Code Game Name Type Num-ber Prize Money Ectedule Date
101 Carom Board Indoor 2 5000 23/01/2004
102 Badminton Outdoor 2 12000 12/12/2003
103 Table Tennis Indoor 4 8000 14/02/2004
105 Chess Indoor 2 9000 01/01/2004
108 Lawn Tennis Outdoor 4 25000 19/03/2004
(i) To display the details of those Games, which are having Prize Money more than 7000.
(ii) To display sum of Prize Money for each Type of Games.
(iii) To display the total number of games available in the above table Games.
or
Naina works for M/s Anish Steels Ltd. She has written following statements , but is not
able to understand the outputs. Explain her the working of these statements and produce
the outputs.
(i) SELECT INSTR(‘computerscience’, ‘sc’);
(ii) SELECT MID(‘funandfood’, 3, 4);
(iii) SELECT ROUND(1334.99);
31. List the guidelines to avoid plagiarism.
or
What are the psychological problems related to the usage of technology?
[Link] a output for SQL queries (i) to (iii), which are based on the table Student given below:
Table : Etudent
Roll No Name Class DOB Gender City Marks
1 Nanda X 06-06-1995 M Agra 551
2 Saurabh XII 07-05-1993 M Mumbai 462
3 Sonal XI 06-05-1994 F Delhi 400
4 Trisla XII 08-08-1995 F Mumbai 450
5 Sohan XII 08-10-1995 M Delhi 369
6 Marisla XI 12-12-1994 F Dubai 250
7 Neha X 08-12-1995 F Moscow 377
8 Nishant X 12-06-1995 M Moscow 489
(i) SELECT COUNT(*), City FROM Student GROUP BY City HAVING COUNT(*)>1;
(ii) SELECT MAX(DOB),MIN(DOB) FROM Student;
(iii) SELECT NAME,GENDER FROM Student WHERE City= “Delhi”;
Section-D
33. Jacqueline has created the following DataFrame consisting of data of houses of a school and the
number of boys in the houses, shown as follows. She wants to perform certain operation on
the data set. Help her with the correct actions.
House
Index Housename Location Boys
0 Ganga East 20
1 Yamuna West 30
2 Saraswati North 56
(a) What will be the output of the following code?
(i) print([Link])
(ii) [Link](“Location”)
print(House)
(b) She wants the “Housename” column to be the index of the DataFrame. What
statement she should write?
(c) To display total number of elements in the dataframe.
or (Option for part (c) only)
She wants to see the number of columns. Write the statement which will display the number of
columns.
[Link] the table given below and answer the questions
Table : EMP
EMP NO ENAME EEX DOB DOJ DEPT
CODE
101 Ram M 1990-05-02 2012-01-02 D01
102 Aman M 1992-03-01 2013-02-04 D03
103 Diya F 1989-01-04 2011-01-06 D04
106 Sandeep M 1993-04-06 2015-01-03 D02
105 Varun M 1995-07-08 2014-02-04 D05
107 Komal F 1994-03-02 2013-03-06 D01
104 Priyanka F 1995-02-01 2012-02-07 D01
(i) To display EMPNO, ENAME, SEX from the table EMP in descending order of EMPNO
(ii) To display the records of all female employee from the table EMP.
(iii)To display the EMPNO and ENAME of those employees from the table EMP who
are joined between ‘2011-01-01’ and ‘2013-01-01’.
(iv) To count the number of male employees who have born before ‘1994-01-01’.
Section-E (3X5 = 15 Marks)
[Link] the Python code for the following graph which display the different style multiline in same
plot.
or
Observe the below figure and write the Python code to get the output.
[Link] below a table Bookhouse, write SQL query for part (i) to (v).
Table : Booktouse
No Title Auttor Eubject Publister Qty Price
1 Data Structure Lips chute DS McGraw 4 217.00
2 DOS Guide Nortron OS PHI 3 175.00
3 Turbo C++ Robort Lafore Prog Galgotia 5 270.00
4 Dbase Dummies Palmer DBMS PustakM 7 130.00
5 Mastering Windows Cowart OS BPB 1 225.00
6 Computer Studies French FND Galgotia 2 75.00
7 COBOL Stern Prog John W 4 1000.00
8 Guide Network Freed NET Zpress 3 200.00
9 Basic for Beginners Norton Prog BPB 3 40.00
10 Advanced Pascal Schildt Prog McGraw 4 350.00
(i) Display Publisher wise total stock value (Qty Price).
(ii) Display Title of the book which is costliest.
(iii) Display number of books and total Price for each type of Publisher.
(iv) Display all the books where subject starts with “D” and Qty is less than 3.
(v) Display all information of books whose Price starts with 2.
Or
Write the uses of following MySQL functions with one example of each.
(i) MID
(ii) LEFT( )
(iii) TRIM()
(iv) LCASE()
(v) MAX()
37. China Middleton Fashion is planning to expand their network in India, starting with
two cities to provide infrastructure for distribution of their products.
The company has planned to setup their main office in Chennai at three different
locations and have named their offices as Production Unit, Finance Unit and Media
Unit. The company has its Corporate Unit in Delhi.
A rough layout of the same is as follows:
Approximate distance between these units is as follows:
Grom To Distance
Production Finance Unit 70 m
Unit
Production Media Unit 15 m
Unit
Production Corporate 2112 m
Unit Unit
Finance Unit Media Unit 15 m
In continuation of the above, the company experts have planned to install the following
number of computers in each of these units.
To Distance
Production Unit 150
Finance Unit 35
Media Unit 10
Corporate Unit 30
(i) Suggest the kind of network required (out of LAN, MAN, WAN) for each of the following
units.
(a) Production Unit and Media Unit
(b) Production Unit and Finance Unit
(ii) Which of the following devices will you suggest for connecting all computers with
each of their office units?
(a) Switch/Hub
(b) Modem
(c) Telephone
(iii) Suggest a cable/wiring layout for connecting the company’s local office units located in
Chennai.
(iv) After setting up the lab and Internet in the lab, company now requires to enable
videos and animations to be played on the web browser for it’s employees. Which
browser tool /service can be used for the same?
(v) Give an example of Open Source web browser.