← All previous-year papers

CUET 2025 Computer Science Question Paper with Answers & Solutions

85 questions with answer key & explanations

Q1.
Identify the relational algebra operation denoted by : Course X Student; where 'Course' and 'Student' are two relations and X is an operation.
A. Union
B. Set Difference
C. Cartesian Product
D. Intersection
Show answer & explanation

Correct answer: C

The 'X' (cross) symbol between two relations denotes the Cartesian Product, which combines every tuple of one relation with every tuple of the other.

Q2.
Given: TableA has columns Name, Hobbies with rows (Anu, Dance), (Anuj, Music). TableB has columns Name, Hobbies with rows (Prannav, Reading), (Anuj, Music). Find TableA U TableB ?
[Figure in original paper — see source PDF]
A. Table with Name, Hobbies: (Anu, Dance), (Anuj, Music), (Prannav, Reading)
B. Table with Name, Hobbies: (Anuj, Music), (Prannav, Reading)
C. Table with Name, Hobbies: (Prannav, Reading)
D. Table with Name, Hobbies: (Anu, Music), (Anuj, Dance), (Prannav, Reading)
Show answer & explanation

Correct answer: A

Union combines all tuples from both tables, removing duplicates. (Anuj, Music) appears in both so kept once. Result: (Anu, Dance), (Anuj, Music), (Prannav, Reading).

Q3.
Given two relations: 'Employee' with structure as ID, name, Address, Phone, Deptno; 'Department' with structure as Deptno, Dname. ______ is used to represent the relationship between two relations Employee and Department.
A. Primary key
B. Alternate key
C. Foreign key
D. Candidate key
Show answer & explanation

Correct answer: C

Deptno in Employee references the primary key Deptno of Department, so it is a Foreign key, which establishes the relationship between the two tables.

Q4.
A ______ value is specified for the column, if no value is provided.
A. unique
B. null
C. default
D. primary
Show answer & explanation

Correct answer: C

The DEFAULT constraint provides a value to be used for the column when no value is supplied during insertion.

Q5.
Given table 'StudAtt' with structure as Rno, Attdate, Attendance. Identify the suitable command to add a primary key to the table after table creation. Note: In the given case, we want to make both Rno and Attdate columns as primary key.
A. ALTER TABLE StudAtt ADD PRIMARY KEY(Rno, Attdate);
B. CREATE TABLE StudAtt ADD PRIMARY KEY(Rno);
C. ALTER TABLE StudAtt ADD PRIMARY KEY;
D. ALTER TABLE StudAtt ADD PRIMARY KEY(Rno) AND PRIMARY KEY(Attdate);
Show answer & explanation

Correct answer: A

A composite primary key on Rno and Attdate is added after creation using ALTER TABLE ... ADD PRIMARY KEY(Rno, Attdate);

Q6.
The SELECT command when combined with DISTINCT clause is used to:
A. returns records without repetition
B. returns records with repetition
C. returns all records with conditions
D. returns all records without checking
Show answer & explanation

Correct answer: A

DISTINCT eliminates duplicate rows, returning each unique record only once (without repetition).

Q7.
________________ is used to search for a specific pattern in a column.
A. Between operator
B. In operator
C. Like operator
D. Null operator
Show answer & explanation

Correct answer: C

The LIKE operator with wildcards (% and _) is used to search for a specific pattern in a column.

Q8.
Give the output of the query:- SELECT MONTH("2010-03-05");
A. 3
B. 5
C. MARCH
D. MAY
Show answer & explanation

Correct answer: A

MONTH() returns the numeric month from the date. For 2010-03-05 the month is 03, i.e. 3.

Q9.
Match List-I with List-II. List-I (Aggregate function): (A) count(marks), (B) count(*), (C) avg(marks), (D) sum(marks). List-II (Description): (I) Count all rows, (II) Finding average of non null values of marks, (III) Count all non null values of marks column, (IV) Finding sum of all marks. Choose the correct answer from the options given below.
A. (A) - (III), (B) - (I), (C) - (II), (D) - (IV)
B. (A) - (I), (B) - (III), (C) - (II), (D) - (IV)
C. (A) - (I), (B) - (II), (C) - (IV), (D) - (III)
D. (A) - (III), (B) - (IV), (C) - (I), (D) - (II)
Show answer & explanation

Correct answer: A

count(marks)=count non-null values (III); count(*)=count all rows (I); avg(marks)=average of non-null (II); sum(marks)=sum of marks (IV).

Q10.
Given Relation: 'STUDENT' with columns SNO, SNAME, MARKS and rows (1, Amit, 20), (2, Karuna, 40), (3, Kavita, NULL), (4, Anuj, 30). Find the value of: SELECT AVG(MARKS) FROM STUDENT;
A. 30
B. 22.5
C. 90
D. 23
Show answer & explanation

Correct answer: A

AVG ignores NULL. Non-null marks: 20, 40, 30; sum=90, count=3, average=$90/3=30$.

Q11.
______ operation is used to get the common tuples from two relations.
A. Union
B. Intersect
C. Set Difference
D. Cartesian product
Show answer & explanation

Correct answer: B

Intersection returns the tuples that are common to both relations.

Q12.
Identify the correct IP address from the options given:
A. FC:F8:AE:CE:7B:16
B. 192.168.256.178
C. 192.168.0.178
D. 192.168.0.-1
Show answer & explanation

Correct answer: C

A valid IPv4 address has four octets each 0-255. A is a MAC address, B has 256 (invalid), D has -1 (invalid). Only 192.168.0.178 is valid.

Q13.
Arrange the following python code segments in order with respect to exception handling. (A) except ZeroDivisionError: print("Zero denominator not allowed") (B) finally: print("Over and Out") (C) try: n=50 d=int(input("enter denominator")) q=n/d print("division performed") (D) else: print("Result=",q). Choose the correct answer from the options given below:
A. (C), (A), (B), (D)
B. (C), (A), (D), (B)
C. (B), (A), (D), (C)
D. (C), (B), (D), (A)
Show answer & explanation

Correct answer: B

Correct order is try, except, else, finally: (C) try, (A) except, (D) else, (B) finally.

Q14.
______ is the process of transforming data or an object in memory (RAM) to a stream of bytes called byte streams.
A. read()
B. write()
C. Pickling
D. De-serialization
Show answer & explanation

Correct answer: C

Pickling (serialization) converts an in-memory object into a byte stream. De-serialization (unpickling) does the reverse.

Q15.
Identify the correct code to read data from the file notes.dat in a binary file:
A. import pickle f1=open("notes.dat","r") data=pickle.load(f1) print(data) f1.close()
B. import pickle f1=open("notes.dat","rb") data=f1.load() print(data) f1.close()
C. import pickle f1=open("notes.dat","rb") data=pickle.load(f1) print(data) f1.close()
D. import pickle f1=open("notes.dat","rb") data=f1.read() print(data) f1.close()
Show answer & explanation

Correct answer: C

Binary file must be opened in 'rb' mode and read with pickle.load(filehandle). Option C does this correctly.

Q16.
Identify the correct python statement to open a text file "data.txt" in both read and write mode.
A. file.open("data.txt")
B. file.open("data.txt","r+")
C. file.open("data.txt","rw")
D. file.open("data.txt","rw+")
Show answer & explanation

Correct answer: B

Mode 'r+' opens a text file for both reading and writing. 'rw' and 'rw+' are not valid Python modes.

Q17.
Identify the type of expression where operators are placed before the corresponding operands:
A. Polish expression
B. Infix expression
C. Postfix expression
D. Reverse polish expression
Show answer & explanation

Correct answer: A

Prefix (Polish) notation places the operator before its operands. Postfix is reverse Polish; infix places operator between operands.

Q18.
Evaluate the postfix expression: $24\ 5\ 7\ *\ 5\ /\ +$
A. 29
B. 30
C. 31
D. 0
Show answer & explanation

Correct answer: C

Evaluate: $5*7=35$; $35/5=7$; $24+7=31$.

Q19.
STACK follows ______ principle, where insertion and deletion is from ______ end/ends only.
A. LIFO, two
B. FIFO, two
C. FIFO, top
D. LIFO, one
Show answer & explanation

Correct answer: D

A stack follows LIFO (Last In First Out) and both insertion and deletion happen at one end (the top).

Q20.
Given a scenario: Suppose there is a web-server hosting a website to declare results. This server can handle a maximum of 100 concurrent requests to view results. So, as to serve thousands of user requests, a ______ would be the most appropriate data structure to use.
A. Stack
B. Queue
C. List
D. Dictionary
Show answer & explanation

Correct answer: B

Requests must be served in the order received (first-come-first-served), which is the FIFO behaviour of a Queue.

Q21.
To perform enqueue and dequeue efficiently on a queue, which of the following operations are required? A) isEmpty B) peek C) isfull D) update. Choose the correct answer from the options given below:
A. (A), (B) and (D) only
B. (A), (B) and (C) only
C. (B), (C) and (D) only
D. (A), (C) and (D) only
Show answer & explanation

Correct answer: B

Queue operations need isEmpty (to check for underflow), peek (to view front), and isFull (to check overflow). update is not a standard queue operation.

Q22.
Given a network diagram with central node A connected to nodes B, C, D and E. Distance table: A to B = 20 mtr., A to C = 50 mtr., A to D = 110 mtr., A to E = 70 mtr. Identify the correct place where we have to use repeaters.
[Figure in original paper — see source PDF]
A. Between A to B
B. Between A to C
C. Between A to D
D. Between A to E
Show answer & explanation

Correct answer: C

Ethernet (UTP) signals attenuate beyond about 100 metres, so a repeater is needed for the longest link A to D = 110 m.

Q23.
In MAC address, Organisational Unique Identifier (OUI) consist of ______.
A. 32 bits
B. 48 bits
C. 24 bits
D. 64 bits
Show answer & explanation

Correct answer: C

A 48-bit MAC address has its first half (24 bits) as the OUI assigned to the manufacturer.

Q24.
Given a list numList of n elements and key value K, arrange the following steps for finding the position of the key K in the numList using binary search algorithm i.e. BinarySearch(numList, key). (A) Calculate mid = (first+last)//2 (B) SET first = 0, last = n-1 (C) PRINT "Search unsuccessful" (D) WHILE first <= last REPEAT IF numList[mid] = key PRINT "Element found at position", mid+1 STOP ELSE IF numList[mid] > key, THEN last = mid-1 ELSE first = mid + 1. Choose the correct answer from the options given below:
A. (A), (B), (D), (C)
B. (D), (B), (A), (C)
C. (B), (A), (D), (C)
D. (D), (A), (B), (C)
Show answer & explanation

Correct answer: C

First initialize first and last (B), compute mid (A), then the while loop (D), and finally print unsuccessful (C): (B),(A),(D),(C).

Q25.
In binary search after every pass of the algorithm, the search area:
A. gets doubled
B. gets reduced by half
C. remains same
D. gets reduced by one third
Show answer & explanation

Correct answer: B

Each comparison in binary search discards half of the remaining elements, so the search area is halved each pass.

Q26.
For binary search, the list is in ascending order and the key is present in the list. If the middle element is less than the key, it means:
A. The key is in the first half.
B. The key is in the second half.
C. The key is not in the list.
D. The key is the middle element.
Show answer & explanation

Correct answer: B

In an ascending list, if the middle element is smaller than the key, the key must lie in the right (second) half.

Q27.
Arrange the following in order related to bubble sort for a list of elements: Initial list: 4, -9, 12, 30, 2, 6. (A) -9 4 12 30 2 6 (B) -9 4 12 2 30 6 (C) -9 4 2 12 6 30 (D) -9 4 12 2 6 30. Choose the correct answer from the options given below:
[Figure in original paper — see source PDF]
A. (A), (B), (D), (C)
B. (A), (C), (B), (D)
C. (B), (A), (D), (C)
D. (C), (B), (D), (A)
Show answer & explanation

Correct answer: A

Bubble sort pass 1 on 4,-9,12,30,2,6 gives -9,4,12,2,6,30 progressing through swaps. The intermediate snapshots in increasing sorted order are (A),(B),(D),(C): (A) after first swap, then (B), (D) end of pass1, (C) end of pass2.

Q28.
The amount of time an algorithm takes to process a given data can be called its :
A. Process time
B. Time period
C. Time complexity
D. Time bound
Show answer & explanation

Correct answer: C

Time complexity expresses the amount of time an algorithm takes to run as a function of input size.

Q29.
Identify the incorrect statement in the context of measures of variability:
A. Range is the difference between maximum and minimum values of the data.
B. Mean is the average of numeric values of an attribute.
C. Standard deviation refers to differences within the set of data of a variable.
D. Measures of variability is also known as measures of dispersion.
Show answer & explanation

Correct answer: B

Mean is a measure of central tendency, not a measure of variability, so within this context that statement is the incorrect/misplaced one.

Q30.
Identify type of data being collected/generated in the scenerio of recording a video:
A. Structured Data
B. Ambiguous data
C. Unstructured data
D. Formal Data
Show answer & explanation

Correct answer: C

Video has no predefined tabular schema, so it is unstructured data.

Q31.
Given data: Weight of 20 student in kgs=[35, 35, 40, 40, 40, 50, 50, 50, 50, 60, 65, 70, 70, 72, 75, 75, 78, 78]. Find the mode.
A. 50
B. 55
C. 57.4
D. 57
Show answer & explanation

Correct answer: A

Mode is the most frequent value. 50 appears 4 times, more than any other value, so mode = 50.

Q32.
Match List-I with List-II. List-I: (A) Primary key, (B) Degree, (C) Foreign key, (D) Constraint. List-II: (I) Total number of attributes in a table, (II) Attribute used to relate two tables, (III) Attribute used to uniquely identify a tuple, (IV) A restriction on the type of data that can be inserted in a column of a table. Choose the correct answer from the options given below:
A. (A) - (I), (B) - (II), (C) - (III), (D) - (IV)
B. (A) - (III), (B) - (I), (C) - (II), (D) - (IV)
C. (A) - (I), (B) - (II), (C) - (IV), (D) - (III)
D. (A) - (III), (B) - (IV), (C) - (I), (D) - (II)
Show answer & explanation

Correct answer: B

Primary key=uniquely identify tuple (III); Degree=total attributes (I); Foreign key=relate two tables (II); Constraint=restriction on data (IV).

Q33.
In SQL table, the set of values which a column can take in each row is called ______.
A. Tuple
B. Attribute
C. Domain
D. Relation
Show answer & explanation

Correct answer: C

The set of all permissible values for a column (attribute) is its domain.

Q34.
Which of the following is synonym for Meta - data?
A. Data Dictionary
B. Database Instance
C. Database Schema
D. Data Constraint
Show answer & explanation

Correct answer: A

Metadata (data about data) is stored in the Data Dictionary, which is its synonym.

Q35.
Single row functions are also known as ______ functions.
A. Multi row
B. Group
C. Mathematical
D. Scalar
Show answer & explanation

Correct answer: D

Single-row functions operate on one row at a time and return one result per row; they are also called scalar functions.

Q36.
Ms Ritika wants to delete the table 'sports' permanently. Help her in selecting the correct SQL command from the following.
A. DELETE FROM SPORTS;
B. DROP SPORTS;
C. DROP TABLE SPORTS;
D. DELETE * FROM SPORTS;
Show answer & explanation

Correct answer: C

DROP TABLE removes the table structure and data permanently. DELETE only removes rows, keeping the structure.

Q37.
Which of the following are text functions? (A) MID() (B) INSTR() (C) SUBSTR() (D) LENGTH(). Choose the correct answer from the options given below:
A. (A), (B) and (D) only
B. (A), (B) and (C) only
C. (A), (B), (C) and (D)
D. (B), (C) and (D) only
Show answer & explanation

Correct answer: C

MID, INSTR, SUBSTR and LENGTH all operate on strings, so all four are text (string) functions.

Q38.
Match List-I with List-II. List-I: (A) ROUTER, (B) ETHERNET CARD, (C) RING, (D) PAN. List-II: (I) NETWORK TOPOLOGY, (II) NETWORK DEVICE, (III) NETWORK TYPE, (IV) NETWORK INTERFACE CARD. Choose the correct answer from the options given below:
A. (A) - (II), (B) - (IV), (C) - (I), (D) - (III)
B. (A) - (I), (B) - (III), (C) - (II), (D) - (IV)
C. (A) - (IV), (B) - (II), (C) - (III), (D) - (I)
D. (A) - (III), (B) - (IV), (C) - (I), (D) - (II)
Show answer & explanation

Correct answer: A

Router=network device (II); Ethernet card=NIC (IV); Ring=topology (I); PAN=network type (III).

Q39.
________ is a language used to design web pages.
A. Web browser
B. HTTP
C. HTML
D. WWW
Show answer & explanation

Correct answer: C

HTML (HyperText Markup Language) is the markup language used to design web pages.

Q40.
Match List-I with List-II. List-I: (A) Modem, (B) RJ45, (C) Network interface unit, (D) ISP. List-II: (I) An eight pin connector used with Ethernet cables for networking, (II) Modulator-Demodulator, (III) An organization that provides services for accessing the internet, (IV) Ethernet card. Choose the correct answer from the options given below:
A. (A) - (I), (B) - (II), (C) - (III), (D) - (IV)
B. (A) - (II), (B) - (I), (C) - (IV), (D) - (III)
C. (A) - (I), (B) - (II), (C) - (IV), (D) - (III)
D. (A) - (II), (B) - (IV), (C) - (I), (D) - (III)
Show answer & explanation

Correct answer: B

Modem=Modulator-Demodulator (II); RJ45=8-pin connector (I); Network interface unit=Ethernet card (IV); ISP=provides internet access (III).

Q41.
Bandwidth of a channel is:
A. The range of frequencies available for transmission of data through that channel.
B. The path of message travels between source and destination.
C. The set of rules on the Internet.
D. The data or Information that needs to be exchanged.
Show answer & explanation

Correct answer: A

Bandwidth is the range of frequencies available for transmitting data over a channel.

Q42.
Data Transfer Rate 1 Gbps is equal to : (A) 1024 Mbps (B) 1024 Kbps (C) $2^{30}$ bps (D) $2^{20}$ bps. Choose the correct answer from the options given below:
A. (A) and (D) only
B. (A) and (C) only
C. (B) and (D) only
D. (B) and (C) only
Show answer & explanation

Correct answer: B

$1\text{ Gbps}=1024\text{ Mbps}=1024\times1024\times1024\text{ bps}=2^{30}\text{ bps}$. So (A) and (C).

Q43.
Identify the wired transmission media for the following: "They are less expensive and commonly used in telephone lines and LANs. These cables are of two types: Unshielded and shielded."
A. Optical Fibre
B. Coaxial Cable
C. Twisted pair cable
D. Microwaves
Show answer & explanation

Correct answer: C

Twisted pair cable comes in unshielded (UTP) and shielded (STP) types and is widely used in telephone lines and LANs.

Q44.
The term Cookie is defined as :
A. A computer cookie is a small file or data packet which is stored by a website on the server's computer.
B. A cookie is edited only by the website that created it, the client's computer acts as a host to store the cookie.
C. Cookies are used by the user to store data on the computer.
D. A cookie is a security system to protect your data.
Show answer & explanation

Correct answer: B

A cookie is created/edited only by the website that set it and is stored on the client's computer which acts as a host.

Q45.
Identify the concept behind the below-given scenario: "If an attacker limits or stops an authorized user to access a service, device or any such resource by overloading that resource with illegitimate requests."
A. Snooping
B. Eavesdropping
C. Denial of Service
D. Plagiarism
Show answer & explanation

Correct answer: C

Overloading a resource with illegitimate requests to deny access to authorized users is a Denial of Service (DoS) attack.

Q46.
The HTTPS based websites require:
A. Search Engine Optimization
B. Digital authencity
C. WWW Certificate
D. SSL Digital Certificate
Show answer & explanation

Correct answer: D

HTTPS uses SSL/TLS for secure communication, which requires an SSL Digital Certificate.

Q47.
State the output of the following query. SELECT LENGTH(MID('INFORMATICS PRACTICES',5,-5));
A. NO OUTPUT
B. 5
C. 0
D. ERROR
Show answer & explanation

Correct answer: C

MID with a negative length returns an empty string, and LENGTH of an empty string is 0.

Q48.
Match List-I with List-II. List-I: (A) group by, (B) mid(), (C) count(), (D) mod(). List-II: (I) math function, (II) aggregate function, (III) having, (IV) text function. Choose the correct answer from the options given below:
A. (A) - (III), (B) - (IV), (C) - (II), (D) - (I)
B. (A) - (I), (B) - (III), (C) - (II), (D) - (IV)
C. (A) - (I), (B) - (II), (C) - (IV), (D) - (III)
D. (A) - (III), (B) - (IV), (C) - (I), (D) - (II)
Show answer & explanation

Correct answer: A

group by pairs with having (III); mid()=text function (IV); count()=aggregate function (II); mod()=math function (I).

Q49.
What will be the format of the output of the NOW() function?
A. HH:MM:SS
B. YYYY-MM-DD HH:MM:SS
C. HH:MM:SS YYYY-MM-DD
D. YYYY-DD-MM HH:MM:SS
Show answer & explanation

Correct answer: B

NOW() returns the current date and time in the format YYYY-MM-DD HH:MM:SS.

Q50.
State the output of the following query: SELECT ROUND(9873.567,-2);
A. 9900
B. 9873
C. 9800
D. 9873.5
Show answer & explanation

Correct answer: A

ROUND with -2 rounds to the nearest hundred: 9873.567 rounds to 9900.

Q51.
Given the following table: EMPLOYEE with columns ENO, SALARY and rows (A101, 4000), (B109, NULL), (C508, 6000), (A305, 2000). State the output of the following query based on the above given table. SELECT COUNT(SALARY) FROM EMPLOYEE;
A. 4
B. 2
C. 3
D. 1
Show answer & explanation

Correct answer: C

COUNT(SALARY) counts only non-null values. Salaries 4000, 6000, 2000 are non-null (NULL excluded), so count = 3.

Q52.
Match List-I with List-II. List-I: (A) SUBSTR(), (B) TRIM(), (C) INSTR(), (D) LEFT(). List-II: (I) To find the position of a substring in a string, (II) To extract a substring from a string, (III) To extract characters from the left side of the string, (IV) To remove spaces from both the sides of the string. Choose the correct answer from the options given below:
A. (A) - (I), (B) - (II), (C) - (III), (D) - (IV)
B. (A) - (II), (B) - (IV), (C) - (I), (D) - (III)
C. (A) - (I), (B) - (II), (C) - (IV), (D) - (III)
D. (A) - (III), (B) - (IV), (C) - (I), (D) - (II)
Show answer & explanation

Correct answer: B

SUBSTR=extract substring (II); TRIM=remove spaces both sides (IV); INSTR=find position of substring (I); LEFT=extract left characters (III).

Q53.
Arrange the following statements to create a series from a dictionary. (A) Print the series (B) Import the pandas library (C) Create the series (D) Create a dictionary. Choose the correct answer from the options given below:
A. (A), (B), (C), (D)
B. (A), (C), (B), (D)
C. (B), (D), (C), (A)
D. (C), (B), (D), (A)
Show answer & explanation

Correct answer: C

Import pandas (B), create dictionary (D), create series from it (C), then print (A): (B),(D),(C),(A).

Q54.
Given the following DataFrame 'df': columns PNO, NAME with rows (111, ROHAN), (222, MEETA), (333, SEEMA), (444, SHALU), (555, POONAM). Select the correct commands from the following to display the last five rows: (A) print(df.tail(-5)) (B) print(df.head(-5)) (C) print(df.tail()) (D) print(df.tail(5)). Choose the correct answer from the options given below:
A. (A), (C) and (D) only
B. (A) and (B) only
C. (A), (B), (C) and (D)
D. (C) and (D) only
Show answer & explanation

Correct answer: D

df.tail() defaults to last 5 rows and df.tail(5) shows last 5 rows. tail(-5)/head(-5) give empty/different results, so only (C) and (D).

Q55.
Given the following series 'ser1': index 0=69, 1=80, 2=20, 3=50, 4=100, 5=70. State the output of the following command: print(ser1>=70)
[Figure in original paper — see source PDF]
A. Series: 1=80, 4=100, 5=70
B. Series: 0=F, 1=T, 2=F, 3=F, 4=T, 5=T
C. Series: 1=T, 4=T, 5=T
D. Series: 1=80, 4=100
Show answer & explanation

Correct answer: B

A boolean comparison returns True/False for every index: 69<70 F, 80 T, 20 F, 50 F, 100 T, 70 T.

Q56.
Which of the following are the correct commands to delete a column from the DataFrame 'df1'? (A) df1=df1.drop(column name,axis=1) (B) df1.drop(column name,axis=columns,inplace=True) (C) df1.drop(column name,axis='columns',inplace=True) (D) df1.drop(column name,axis=1,inplace=True). Choose the correct answer from the options given below:
A. (A), (C) and (D) only
B. (A), (B) and (C) only
C. (A), (B), (C) and (D)
D. (B), (C) and (D) only
Show answer & explanation

Correct answer: A

Valid forms use axis=1 or axis='columns'. (B) uses axis=columns without quotes which is invalid. So (A), (C), (D).

Q57.
Which of the following is the correct command to display the top 2 records of Series 'Tail'?
A. print(s1.head(2))
B. print(tail.head().)
C. print(tail.head())
D. print(tail.head(2))
Show answer & explanation

Correct answer: D

The series is named Tail; head(2) returns its first 2 records: print(tail.head(2)).

Q58.
While transferring the data from a DataFrame to CSV file, if we do not want the column names to be saved to the file on the disk, the parameter to be used in to_csv() is ______.
A. header=False
B. index=False
C. header=True
D. index=True
Show answer & explanation

Correct answer: A

header=False prevents column names (header row) from being written to the CSV file.

Q59.
HTTP is ______
A. a set of rule for email communication.
B. a file transfer protocol.
C. a set of rules which is used to retrieve linked web pages across the web.
D. a set of rules used for secure transmission of data.
Show answer & explanation

Correct answer: C

HTTP is the HyperText Transfer Protocol, a set of rules used to retrieve linked web pages (hypertext) across the web.

Q60.
Put the following statistical measures in order starting from the one that provides the simplest measure of data to the most complex one that describes data spread. (A) Mode (B) Mean (C) Median (D) Range (E) Standard Deviation. Choose the correct answer from the options given below:
A. (A), (C), (B), (D), (E)
B. (A), (B), (C), (D), (E)
C. (B), (A), (D), (E), (C)
D. (C), (E), (B), (D), (A)
Show answer & explanation

Correct answer: A

From simplest central tendency to spread: Mode, Median, Mean, Range, Standard Deviation, i.e. (A),(C),(B),(D),(E).

Q61.
Dataframe.quantile() is used to get the quartiles. The second quantile is known as ______.
A. mode
B. mean
C. standard deviation
D. median
Show answer & explanation

Correct answer: D

The second quartile (50th percentile, Q2) is the median.

Q62.
Consider the given DataFrame 'df4' with columns NAME, PERIODIC, ENG, MATHS, SCIENCE and rows: index 12 (MEENA,1,40,60,80), 17 (REENA,2,60,30,10), 18 (TEENA,3,80,60,40), 20 (SHEENA,2,90,20,70). Select the correct command to get the following output: NAME=MEENAREENATEENASHEENA, PERIODIC=8, ENG=270, MATHS=170, SCIENCE=200.
[Figure in original paper — see source PDF]
A. print(df4.sum(numeric_only=True))
B. print(df4.sum(numeric_only=False))
C. print(df4.sum())
D. print(df4.count(numeric_only=True))
Show answer & explanation

Correct answer: C

The output concatenates the NAME strings (MEENAREENATEENASHEENA) and sums numeric columns, which happens only when text is included, i.e. default df4.sum() (equivalent to numeric_only=False). Since the output includes the string column, sum() concatenating strings is shown by C.

Q63.
The process of changing the structure of a DataFrame using function pivot() is known as ______.
A. Transpose
B. Reindexing
C. Resetting
D. Reshaping
Show answer & explanation

Correct answer: D

pivot() rearranges/changes the structure of a DataFrame, which is called reshaping.

Q64.
After establishing the connection to fetch the data from the table of a database in SQL into a DataFrame, which of the following function will be used? (A) pandas.read_sql_query() (B) pandas.read_sql_table() (C) pandas.read_sql_query_table() (D) pandas.read_sql(). Choose the correct answer from the options given below:
A. (A), (B) and (D) only
B. (A), (B) and (C) only
C. (A), (B), (C) and (D)
D. (B), (C) and (D) only
Show answer & explanation

Correct answer: A

Valid pandas functions are read_sql_query(), read_sql_table() and read_sql(). read_sql_query_table() does not exist. So (A),(B),(D).

Q65.
______ in matplotlib also known as correlation plot, because they show how two variables are related.
A. Bar graph
B. Pie chart
C. Box plot
D. Scatter plot
Show answer & explanation

Correct answer: D

Scatter plots display the relationship/correlation between two variables, hence called correlation plots.

Q66.
Given the following statement: import matplotlib.pyplot as plt. 'plt' in the above statement is ______ name.
A. key
B. alias
C. variable
D. function
Show answer & explanation

Correct answer: B

The 'as plt' clause assigns an alias name to the imported module.

Q67.
How can you save a matplotlib plot as a file?
A. plt.export()
B. plt.save()
C. plt.savefig()
D. plt.store()
Show answer & explanation

Correct answer: C

plt.savefig() saves the current figure to a file.

Q68.
Arrange the following in order in the context of exception handling: (A) Program Termination (B) Exception is raised (C) Error occurs in a program (D) Catching an exception. Choose the correct answer from the options given below:
A. (C), (B), (D), (A)
B. (A), (C), (B), (D)
C. (B), (A), (D), (C)
D. (C), (B), (A), (D)
Show answer & explanation

Correct answer: A

Error occurs (C), exception raised (B), exception caught (D), then program termination/continuation (A): (C),(B),(D),(A).

Q69.
The plot function of pandas matplotlib uses 'kind' argument which can accept a string indicating the type of graph to be plotted. Which of the following are valid plots? (A) Area (B) Box (C) Scatter (D) Line. Choose the correct answer from the options given below:
A. (A), (B) and (D) only
B. (A), (B) and (C) only
C. (A), (B), (C) and (D)
D. (B), (C) and (D) only
Show answer & explanation

Correct answer: C

kind accepts 'area', 'box', 'scatter' and 'line' (among others), so all four are valid.

Q70.
Given the following code for histogram: df.plot(kind='hist', edgecolor="Green", linewidth=2, linestyle='-:', fill=False, hatch='o'). What is role of fill=False?
A. Each hist will be filled with green color.
B. Each hist will be empty.
C. Each hist will be filled with ':'.
D. The edge color of each hist will be black.
Show answer & explanation

Correct answer: B

fill=False means the bars are not filled with colour, leaving them empty (only edges shown).

Q71.
Matplotlib library can be installed using pip command. Identify the correct syntax from the following options.
A. pip install matplotlib.pyplotlib
B. pip install matplot.pyplotlib
C. pip install matplotlib.pyplotlib as plt
D. pip install matplotlib
Show answer & explanation

Correct answer: D

The correct package name for pip is matplotlib: pip install matplotlib.

Q72.
Dynamic web pages can be created using various languages, like ______. (A) JavaScript (B) PHP (C) Python (D) Ruby. Choose the correct answer from the options given below:
A. (A), (B) and (D) only
B. (A), (B) and (C) only
C. (A), (B), (C) and (D)
D. (B), (C) and (D) only
Show answer & explanation

Correct answer: C

JavaScript, PHP, Python and Ruby can all be used to create dynamic web pages, so all four.

Q73.
Match List-I with List-II. List-I: (A) STAR TOPOLOGY, (B) LAN, (C) HUB, (D) VoIP. List-II: (I) Each communicating device is connected to a central node, (II) Networking device, (III) Protocol, (IV) Type of network. Choose the correct answer from the options given below:
A. (A) - (I), (B) - (II), (C) - (III), (D) - (IV)
B. (A) - (I), (B) - (III), (C) - (II), (D) - (IV)
C. (A) - (I), (B) - (IV), (C) - (II), (D) - (III)
D. (A) - (III), (B) - (IV), (C) - (I), (D) - (II)
Show answer & explanation

Correct answer: C

Star topology=central node (I); LAN=type of network (IV); Hub=networking device (II); VoIP=protocol (III).

Q74.
Arrange the following in sequence of execution: (A) HTTP Request (B) Calls an application in response to the HTTP request (C) Program executes and produces HTML output (D) HTTP Response. Choose the correct answer from the options given below:
A. (B), (A), (C), (D)
B. (C), (A), (B), (D)
C. (A), (B), (C), (D)
D. (C), (B), (A), (D)
Show answer & explanation

Correct answer: C

Client sends HTTP request (A), server calls application (B), program executes producing HTML (C), then HTTP response sent (D).

Q75.
Match List-I with List-II. List-I: (A) Static web page, (B) Home page, (C) Dynamic web page, (D) Web server. List-II: (I) A web page whose content keeps changing, (II) A web page whose content is fixed, (III) Delivers the contents to web browser, (IV) First page of website. Choose the correct answer from the options given below:
A. (A) - (II), (B) - (IV), (C) - (I), (D) - (III)
B. (A) - (I), (B) - (III), (C) - (II), (D) - (IV)
C. (A) - (IV), (B) - (II), (C) - (I), (D) - (III)
D. (A) - (III), (B) - (IV), (C) - (I), (D) - (II)
Show answer & explanation

Correct answer: A

Static=fixed content (II); Home page=first page (IV); Dynamic=content keeps changing (I); Web server=delivers content (III).

Q76.
Which of the following is a networking device? (A) Gateway (B) Repeater (C) MAN (D) Modem. Choose the correct answer from the options given below:
A. (A) and (D) only
B. (A), (B) and (D) only
C. (A), (B), (C) and (D)
D. (B), (C) and (D) only
Show answer & explanation

Correct answer: B

Gateway, Repeater and Modem are networking devices; MAN is a type of network, not a device. So (A),(B),(D).

Q77.
________ is the largest WAN that connects billions of computers, smartphones and millions of LANs from different countries.
A. PAN
B. WWW
C. Ethernet
D. Internet
Show answer & explanation

Correct answer: D

The Internet is the largest WAN connecting billions of devices and millions of LANs worldwide.

Q78.
The intellectual property right that is granted for inventions is ______.
A. Copyright
B. Patent
C. Trademark
D. Licensing
Show answer & explanation

Correct answer: B

A patent is the IPR granted for inventions.

Q79.
Violation of intellectual property right may happen due to : (A) Copyright Infringement (B) Patent (C) Trademark Infringement (D) Plagiarism. Choose the correct answer from the options given below:
A. (A) and (C) only
B. (A), (B) and (C) only
C. (A), (B), (C) and (D)
D. (A), (C) and (D) only
Show answer & explanation

Correct answer: D

IPR violations include Copyright Infringement, Trademark Infringement and Plagiarism. Patent itself is a right, not a violation. So (A),(C),(D).

Q80.
Match List-I with List-II. List-I: (A) Cyber Appellate Tribunal, (B) Environmental Protection Act 1986, (C) Indian Information Technology Act 2000, (D) Central Pollution Control Board. List-II: (I) Punishes people causing pollution, (II) Provides guidelines for proper handling and disposal of e-waste, (III) Resolves disputes arising from cyber crime, (IV) Provides guidelines on storage, processing and transmission of sensitive data. Choose the correct answer from the options given below:
A. (A) - (III), (B) - (I), (C) - (IV), (D) - (II)
B. (A) - (I), (B) - (III), (C) - (II), (D) - (IV)
C. (A) - (I), (B) - (II), (C) - (IV), (D) - (III)
D. (A) - (III), (B) - (IV), (C) - (I), (D) - (II)
Show answer & explanation

Correct answer: A

Cyber Appellate Tribunal=resolves cyber disputes (III); Env Protection Act 1986=punishes polluters (I); IT Act 2000=guidelines on sensitive data (IV); CPCB=e-waste handling guidelines (II).

Q81.
______ is a branch of science that deals with designing and arranging of workplaces.
A. Netiquette
B. Ergonomics
C. Leeching
D. Refurbishing
Show answer & explanation

Correct answer: B

Ergonomics is the science of designing and arranging workplaces to fit the people who use them.

Q82.
Sequence the steps to append data to an existing file and then read the entire file: (A) Open the file in a+ mode. (B) Use the read() method to output the contents. (C) Use the write() or writelines() method to append data. (D) Seek to the beginning of the file. Choose the correct answer from the options given below:
A. (A), (C), (D), (B)
B. (A), (B), (C), (D)
C. (B), (A), (D), (C)
D. (C), (B), (D), (A)
Show answer & explanation

Correct answer: A

Open in a+ (A), append data with write (C), seek to start (D), then read contents (B): (A),(C),(D),(B).

Q83.
Sequence the given process for checking whether a string is a palindrome or not, using a deque: (A) Load the string into the deque. (B) Continuously remove characters from both ends. (C) Compare the characters. (D) Determine if the string is a palindrome based on the comparisons. Choose the correct answer from the options given below:
A. (A), (B), (D), (C)
B. (A), (B), (C), (D)
C. (B), (A), (D), (C)
D. (C), (B), (D), (A)
Show answer & explanation

Correct answer: B

Load string into deque (A), remove characters from both ends (B), compare them (C), then decide palindrome (D): (A),(B),(C),(D).

Q84.
Cable based broadband internet services are example of ______.
A. LAN
B. MAN
C. WAN
D. PAN
Show answer & explanation

Correct answer: B

Cable broadband covers a city-wide area, an example of a MAN (Metropolitan Area Network).

Q85.
____________ 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.
A. Digital footprint
B. Cyber crimes
C. Cyber bullying
D. Identity theft
Show answer & explanation

Correct answer: A

The trail of data left behind from online activity is called a digital footprint.

Original question paper source: National Testing Agency (NTA), CUET (UG) 2025. Reproduced for educational use. Answers & explanations by UniDrill.