Show answer & explanation
Correct answer: D
writelines writes a sequence of strings (III); pickle is the module for binary files (I); try-except is exception handling (IV); rb is opening and reading a binary file (II). So A-III, B-I, C-IV, D-II = option D.
Show answer & explanation
Correct answer: A
'wb+' opens a binary file for both writing and reading (binary read/write). 'w+' and 'a+' are text mode read/write. So binary read+write is wb+.
Show answer & explanation
Correct answer: B
Valid file modes include r, w, a, r+, w+, a+, rb, wb, ab. 'rw' is not a valid mode in Python; reading+writing is denoted r+ or w+.
Show answer & explanation
Correct answer: B
When pickle.load() reaches end-of-file with no more data to read, it raises an EOFError.
Show answer & explanation
Correct answer: A
DELETE is a DML (Data Manipulation Language) command. DROP, ALTER, CREATE are DDL commands.
Show answer & explanation
Correct answer: C
A foreign key in one table references the primary key of another table, linking the two tables together.
Show answer & explanation
Correct answer: A
A primary key must uniquely identify the row (A) and cannot contain NULL values (B). Statements C, D, E are false.
Show answer & explanation
Correct answer: D
The HAVING clause applies conditions on groups after they are formed by GROUP BY. WHERE filters individual rows before grouping.
Show answer & explanation
Correct answer: D
DISTINCT values are {10000, 15000, 25000}. Sum = 10000+15000+25000 = 50000.
Show answer & explanation
Correct answer: C
round(n,d) is a single-row/scalar (numeric) function. max, min, count are aggregate functions.
Show answer & explanation
Correct answer: C
RIGHT("PRAYGRAJ", 3) returns the rightmost 3 characters = 'RAJ'.
Show answer & explanation
Correct answer: B
HTTP=Hyper Text Transfer Protocol (IV); FTP=File Transfer Protocol (I); SMTP=Simple Mail Transfer Protocol (II); TCP=Transmission Control Protocol (III). So A-IV, B-I, C-II, D-III.
Show answer & explanation
Correct answer: B
In star topology each node connects independently to a central hub/switch. If one computer (node) fails, the rest of the network continues to work unaffected.
Show answer & explanation
Correct answer: D
In star topology all nodes connect to a central device (server/hub). If the central server/hub fails, the entire network stops working.
Show answer & explanation
Correct answer: A
A switch examines the destination MAC address and filters/forwards data only to the intended port. Repeaters merely regenerate signals without filtering.
Show answer & explanation
Correct answer: C
The 'finally' block always executes regardless of whether an exception occurred in the 'try' block. So order is finally, try.
Show answer & explanation
Correct answer: D
'ab' is a binary append mode, not a text-file mode. a, w, r are valid text modes.
Show answer & explanation
Correct answer: B
seek() offsets: 0=beginning, 1=current position, 2=end of file. There is no offset for 'middle position', so 'B' (1-the middle position) is invalid.
Show answer & explanation
Correct answer: A
50 60 + = 110; 20 10 - = 10; 110 * 10 = 1100.
Show answer & explanation
Correct answer: C
DNS (Domain Name System) maps domain names to IP addresses.
Show answer & explanation
Correct answer: A
PUSH adds an element to a stack; POP removes the top element.
Show answer & explanation
Correct answer: A
Stack=LIFO (IV); EOF=Exception (III); Tree=Non-linear Data Structure (II); Queue=FIFO (I). So A-IV, B-III, C-II, D-I.
Show answer & explanation
Correct answer: A
Inserting into a full queue causes an overflow condition.
Show answer & explanation
Correct answer: A
In a queue, insertion takes place at the Rear and deletion at the Front. So respectively (insertion, deletion) = Rear, Front = B and A.
Show answer & explanation
Correct answer: C
In the best case of linear search, the target is found at the first position, so only one element is searched.
Show answer & explanation
Correct answer: D
C (modulo division is a hashing method) and E (binary search uses a sorted list divided at the middle) are true. A is false (that is collision, not hashing); B is false (that describes binary search); D is false (searching, not traversing, checks key presence).
Show answer & explanation
Correct answer: B
In insertion sort, pass 1 considers the second element (8) and inserts it into the sorted portion. Since 8 < 9, one swap/shift occurs to place 8 before 9. So 1 swap in pass 1.
Show answer & explanation
Correct answer: B
Bubble sort start: 8,7,13,1,-9,4. Pass 1 bubbles largest to end: 7,8,1,-9,4,13. Pass 2 on 7,8,1,-9,4: compare 7,8 (no swap); 8,1 swap->7,1,8; 8,-9 swap->7,1,-9,8; 8,4 swap->7,1,-9,4,8; gives 7,1,-9,4,8,13.
Show answer & explanation
Correct answer: C
Selection sort makes n-1 passes for a list of n elements.
Show answer & explanation
Correct answer: B
The first/main page of a website is called the Home page.
Show answer & explanation
Correct answer: B
Cookies are small text files transferred by a website to the browser to store information.
Show answer & explanation
Correct answer: C
MAN covers a larger geographical area like a town/city (IV); Ethernet is a set of rules governing LAN functioning (III); Router receives info, examines and transfers to another network (I); Repeater regenerates weak signals (II). So A-IV, B-III, C-I, D-II.
Show answer & explanation
Correct answer: A
Selection operation produces a horizontal subset (rows) of a relation (A is true). Projection gives vertical subset. Union needs same degree (C false). Intersection and cartesian product are binary (D false). A record is a row, not a column (E false).
Show answer & explanation
Correct answer: A
ALTER TABLE is used to add a primary key to an existing table, and the field must be NOT NULL.
Show answer & explanation
Correct answer: D
Aggregate functions are used in the SELECT clause and are commonly applied per group using GROUP BY. So both Select and Group by can be used with aggregate functions.
Show answer & explanation
Correct answer: B
Rows with Bonus NULL: Emp 107, 108, 109 = 3 rows. COUNT(*) = 3.
Show answer & explanation
Correct answer: C
'_anya' matches names with exactly one char before 'anya': Sanya (48000) and Tanya (50000). AVG = (48000+50000)/2 = 49000.
Show answer & explanation
Correct answer: D
Names ending in 'a' AND Salary>45000: Kritika (60000, bonus 123), Sanya (48000, bonus 695), Tanya (50000, bonus 467). Aaliya salary 10000 excluded. Sum=123+695+467=1285.
Show answer & explanation
Correct answer: B
DeptId D01 employees: Kritika 60000, Shabbir 45000, Vergese 15000. MIN = 15000.
Show answer & explanation
Correct answer: C
DeptId in D01/D02 with Bonus NOT NULL: Aaliya(D02,10000), Kritika(D01,60000), Shabbir(D01,45000), Sanya(D02,48000). Vergese D01 has NULL bonus, excluded. MAX = 60000.
Show answer & explanation
Correct answer: C
Multimedia content (audio/video/images) is unstructured data. Tabular, spreadsheet, and inventory data are structured.
Show answer & explanation
Correct answer: D
Bank customer details are stored in structured form (tables). Webpages, text documents and audio/video files are unstructured.
Show answer & explanation
Correct answer: C
The CPU is a processing unit, not a storage device. HDD, Tape Drive store data; data files reside on storage.
Show answer & explanation
Correct answer: D
Per the passage, pre-processing steps are Store, retrieve, classify and update. Search is not listed.
Show answer & explanation
Correct answer: A
Software methods to store and retrieve data include Python programs or a DBMS like MySQL.
Show answer & explanation
Correct answer: D
NameError is raised when a local or global variable name is not defined.
Show answer & explanation
Correct answer: D
Insertion in a queue is at REAR (III); Deletion in a queue is at FRONT (I); Deletion operation = Dequeue (IV); Insertion operation = Enqueue (II). So A-III, B-I, C-IV, D-II.
Show answer & explanation
Correct answer: D
In hashing, the hash table size can be greater than the list size to reduce collisions; it is not fixed to be smaller or equal.
Show answer & explanation
Correct answer: C
Bubble sort repeatedly compares adjacent elements and swaps them if out of order.
Show answer & explanation
Correct answer: B
RDBMS stores data in related tables (III); Primary Key gives unique identification of tuples (I); a Tuple is a collection of attribute values (II); Database Schema and Constraints form the database catalog (IV). So A-III, B-I, C-II, D-IV.
Show answer & explanation
Correct answer: C
LOWER('COMPUTER')='computer'(IV); LEFT('COMPUTER',3)='COM'(I); RIGHT('COMPUTER',4)='UTER'(II); MID('COMPUTER',2,3) starts at position 2 length 3 ='OMP'(III). So A-IV, B-I, C-II, D-III.
Show answer & explanation
Correct answer: D
Candidate key is a concept/term, not a SQL constraint. Primary key, Unique, and Foreign key are constraints.
Show answer & explanation
Correct answer: C
MOD(53,10) returns the remainder 53 mod 10 = 3.
Show answer & explanation
Correct answer: C
Pandas DataFrame supports sum(), count(), mean() but not avg(); the average method is mean(), so avg() is not a valid DataFrame method.
Show answer & explanation
Correct answer: D
sort() (sort_values) reorders data and is not an aggregate function. max(), std(), var() are aggregate/statistical functions.
Show answer & explanation
Correct answer: C
In pandas, NaN (Not a Number) denotes a missing value.
Show answer & explanation
Correct answer: A
The scatter() function is a more powerful/dedicated method of creating scatter plots than the plot() function.
Show answer & explanation
Correct answer: C
A frequency polygon makes it easy to compare two or more distributions on the same set of axes since multiple polygons can be overlaid.
Show answer & explanation
Correct answer: C
To create a step-type histogram with 20 bins, use plt.hist(x, bins=20, histtype="step"). Option C matches (histtype="step").
Show answer & explanation
Correct answer: C
plt.xlabel() sets the label/title of the X-axis. plt.title() sets the graph title.
Show answer & explanation
Correct answer: B
Windows is an operating system, not a web browser. Edge, Internet Explorer, and Chrome are browsers.
Show answer & explanation
Correct answer: B
Slammer is a virus/worm (IV); Microwave is uni-directional (II); Radiowave is omni-directional (I); White hats are ethical hackers (III). So A-IV, B-II, C-I, D-III.
Show answer & explanation
Correct answer: B
Fiber-optic allows longer transmission distances (C) and is less affected by external electromagnetic signals/interference (D). It is more expensive and harder to install/terminate.
Show answer & explanation
Correct answer: C
A person who uses digital technology along with the internet is called a Netizen or a Digital citizen. So B and D.
Show answer & explanation
Correct answer: D
The two types of digital footprints are Passive and Active. So C and D.
Show answer & explanation
Correct answer: A
Net etiquettes include being ethical, respecting privacy, being responsible and being respectful. All four (A, B, C and D).
Show answer & explanation
Correct answer: B
LibreOffice and Mozilla Firefox are popular free and open source software (FOSS). Matlab, Adobe Acrobat, MS-Office and Windows are proprietary.
Show answer & explanation
Correct answer: D
Unsolicited commercial/bulk email is known as spam.
Show answer & explanation
Correct answer: A
Doxing is a form of cyber bullying (IV); FOSS grants users substantial rights and freedom (III); WORM copies itself across a network (II); Trojan Horse carries out malicious operations (I). So A-IV, B-III, C-II, D-I.
Show answer & explanation
Correct answer: C
Creations of the mind like patents, trademarks and copyrights are protected as Intellectual Property Rights (IPR).
Show answer & explanation
Correct answer: C
Bandwidth = maximum frequency - minimum frequency = 1500 - 500 = 1000 kHz.
Show answer & explanation
Correct answer: A
Data per upload = 10 pages * 1600 chars * 8 bits = 128000 bits per 20 seconds. Data rate = 128000/20 = 6400 bps.
Show answer & explanation
Correct answer: D
The user uploads and simultaneously receives data, i.e., sending and receiving at the same time, which is full duplex communication.
Show answer & explanation
Correct answer: D
10 pages * 1600 characters * 8 bits = 128000 bits.
Show answer & explanation
Correct answer: C
The capacity of a transmission medium is measured in terms of bandwidth and data transfer rate.
Show answer & explanation
Correct answer: D
To remove a column, use drop() with axis=1: statedf = statedf.drop(['Humidity'], axis=1).
Show answer & explanation
Correct answer: B
The index labels are state names (Assam, Delhi, ...). loc uses square brackets with label: statedf.loc['Rajasthan'].
Show answer & explanation
Correct answer: B
The shape attribute returns a tuple (rows, columns), e.g., (5, 4).
Show answer & explanation
Correct answer: C
head(5) displays the first 5 records and tail(5) displays the last (bottom) 5 records.
Show answer & explanation
Correct answer: A
The expression returns a boolean Series indexed by the state names (the dataframe index). Rainfall>90: Assam 150 True, Delhi 70 False, Kerala 120 True, Rajasthan 50 False, Telangana 90 False (90 is not >90). So option A.
Show answer & explanation
Correct answer: C
DATE(), NOW(), DAY() are SQL date/time functions. THEN() is not a date function.
Show answer & explanation
Correct answer: A
std()=Standard Deviation (IV); describe()=Descriptive statistical values (III); var()=Variance (I); mode()=value that appears most (II). So A-IV, B-III, C-I, D-II.
Show answer & explanation
Correct answer: C
Eavesdropping is the secret/unauthorized interception (capture and analysis) of network traffic by malicious users.
Show answer & explanation
Correct answer: B
Mesh: each device connected with every other device (III); Ring: each node connected to two other devices on either side (IV); Bus: single backbone wire shared among nodes (I); Star: each device connected to a central networking device (II). So A-III, B-IV, C-I, D-II.
Show answer & explanation
Correct answer: B
The pivot() function reshapes data and creates a new DataFrame from the original one.
Original question paper source: National Testing Agency (NTA), CUET (UG) 2023. Reproduced for educational use. Answers & explanations by UniDrill.