CUET 2026 May 23 Shift 1 Computer Science Question Paper is available for download here. NTA conducted the CUET UG 2026 exam from 11th May to 31st May.

  • CUET 2026 Computer Science exam consists of 50 questions for 250 marks to be attempted in 60 minutes.
  • As per the marking scheme, 5 marks are awarded for each correct answer, and 1 mark is deducted for incorrect answer.

Candidates can download CUET 2026 May 23 Shift 1 Computer Science Question Paper with Answer Key and Solution PDF from links provided below.

Also Check: CUET 2026 May 23 Shift 1 Computer Science Answer Key

CUET 2026 Computer Science May 23 Shift 1 Question Paper with Solution PDF

CUET May 23 Shift 1 Computer Science Question Paper 2026 Download PDF Check Solutions

Question 1:

In a relation, if more than one attribute can have distinct values, such attributes are called ______.

  • (A) Primary Key
  • (B) Candidate Key
  • (C) Foreign Key
  • (D) Composite Key
Correct Answer: (B) Candidate Key
View Solution




Step 1: Understanding the Question:

The question asks for the terminology used in a relational database management system to describe attributes that can uniquely identify a tuple (row) because they contain distinct, non-duplicate values across all records.


Step 2: Key Concepts:

- Relation: A structure resembling a table with rows (tuples) and columns (attributes).

- Candidate Key: An attribute, or a minimal set of attributes, that uniquely identifies any tuple in a relation. If a table has multiple columns with distinct values, each is considered a candidate key.

- Primary Key: Out of all the candidate keys, the database designer selects one primary key to uniquely identify the records. There can only be one primary key per table.

- Alternate Key: Candidate keys that are not selected as the primary key are known as alternate keys.

- Foreign Key: An attribute in one table that references the primary key of another table, used to link the two tables.

- Composite Key: A key that consists of multiple attributes to uniquely identify a tuple.


Step 3: Detailed Explanation:

- When designing a relational schema, we identify columns that have unique values for all rows (e.g., AadhaarNumber, RollNumber, or EmailId in a student table).

- Each of these columns has the potential to uniquely identify a row because the values are distinct.

- Any column (or set of columns) that can uniquely identify a row is defined as a Candidate Key.

- If more than one attribute possesses distinct values, all of them are candidate keys because they are all candidates to be chosen as the primary key of the relation.


Step 4: Final Answer:

Attributes in a relation that have distinct values and are capable of identifying tuples uniquely are called Candidate Keys.

Hence, option (B) is the correct choice.
Quick Tip: Remember: All Primary Keys are Candidate Keys, but not all Candidate Keys are selected as the Primary Key.
A relation can have multiple Candidate Keys but exactly one Primary Key.


Question 2:

Which of the following statement will correctly filter products having an average price of 50?

  • (A) SELECT Category FROM Products GROUP BY Category HAVING AVG(Price) \(>\) 50;
  • (B) SELECT Category FROM Products GROUP BY WHERE AVG(Price) \(>\) 50;
  • (C) SELECT Category FROM Products HAVING AVG(Price) \(>\) 50;
  • (D) SELECT Category FROM Products GROUP BY AVG(Price) \(>\) 50;
Correct Answer: (A) SELECT Category FROM Products GROUP BY Category HAVING AVG(Price) \(>\) 50;
View Solution




Step 1: Understanding the Question:

The question asks to find the correct SQL query syntax to filter categorized product data based on an aggregated condition, where the average price of the products within each category is greater than 50.


Step 2: Key Rules of SQL Filtering:

- GROUP BY Clause: Used to group rows that have the same values in specified columns into summary rows (e.g., grouping products by category).

- HAVING Clause: Used to filter grouped records or aggregate results. It must be written after the GROUP BY clause.

- WHERE Clause: Used to filter individual raw rows before any grouping is performed. It cannot contain aggregate functions like AVG(), SUM(), or COUNT().


Step 3: Detailed Explanation:

- In the given problem, we need to find the average price of products. This requires aggregating the data using the AVG(Price) function.

- Since we want to perform this filter over a group, we must use the GROUP BY clause on the grouping column (such as Category) and filter the groups using the HAVING clause.

- Let us analyze each option:

- Option (A) SELECT Category FROM Products GROUP BY Category HAVING AVG(Price) > 50; contains the correct syntax by grouping the rows on Category first, and then using the HAVING clause to apply the filter condition on the aggregate function.

- Option (B) contains a syntax error because WHERE cannot directly follow the GROUP BY clause, and WHERE cannot evaluate the aggregate function AVG().

- Option (C) misses the GROUP BY clause entirely, which is semantically incorrect when selecting a grouped attribute and filtering by an aggregate.

- Option (D) incorrectly writes the aggregate condition directly in the GROUP BY clause itself.


Step 4: Final Answer:

The correct query to filter grouped product records on an aggregate condition is represented in Option (A).

Hence, option (A) is the correct choice.
Quick Tip: Always remember: WHERE} filters rows before grouping; HAVING} filters groups after grouping.
You can never use an aggregate function like AVG()} or SUM()} in a WHERE} clause!


Question 3:

Each MAC address is a __________.

  • (A) 8-digit hexadecimal number
  • (B) 36-digit hexadecimal number
  • (C) 24-digit hexadecimal number
  • (D) 12-digit hexadecimal number
Correct Answer: (D) 12-digit hexadecimal number
View Solution




Step 1: Understanding the Question:

The question asks for the standard format and digit representation of a physical Media Access Control (MAC) address in computer networking.


Step 2: Key Concepts of MAC Address:

- MAC Address: A unique physical address assigned to a Network Interface Card (NIC) by the manufacturer for local hardware-level networking.

- Bit Length: A standard MAC address is 48 bits long (equal to 6 bytes).

- Hexadecimal Representation: Each byte (8 bits) is represented by 2 hexadecimal digits.


Step 3: Detailed Explanation:

- Let us calculate the number of hexadecimal digits in a MAC address using basic conversions:

\[ Total bits = 48 bits \]

\[ Total bytes = \frac{48}{8} = 6 bytes \]

- A single hexadecimal digit represents 4 bits (since \(2^4 = 16\)).

- Therefore, each byte of 8 bits requires:

\[ Digits per byte = \frac{8 bits}{4 bits/digit} = 2 hexadecimal digits \]

- For a total of 6 bytes, the number of hexadecimal digits is:

\[ Total digits = 6 bytes \times 2 digits/byte = 12 digits \]

- A typical MAC address is written in the format: XX:XX:XX:XX:XX:XX or XX-XX-XX-XX-XX-XX, where each X represents a hexadecimal digit. There are 12 such digits in total.


Step 4: Final Answer:

A MAC address is a 48-bit address, which is represented as a 12-digit hexadecimal number.

Hence, option (D) is the correct choice.
Quick Tip: Keep these address lengths in mind for exams:
- MAC Address: 48 bits (12 hexadecimal digits)
- IPv4 Address: 32 bits (4 decimal octets)
- IPv6 Address: 128 bits (32 hexadecimal digits)


Question 4:

Arrange the following SQL clause in the correct order of writing a query:

A. DISTINCT

B. ORDER BY

C. WHERE

D. SELECT

Choose the correct answer from the options given below:

  • (A) D, A, C, B
  • (B) A, B, C, D
  • (C) B, A, D, C
  • (D) D, B, A, C
Correct Answer: (A) D, A, C, B
View Solution




Step 1: Understanding the Question:

The question requires arranging the given SQL query clauses (A: DISTINCT, B: ORDER BY, C: WHERE, D: SELECT) in their correct syntactic sequence as they are structured when writing a query.


Step 2: Syntactic Order of SQL Clauses:
The standard syntax order for any SELECT query in SQL follows this rule: \[ SELECT} \rightarrow DISTINCT} \rightarrow FROM} \rightarrow WHERE} \rightarrow GROUP BY} \rightarrow HAVING} \rightarrow ORDER BY} \]


Step 3: Detailed Explanation:

Let us map the given fragments into the standard structure of a query:

- The query always begins with the SELECT command (D) to declare the projection columns.

- If we want to eliminate duplicate rows, the DISTINCT keyword (A) immediately follows the SELECT keyword.

- After identifying the tables in the FROM clause (not listed in this question), we use the WHERE clause (C) to specify row filtering conditions.

- Finally, the ORDER BY clause (B) is placed at the end of the query to specify the sorting criteria for the returned rows.

- Therefore, the correct chronological sequence is:

1. D (SELECT)

2. A (DISTINCT)

3. C (WHERE)

4. B (ORDER BY)

- This order is represented by the sequence: D, A, C, B.


Step 4: Final Answer:

The correct syntactic sequence of writing the SQL clauses is D, A, C, B.

Hence, option (A) is the correct choice.
Quick Tip: Remember the chronological syntax rule: SELECT} \(\rightarrow\) DISTINCT} \(\rightarrow\) FROM} \(\rightarrow\) WHERE} \(\rightarrow\) GROUP BY} \(\rightarrow\) HAVING} \(\rightarrow\) ORDER BY}.
The DISTINCT} modifier always attaches directly to the front of the projected column list inside SELECT}!


Question 5:

Which SQL Query below is correct for deleting all records from 'Products' table having product names starting with 'M'?

  • (A) DELETE FROM Products WHERE ProductName LIKE 'M%';
  • (B) REMOVE FROM Products WHERE ProductName LIKE 'M%';
  • (C) DROP FROM Products WHERE ProductName IS 'M%';
  • (D) REMOVE FROM Products WHERE ProductName IS 'M%';
Correct Answer: (A) DELETE FROM Products WHERE ProductName LIKE 'M%';
View Solution




Step 1: Understanding the Question:

The question asks for the correct SQL syntax to delete a subset of records from a table named Products based on a pattern-matching condition where the product names begin with the letter 'M'.


Step 2: Key SQL Commands and Operators:

- DELETE FROM: The DML (Data Manipulation Language) command used to remove specific rows from an existing table. Syntax: DELETE FROM table_name WHERE condition;.

- DROP: A DDL (Data Definition Language) command used to remove entire table structures or databases. It does not delete rows conditionally and cannot be used with a WHERE clause.

- LIKE: The comparison operator used in SQL pattern-matching.

- % Wildcard: Represents zero or more characters in standard SQL. The pattern 'M%' matches any string that starts with 'M'.

- REMOVE: This is not a valid SQL command for deleting table records.


Step 3: Detailed Explanation:

- To delete rows from a table, SQL utilizes the DELETE FROM command. Options (B) and (D) are immediately incorrect because they use the invalid keyword REMOVE.

- Option (C) is incorrect because DROP is used to delete the entire table structure, and the IS operator is used for NULL comparisons (IS NULL), not for wildcard text pattern matching.

- Option (A) is the correct formulation:

- DELETE FROM Products specifies that records should be removed from the Products table.

- WHERE ProductName LIKE 'M%' filters the deletion to target only rows where the value in ProductName starts with 'M'.


Step 4: Final Answer:

The correct SQL query to perform this deletion is: DELETE FROM Products WHERE ProductName LIKE 'M%';.

Hence, option (A) is the correct choice.
Quick Tip: Remember:
- Use DELETE} to remove records (rows) from a table.
- Use DROP} to remove the entire table structure from the database.
- Use LIKE} for wildcard matches, never use the IS} operator with wildcards!


Question 6:

In a table regarding the entries of students, which among these can be the most appropriate for PRIMARY KEY?

  • (A) RollNumber
  • (B) Name
  • (C) DateofBirth
  • (D) Age
Correct Answer: (A) RollNumber
View Solution




Step 1: Understanding the Question:

The question asks to identify the most suitable candidate attribute to serve as the Primary Key for a database table storing student records.


Step 2: Properties of a Primary Key:

An attribute chosen as a primary key must satisfy three critical requirements:

- Uniqueness: No two rows in the table can have duplicate values in this column.

- Non-nullability: The value cannot be empty (NULL) for any record.

- Invariance: The value should remain stable and not change frequently over time.


Step 3: Detailed Explanation:

Let us analyze the four options based on these key requirements:

- RollNumber: Each student in a class or school is assigned a unique, non-null Roll Number. No two students can share the same Roll Number, and a student's roll number remains static throughout the academic term. It fulfills all requirements perfectly.

- Name: It is common for multiple students to have the exact same name (e.g., "Amit Sharma"). Thus, it fails the uniqueness test.

- DateofBirth: Many students can be born on the same calendar day, so it is not unique.

- Age: Countless students will share the same age. Additionally, age is a derived attribute that changes every year, which violates key stability.


Step 4: Final Answer:

Since RollNumber is unique and invariant for each student, it is the most appropriate attribute for a Primary Key.

Hence, option (A) is the correct choice.
Quick Tip: A Primary Key must be unique and NOT NULL.
In exams, look for formal, system-assigned identifiers (e.g., RollNumber, EmployeeID, AadhaarNumber) over natural characteristics (e.g., Name, Age, Date of Birth).


Question 7:

What is the number of connections in the mesh topology having 5 devices?

  • (A) 10
  • (B) 12
  • (C) 20
  • (D) 5
Correct Answer: (A) 10
View Solution




Step 1: Understanding the Question:

The question asks for the total number of physical duplex communication lines (connections) required to build a fully connected mesh network topology containing 5 devices.


Step 2: Formula for Mesh Topology Connections:

In a fully connected mesh topology, every single device has a dedicated point-to-point connection to every other device on the network.

For a network consisting of \(n\) devices:

- Each device must connect to the other \(n-1\) devices, requiring \(n-1\) physical ports per device.

- The total number of physical simplex links is \(n(n-1)\).

- For bidirectional duplex channels, the number of physical connections is given by the formula:

\[ Number of Connections = \frac{n(n-1)}{2} \]


Step 3: Detailed Calculation:

- We are given the number of devices, \(n = 5\).

- Substituting this value into the equation:

\[ Number of Connections = \frac{5 \times (5 - 1)}{2} \]

\[ Number of Connections = \frac{5 \times 4}{2} \]

\[ Number of Connections = \frac{20}{2} = 10 \]

- Let us physically trace these connections:

- Connection 1-2, 1-3, 1-4, 1-5 (4 connections)

- Connection 2-3, 2-4, 2-5 (3 connections)

- Connection 3-4, 3-5 (2 connections)

- Connection 4-5 (1 connection)

- Total connections = \(4 + 3 + 2 + 1 = 10\).


Step 4: Final Answer:

The total number of bidirectional physical connections in a mesh network of 5 devices is 10.

Hence, option (A) is the correct choice.
Quick Tip: The formula for the number of connections in a fully connected mesh topology is identical to the mathematical combination formula \(^{n}C_{2}\):
\[ Links = \frac{n(n-1)}{2} \]
This is a high-yield formula for networking exams!


Question 8:

What is hub used for in a network?

  • (A) Filtering Data
  • (B) Unicasting Data
  • (C) Multicasting Data
  • (D) Broadcasting Data
Correct Answer: (D) Broadcasting Data
View Solution




Step 1: Understanding the Question:

The question asks to identify the fundamental data delivery behavior of a network Hub when transmitting incoming data packets to other connected devices.


Step 2: Characteristics of a Hub:

- A hub is a simple, passive networking hardware device that operates at the Physical Layer (Layer 1) of the OSI model.

- It does not possess any internal processing intelligence, meaning it cannot inspect the contents of data packets or store hardware/MAC addresses.


Step 3: Detailed Explanation:

- When a data packet arrives at one port of a hub, the hub does not read the destination MAC address to decide where to send it.

- Instead, it simply duplicates the incoming electrical signals and retransmits them through all other active ports (except the port from which the packet was received).

- This process of sending a message to all connected devices in the network segment simultaneously is called Broadcasting.

- It does not do Unicasting (directing to a single host) or Filtering because it lacks a MAC address lookup table. It cannot do selective forwarding.


Step 4: Final Answer:

A network hub operates as a broadcasting device, forwarding all received data to every connected port.

Hence, option (D) is the correct choice.
Quick Tip: Remember:
- Hub = Broadcasts everything (Insecure and low efficiency)
- Switch = Unicasts to destination (Learns MAC addresses, high efficiency)


Question 9:

Which of the following SQL query will filter products having cost more than 500?

  • (A) SELECT ProductName FROM PRODUCTS WHERE Cost\(>\)500;
  • (B) SELECT ProductName FROM PRODUCTS GROUP BY Cost\(>\)500;
  • (C) SELECT ProductName FROM PRODUCTS HAVING Cost\(>\)500;
  • (D) SELECT DISTINCT ProductName FROM PRODUCTS HAVING Cost\(>\)500;
Correct Answer: (A) SELECT ProductName FROM PRODUCTS WHERE Cost\(>\)500;
View Solution




Step 1: Understanding the Question:

The question asks to identify the correct SQL query syntax to retrieve the names of individual products whose cost is strictly greater than 500.


Step 2: Syntactic Rules for Row Filtering:

- To filter individual database records based on a specific attribute value (like Cost > 500), we must use the WHERE clause.

- The HAVING clause is reserved for filtering aggregate groupings (often combined with a GROUP BY clause). It should not be used for individual row evaluation.


Step 3: Detailed Explanation:

- In the given requirement, "cost more than 500" is a simple condition on a single row's column value. There is no aggregation (such as average, sum, or count of the cost) requested.

- Therefore, the WHERE clause must be used.

- Let us evaluate the options:

- Option (A) SELECT ProductName FROM PRODUCTS WHERE Cost>500; is syntactically perfect. It queries the ProductName column from the PRODUCTS table and uses WHERE Cost>500 to filter out any products cheaper than or equal to 500.

- Option (B) is incorrect because it tries to group by a boolean condition.

- Options (C) and (D) are incorrect because they use the HAVING clause to perform a single-row filter on a non-aggregated attribute without a GROUP BY clause.


Step 4: Final Answer:

The standard SQL query to perform this operation is represented in Option (A).

Hence, option (A) is the correct choice.
Quick Tip: Always use WHERE} for conditions on individual records.
Always use HAVING} for conditions on aggregated groups!
WHERE} comes before GROUP BY}, while HAVING} comes after GROUP BY}!


Question 10:

Which of the following are to be considered while applying JOIN operations on two or more relations?

A. If two tables are to be joined on equality condition on the common attribute, then one may use JOIN with ON clause or NATURAL JOIN in FROM clause.

B. If three tables are to be joined on equality condition, then two JOIN or NATURAL JOIN are required.

C. N-1 joins are needed to combine N tables on equality condition.

D. With JOIN clause, we may use any relational operators to combine tuples of two tables.

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
Correct Answer: (C) A, B, C and D
View Solution




Step 1: Understanding the Question:

The question presents four relational database principles (A, B, C, D) regarding how to apply and structure SQL JOIN operations when linking multiple tables. We need to determine which of these statements are correct.


Step 2: Key Relational Database JOIN Principles:

- JOIN on Equality: Also known as an Equi-Join. It can be written explicitly using the INNER JOIN ... ON syntax or implicitly using a NATURAL JOIN if the attributes have matching names in both tables.

- Number of Join Conditions: To combine \(N\) tables, a minimum of \(N-1\) join conditions is necessary to avoid a Cartesian product.

- Relational Operators in JOIN: Joins are not restricted to equality. We can use other operators like \(<\), \(>\), \(<=\), or \(>=\), which are called Non-Equi Joins or Theta Joins.


Step 3: Detailed Evaluation of Statements:

- Statement A is correct: If two tables share a common attribute, we can join them using JOIN ... ON table1.attr = table2.attr or simply use a NATURAL JOIN in the FROM clause.

- Statement B is correct: To join three tables, we must define two distinct join relationships to connect all three datasets sequentially. Thus, two JOIN operators are required.

- Statement C is correct: To combine \(N\) different tables without generating a cross product (Cartesian product), we need at least \(N-1\) join relations/conditions.

- Statement D is correct: Using the JOIN clause with an ON condition allows us to employ any logical comparison operator (such as checking if a date in table 1 is greater than a date in table 2), which is fully supported by standard SQL.

- Since all four statements are technically sound and accurate, Option (C) is the correct choice.


Step 4: Final Answer:

All listed statements (A, B, C, and D) are correct relational database join principles.

Hence, option (C) is the correct choice.
Quick Tip: To link \(N\) tables together, you always require at least \(N-1\) distinct join conditions.
Fewer than \(N-1\) conditions will result in an undesirable Cartesian product!


Question 11:

The HAVING clause is used to filter groups based on which function results?

  • (A) Mathematical
  • (B) Aggregate
  • (C) Window
  • (D) Recursive
Correct Answer: (B) Aggregate
View Solution




Step 1: Understanding the Question:

The question asks to identify the type of SQL functions whose computed output values are used by the HAVING clause to perform group filtering.


Step 2: Understanding Groups and Filtering in SQL:

- When we run a GROUP BY query, individual rows are compressed into logical categories.

- We cannot filter these categories using raw column values because each category contains multiple rows.

- Instead, we must summarize these rows using Aggregate Functions (e.g., SUM(), AVG(), COUNT(), MIN(), MAX()) which compute a single value for each group.


Step 3: Detailed Explanation:

- The HAVING clause acts specifically as a filter for groups formed by the GROUP BY clause.

- It evaluates conditions based on aggregate calculations (e.g., HAVING COUNT(CustomerID) > 5 or HAVING AVG(Salary) < 40000).

- Mathematical functions (like ABS() or ROUND()) operate on individual numbers, not group sets.

- Window functions compute values across rows but do not compress groups, and recursive functions are used for hierarchical queries.

- Therefore, the HAVING clause is explicitly designed to filter groups based on Aggregate function results.


Step 4: Final Answer:

The HAVING clause evaluates aggregate function results to perform group-level filtering.

Hence, option (B) is the correct choice.
Quick Tip: Remember:
- WHERE} filters raw data rows (no aggregate functions allowed).
- HAVING} filters summarized group data (aggregate functions allowed).


Question 12:

Match the LIST-I with LIST-II



Choose the correct answer from the options given below:

  • (A) A-I, B-II, C-III, D-IV
  • (B) A-II, B-III, C-I, D-IV
  • (C) A-II, B-IV, C-I, D-III
  • (D) A-II, B-III, C-I, D-IV
Correct Answer: (B) A-II, B-III, C-I, D-IV
View Solution




Step 1: Understanding the Question:

The question asks to match four common network topologies (List-I) with their primary structural or operational characteristics (List-II).


Step 2: Analysis of the Network Topologies:

Let us analyze each network topology's unique characteristic:

- Star Topology: In a star network, all computers are connected to a central device (like a hub or a switch). If this central device fails, the whole network stops working. This corresponds to characteristic II.

- Ring Topology: In a ring network, devices are linked in a circular loop. Data travels from device to device in a single direction (unidirectional loop). This corresponds to characteristic III.

- Bus Topology: In a bus network, devices share a single main cable (the bus). When a node sends a signal, it travels in both directions along the cable to reach all devices. This corresponds to characteristic I.

- Mesh Topology: In a mesh network, there are redundant connections between nodes. If any single node fails, it does not break the connection between other nodes because alternative routes exist. This corresponds to characteristic IV.


Step 3: Compiling the Match:

Matching the elements together:

- A \(\rightarrow\) II

- B \(\rightarrow\) III

- C \(\rightarrow\) I

- D \(\rightarrow\) IV

- Comparing this with the provided options, this matching corresponds directly to option (B). (Option (D) in the original exam paper lists the same sequence and is also correct).


Step 4: Final Answer:

The correct matching sequence is A-II, B-III, C-I, D-IV.

Hence, option (B) is the correct choice.
Quick Tip: A quick cheat sheet for topologies:
- Star = Central Hub/Switch dependence.
- Ring = Unidirectional loop.
- Bus = Shared single line cable.
- Mesh = High redundancy and fault tolerance.


Question 13:

Match the LIST-I with LIST-II



Choose the correct answer from the options given below:

  • (A) A-I, B-II, C-III, D-IV
  • (B) A-III, B-I, C-IV, D-II
  • (C) A-I, B-III, C-IV, D-II
  • (D) A-III, B-IV, C-I, D-II
Correct Answer: (B) A-III, B-I, C-IV, D-II
View Solution




Step 1: Understanding the Question:

The question asks to match four standard computer networking devices (List-I) with their primary operational descriptions (List-II).


Step 2: Analysis of the Network Devices:

Let us examine each device and find its match:

- A. Modem: Short for Modulator-Demodulator. Its primary purpose is to convert digital data from a computer into analog signals to travel over analog lines (modulation) and vice versa (demodulation). This matches description III.

- B. Ethernet: Refers to the standard wired networking technology, which relies on an Ethernet network adapter (NIC) installed in devices to establish physical wired connections. This matches description I.

- C. Router: An intelligent device operating at the Network Layer (Layer 3) that receives, analyzes, and routes data packets across different computer networks. This matches description IV.

- D. Switch: A multi-port hardware device operating at the Data Link Layer (Layer 2) that connects multiple computers and communication devices together within a single LAN. This matches description II.


Step 3: Compiling the Match:

Putting the matches together:

- A \(\rightarrow\) III

- B \(\rightarrow\) I

- C \(\rightarrow\) IV

- D \(\rightarrow\) II

- This sequence corresponds exactly to Option (B).


Step 4: Final Answer:

The correct matching sequence is A-III, B-I, C-IV, D-II.

Hence, option (B) is the correct choice.
Quick Tip: Remember:
- Modem = Converts Analog \(\leftrightarrow\) Digital.
- Ethernet = Wired network adapter.
- Router = Forwards packets between different networks.
- Switch = Connects multiple devices in the same LAN.


Question 14:

What will be the degree of the table 'Book' with 200 rows having attributes as BookID, author, price and year?

  • (A) 200
  • (B) 1
  • (C) 4
  • (D) 3
Correct Answer: (C) 4
View Solution




Step 1: Understanding the Question:

The question asks to find the degree of a relational table named 'Book', which contains 200 rows and contains the following attributes: BookID, author, price, and year.


Step 2: Defining Key Relational Terminology:

- Degree: The total number of columns (attributes) in a table.

- Cardinality: The total number of rows (tuples) in a table.


Step 3: Detailed Explanation:

Let us count the attributes and rows in our table:

- The attributes specified in the question are:

1. BookID

2. author

3. price

4. year

- Counting them, we find there are exactly 4 attributes.

- Therefore, the Degree of the 'Book' table is 4.

- The number of rows in the table is 200.

- Therefore, the Cardinality of the 'Book' table is 200.

- Since the question specifically asks for the degree of the table, the answer is 4.


Step 4: Final Answer:

The degree of the table is equal to the number of its attributes, which is 4.

Hence, option (C) is the correct choice.
Quick Tip: Remember:
- Degree = Number of columns/attributes.
- Cardinality = Number of rows/tuples.
Count the column header labels to find the degree!


Question 15:

Which of the following are Data Definition Language statements?

A. CREATE

B. INSERT

C. ALTER

D. DROP

Choose the correct answer from the options given below:

  • (A) A, B and D only
  • (B) A, C and D only
  • (C) A, B, C and D
  • (D) B, C and D only
Correct Answer: (B) A, C and D only
View Solution




Step 1: Understanding the Question:

The question asks to classify four SQL commands (CREATE, INSERT, ALTER, DROP) and identify which of them belong to the Data Definition Language (DDL) subset of SQL commands.


Step 2: Classifying SQL Sub-Languages:

- Data Definition Language (DDL): Commands used to define, alter, or drop the structure of database schemas, tables, and views. Examples include CREATE, ALTER, DROP, and TRUNCATE.

- Data Manipulation Language (DML): Commands used to manage and manipulate the actual data contained within existing tables. Examples include SELECT, INSERT, UPDATE, and DELETE.


Step 3: Detailed Explanation:

Let us analyze the four commands:

- A. CREATE: Used to create a new table or schema structure. This is a DDL command.

- B. INSERT: Used to add new rows of data into a table. This does not change the table structure, only the records inside. This is a DML command.

- C. ALTER: Used to modify an existing table's schema structure (like adding or renaming columns). This is a DDL command.

- D. DROP: Used to delete an entire table structure from the database. This is a DDL command.

- Combining our DDL commands gives us A, C, and D.


Step 4: Final Answer:

The DDL statements are CREATE, ALTER, and DROP (A, C, and D).

Hence, option (B) is the correct choice.
Quick Tip: Ask yourself: Does this command change the structural blueprint of the database?
- Yes \(\rightarrow\) DDL (CREATE}, ALTER}, DROP}).
- No, it only works with the records/data values \(\rightarrow\) DML (INSERT}, UPDATE}, DELETE}).


Question 16:

Match the LIST-I with LIST-II



Choose the correct answer from the options given below:

  • (A) A-I, B-II, C-III, D-IV
  • (B) A-II, B-I, C-III, D-IV
  • (C) A-II, B-I, C-IV, D-III
  • (D) A-IV, B-II, C-I, D-III
Correct Answer: (A) A-I, B-II, C-III, D-IV
View Solution




Step 1: Understanding the Question:

The question asks to match various relational algebra and database query operations (List-I) with their primary operational descriptions (List-II).


Step 2: Core Concepts of Relational Operations:

Let us analyze each relational operation:

- A. SELECT: The SELECT statement is the primary command used in SQL to read and retrieve matching data from a database. This matches with description I.

- B. INTERSECT: This set operation takes two relations as input and returns a set containing only the records that are present in both tables (common tuples). This matches with description II.

- C. JOIN: This operation is used to combine columns from two tables based on a common key and specific join conditions. This matches with description III.

- D. UNION: This set operation combines all unique rows retrieved by two compatible queries into a single output list. This matches with description IV.


Step 3: Compiling the Match:
Putting the matches together:
- A \(\rightarrow\) I
- B \(\rightarrow\) II
- C \(\rightarrow\) III
- D \(\rightarrow\) IV
- This sequence corresponds directly to option (A).

Step 4: Final Answer:

The correct matching sequence is A-I, B-II, C-III, D-IV.

Hence, option (A) is the correct choice.
Quick Tip: Remember:
- Union = All unique rows from both queries.
- Intersect = Only rows common to both.
- Join = Merges tables side-by-side based on column conditions.


Question 17:

In a stack of Size 'N', if there are 'M' elements inserted into the stack and then 'M/2' are popped out. What is the remaining number of elements left in the stack? Assume 'M' \(<\) 'N'.

  • (A) N-M/2
  • (B) M/2
  • (C) N/2
  • (D) 1
Correct Answer: (B) M/2
View Solution




Step 1: Understanding the Question:

The question asks to calculate the remaining number of elements in a stack of capacity \(N\), after inserting \(M\) elements and then popping out \(M/2\) of those elements. We are given the condition \(M < N\).


Step 2: Stacks and their Operations:

- A stack is a linear data structure that operates under the Last-In, First-Out (LIFO) model.

- Push: Adds an element to the stack, increasing its size by 1.

- Pop: Removes the top element from the stack, decreasing its size by 1.


Step 3: Detailed Explanation:

Let us keep track of the count of elements in the stack:

- Initially, the stack is empty, meaning the element count is 0.

- We insert (push) \(M\) elements into the stack. Since the stack size is \(N\) and we are given \(M < N\), no overflow occurs.

\[ Count after insertion = M \]

- Next, we remove (pop) \(M/2\) elements from the stack. Each pop decreases the active count by 1.

\[ Elements remaining = Initial insertions - Popped elements \]

\[ Elements remaining = M - \frac{M}{2} = \frac{M}{2} \]

- Note that the maximum stack capacity \(N\) is only a boundary constraint. It does not affect the calculation of active elements as long as \(M < N\) is satisfied.


Step 4: Final Answer:

The remaining number of elements inside the stack is \(M/2\).

Hence, option (B) is the correct choice.
Quick Tip: The total capacity (\(N\)) of a stack only determines when the stack becomes full (overflow check).
The actual active count is determined purely by tracking the number of pushes and pops:
\[ Final Count = Pushed - Popped \]


Question 18:

How do you move the file pointer to the 10th byte from the beginning of a file in Python?

  • (A) file.seek(10, 0)
  • (B) file.seek(0, 10)
  • (C) file.move(10, 0)
  • (D) file.seek(10)
Correct Answer: (A) file.seek(10, 0)
View Solution




Step 1: Understanding the Question:

The question asks for the correct Python code syntax to position a file's read/write pointer to exactly the 10th byte relative to the start of the file.


Step 2: Python's seek() Syntax:

Python's file objects utilize the seek() method to move the file pointer.

- Syntax: file_object.seek(offset, whence)

- offset: The number of bytes to move the pointer.

- whence: The starting reference point. It can take three values:

- 0 (default): Relative to the beginning of the file.

- 1: Relative to the current pointer position.

- 2: Relative to the end of the file.


Step 3: Detailed Explanation:

- To position the file pointer at the 10th byte from the beginning of the file, we require an offset of 10 and a reference point (whence) of 0 (representing the file start).

- This translates to the code: file.seek(10, 0). This is represented by Option (A).

- Option (B) file.seek(0, 10) is syntactically invalid because 10 is not a valid parameter value for whence.

- Option (C) uses a non-existent method move().

- Option (D) file.seek(10) is also technically correct in standard Python because whence defaults to 0 when omitted. However, standard academic curricula (like CBSE and CUET) explicitly teach file.seek(offset, 0) to introduce reference-based seek positions. Thus, option (A) is the most complete, explicit, and formally correct choice in the context of this exam.


Step 4: Final Answer:

The correct method to position the pointer to the 10th byte from the beginning is file.seek(10, 0).

Hence, option (A) is the correct choice.
Quick Tip: Remember the three values of the whence} parameter:
- 0} = Start of file.
- 1} = Current position.
- 2} = End of file.


Question 19:

What will be the sequence of the given SQL clauses to display the Customer Id (CustID) and number of cars purchased if the customer purchased more than 1 car from SALE table?

A. GROUP BY CustID

B. COUNT(*)

C. HAVING COUNT (*) \(>\) 1

D. FROM SALE

E. SELECT CustID

Choose the correct answer from the options given below:

  • (A) E, A, B, C, D
  • (B) E, A, B, D, C
  • (C) E, B, A, D, C
  • (D) E, B, D, A, C
Correct Answer: (D) E, B, D, A, C
View Solution




Step 1: Understanding the Question:

The question asks to arrange five SQL clause fragments (A, B, C, D, E) in the correct syntactic sequence to construct a valid SQL query.


Step 2: Constructing the Target Query:

Let us formulate the target query based on the requirement:

- We want to select the Customer Id (CustID) and the count of cars purchased (COUNT(*)). This is represented by:

SELECT CustID (Fragment E) followed by , COUNT(*) (Fragment B).

- Next, we specify the source table:

FROM SALE (Fragment D).

- Next, we group the data by customer identifier:

GROUP BY CustID (Fragment A).

- Finally, we filter the groups to only include customers who bought more than 1 car:

HAVING COUNT(*) > 1 (Fragment C).


Step 3: Finding the Order of Fragments:

- Placing the fragments together in sequence:

1. E: SELECT CustID

2. B: COUNT(*)

3. D: FROM SALE

4. A: GROUP BY CustID

5. C: HAVING COUNT(*) > 1

- This creates the sequence: E, B, D, A, C.

- This matches option (D).


Step 4: Final Answer:

The correct syntactic sequence of writing the query is E, B, D, A, C.

Hence, option (D) is the correct choice.
Quick Tip: To avoid order confusion: write the entire complete SQL query out on scratch paper first, then match each block to its corresponding letter choice!


Question 20:

Which of the following statements are correct with respect to handling exceptions in Python?

A. The try block is used to catch exceptions.

B. The except block is executed if an exception occurs.

C. You can have multiple except blocks.

D. The else block executes if no exceptions occur.

Choose the correct answer from the options given below:

  • (A) A, B and D only
  • (B) A, C and D only
  • (C) A, B, C and D
  • (D) B, C and D only
Correct Answer: (C) A, B, C and D
View Solution




Step 1: Understanding the Question:

The question presents four statements (A, B, C, D) about Python's built-in exception-handling blocks and asks to identify which statements are correct.


Step 2: Python Exception Handling Framework:

- try block: Monitors and intercepts any run-time errors (exceptions) raised during its execution.

- except block: Catches and handles specific exceptions thrown by the matching try block.

- else block: Executes only if no exceptions were raised during the execution of the try block.


Step 3: Detailed Evaluation of Statements:

- Statement A is correct: The try block is where we enclose code that may cause errors, acting as the interceptor to catch any exceptions.

- Statement B is correct: If an exception is raised in the try block, execution of the try block stops immediately and transfers to the except block to handle the error.

- Statement C is correct: Python allows us to write multiple except blocks to handle different error types separately (e.g., except ValueError followed by except ZeroDivisionError).

- Statement D is correct: The optional else block is defined to execute only if the code in the try block runs successfully without raising any exceptions.

- Since all four statements are correct, Option (C) is the right choice.


Step 4: Final Answer:

All the statements A, B, C, and D are correct descriptions of Python exception handling.

Hence, option (C) is the correct choice.
Quick Tip: Remember the full exception handling block structure:
- try}: monitored code.
- except}: handles exceptions.
- else}: runs if NO exception occurs.
- finally}: always runs (for cleanup tasks).


Question 21:

Which of the following function can be used to insert a new element at the end of a queue?

(Assume a queue named myQueue has been created by assigning an empty list i.e., myQueue = list())

  • (A) 1
  • (B) 2
  • (C) 3
  • (D) 4
Correct Answer: (B) 2
View Solution




Step 1: Understanding the Question:

The question asks to identify the correct Python function code to implement the enqueue operation (inserting a new element at the end of a queue) when the queue is represented using a Python list.


Step 2: Key Formula or Approach:

- A Queue is a First-In, First-Out (FIFO) linear data structure where elements are added at one end (rear) and removed from the other end (front).

- When using a Python list to represent a queue, the end of the list represents the rear of the queue.

- We need to identify the correct built-in Python list method that appends an element to the end of a list.


Step 3: Detailed Explanation:

- Let us analyze the standard list methods in Python:

- append(element): This is a built-in Python list method that adds a single element to the very end of the list. Thus, calling myQueue.append(element) correctly inserts the element at the rear of the queue.

- add(element): This is a method used for Python sets, not lists. Calling this on a list raises an AttributeError.

- push(element): This is not a built-in method for Python lists. While used conceptually in stacks, it does not exist in standard Python list implementations.

- insert(): The insert() method requires two arguments: an index and the element, in the form insert(index, element). Calling myQueue.insert(element) with only one argument raises a TypeError.

- Therefore, the only syntactically and logically correct block of code is Option (B).


Step 4: Final Answer:

The correct function to insert a new element at the end of the queue list is the one using the append() method.

Hence, option (B) is the correct choice.
Quick Tip: When implementing a queue using a Python list:
- Use list.append(element)} to insert elements at the rear (Enqueue).
- Use list.pop(0)} to remove elements from the front (Dequeue).


Question 22:

The worst case time complexity of finding an element using linear search is ______.

  • (A) O(log n)
  • (B) O(n)
  • (C) O(n\(^2\))
  • (D) O(n log n)
Correct Answer: (B) O(n)
View Solution




Step 1: Understanding the Question:

The question asks for the worst-case asymptotic time complexity of locating a specific target value in a collection of size \(n\) using the Linear Search algorithm.


Step 2: Key Formula or Approach:

- Linear search is a sequential search algorithm that starts at the first element of a list and compares each subsequent element with the target key until a match is found or the end of the list is reached.

- Let \(n\) represent the total number of elements in the array or list.


Step 3: Detailed Explanation:

- Let us analyze the best, average, and worst-case scenarios for Linear Search:

- Best Case: The target element is located at the very first index of the list. Here, only 1 comparison is made, yielding a time complexity of \(O(1)\).

- Worst Case: The target element is either at the very last index of the list, or it does not exist in the collection at all. In both cases, the algorithm must sequentially compare the target key with every single one of the \(n\) elements in the list. This requires \(n\) comparisons.

- Since the number of operations in the worst case scales linearly with the input size \(n\), the time complexity is expressed asymptotically as \(O(n)\).

- Therefore, the worst-case time complexity of linear search is \(O(n)\).


Step 4: Final Answer:

The worst-case time complexity of finding an element using linear search is \(O(n)\).

Hence, option (B) is the correct choice.
Quick Tip: Remember:
- Linear Search: Best Case = \(O(1)\), Worst Case = \(O(n)\).
- Binary Search: Best Case = \(O(1)\), Worst Case = \(O(\log n)\) (requires sorted data).


Question 23:

A stack follows ______ principle.

  • (A) FIFO
  • (B) LIFO
  • (C) Enqueue-Dequeue
  • (D) LILO
Correct Answer: (B) LIFO
View Solution




Step 1: Understanding the Question:

The question asks to identify the fundamental ordering principle followed by a Stack data structure for its insertion and deletion operations.


Step 2: Key Concepts of Stack and Queue:

- Stack: A restricted linear data structure where all insertions and deletions are performed at the same end, called the "top".

- Queue: A linear data structure where insertions occur at one end (rear) and deletions occur at the opposite end (front).


Step 3: Detailed Explanation:

- Let us analyze the different acronym principles:

- LIFO (Last-In, First-Out): This principle means that the element inserted most recently is the first one to be removed. This is the defining behavior of a stack. For example, a stack of plates: the last plate placed on top is the first one to be taken off.

- FIFO (First-In, First-Out): This principle states that the first element inserted is the first one to be removed. This is the operational rule of a Queue (e.g., people standing in a line).

- LILO (Last-In, Last-Out): This is logically identical to the FIFO principle and is not typically used as a standard term for stacks.

- Enqueue-Dequeue: These are names of operations performed on a Queue, not behavioral principles of a stack.

- Hence, a stack strictly follows the LIFO principle.


Step 4: Final Answer:

A stack follows the LIFO (Last-In, First-Out) principle.

Hence, option (B) is the correct choice.
Quick Tip: Think of everyday examples to remember:
- Stack = LIFO (Stack of plates, Undo/Redo operations, Function call stack).
- Queue = FIFO (Line at a ticket counter, Print jobs).


Question 24:

If a list is having 'n' elements, then how many passes 'Selection Sort' will require to sort the list?

  • (A) 1
  • (B) n - 1
  • (C) n
  • (D) 0
Correct Answer: (B) n - 1
View Solution




Step 1: Understanding the Question:

The question asks for the total number of passes needed to sort an unsorted list of \(n\) elements using the Selection Sort algorithm.


Step 2: Key Operational Logic of Selection Sort:

- Selection sort sorts an array by repeatedly finding the minimum element (for ascending order) from the unsorted part and putting it at the beginning.

- The algorithm divides the list into a sorted sublist and an unsorted sublist.


Step 3: Detailed Explanation:

- Let us trace the progress of the algorithm across a collection of size \(n\):

- In the 1st pass, the algorithm searches the entire list of \(n\) elements, finds the minimum, and swaps it with the element at index 0. Now, the first element is sorted.

- In the 2nd pass, the search begins at index 1 to find the minimum of the remaining \(n-1\) elements, swapping it with the element at index 1.

- This process continues sequentially.

- By the time we complete the \((n-1)\)-th pass, \(n-1\) elements have been successfully placed in their correct sorted positions.

- Consequently, the final remaining 1 element must automatically be in its correct sorted position at the end of the list.

- Thus, no further \(n\)-th pass is required. The total number of passes needed to sort the entire list of size \(n\) is exactly \(n-1\).


Step 4: Final Answer:

An array of size \(n\) requires exactly \(n-1\) passes to be fully sorted using Selection Sort.

Hence, option (B) is the correct choice.
Quick Tip: Most comparison-based sorting algorithms (Bubble Sort, Selection Sort, Insertion Sort) require exactly \(n-1\) passes to guarantee a completely sorted list of size \(n\).


Question 25:

If every item of the list maps to a unique index in the hash table, the hash function is called a ______ hash function.

  • (A) perfect
  • (B) remainder
  • (C) collision
  • (D) aggregate
Correct Answer: (A) perfect
View Solution




Step 1: Understanding the Question:

The question asks for the specific name of a hash function that maps every distinct input key to a unique slot or index in a hash table without any overlapping.


Step 2: Key Hashing Concepts:

- Hash Function: A function that maps keys of arbitrary size to fixed-size array indices.

- Collision: An event that occurs when two different keys map to the exact same hash table index.

- Perfect Hash Function: A hash function that maps each key in a static set of keys to a distinct integer, ensuring that no collisions occur.


Step 3: Detailed Explanation:

- In general hashing, we often experience collisions because the key space is much larger than the slot space of the hash table. We then use collision resolution techniques (like chaining or open addressing) to handle them.

- However, if we know the set of keys beforehand, we can design a specialized hash function such that:

\[ H(key_1) \neq H(key_2) \quad for all key_1 \neq key_2 \]

- Such a hash function guarantees that each item maps to its own unique index, resulting in zero collisions. This is called a Perfect Hash Function.

- Let us evaluate the other options:

- Remainder: This refers to the modulo division method (e.g., \(key \pmod m\)), which is a common way to implement a hash function but does not guarantee unique mappings.

- Collision: This is the event of key conflict, not a type of function.

- Aggregate: This is unrelated and refers to summarizing multiple values in database queries.


Step 4: Final Answer:

A hash function that maps each input item to a unique index is called a perfect hash function.

Hence, option (A) is the correct choice.
Quick Tip: A "Perfect Hash Function" guarantees \(O(1)\) constant time lookup in the worst case because there are no collisions to resolve!


Question 26:

If there is a nested loop and also a single loop, then the time complexity will be estimated on the basis of the ______ loop only.

  • (A) nested
  • (B) single
  • (C) first
  • (D) second
Correct Answer: (A) nested
View Solution




Step 1: Understanding the Question:

The question asks how to determine the overall asymptotic time complexity (Big-O) of an algorithm that consists of a nested loop block and a sequential single loop block running consecutively.


Step 2: Rules of Asymptotic Dominance:

- When evaluating the running time of sequential blocks of code, we sum their individual complexities:

\[ T(n) = T_1(n) + T_2(n) \]

- In Big-O notation, we focus on the dominant term (the highest-order term) as \(n\) grows very large, dropping all lower-order terms and constant coefficients.


Step 3: Detailed Explanation:

- Let us analyze the complexity of the two blocks:

- Single Loop: A simple loop iterating \(n\) times has a time complexity of \(O(n)\).

- Nested Loop: A loop of \(n\) iterations containing another loop of \(n\) iterations has a time complexity of \(O(n \times n) = O(n^2)\).

- Since these two loops execute one after the other, the total time expression is:

\[ T(n) = O(n^2) + O(n) \]

- As \(n \to \infty\), the \(n^2\) term grows much faster than the \(n\) term. Therefore, the \(n\) term becomes insignificant.

- Applying the dominance rule, the lower-order term \(O(n)\) is dropped, leaving:

\[ T(n) \approx O(n^2) \]

- Thus, the overall complexity of the algorithm is dominated and estimated solely on the basis of the nested loop block.


Step 4: Final Answer:

The overall time complexity is determined by the highest-order term, which comes from the nested loop.

Hence, option (A) is the correct choice.
Quick Tip: In asymptotic analysis, always look for the most expensive operation or the deepest loop hierarchy.
The overall Big-O of sequential tasks is simply the maximum of their individual complexities:
\[ O(f(n) + g(n)) = O(\max(f(n), g(n))) \]


Question 27:

Identify the technique in which a new application is executed in a virtual environment and its behavioral fingerprint is observed for a possible malware.

  • (A) Data Mining Techniques
  • (B) Heuristics
  • (C) Sandbox Detection
  • (D) Signature Based Detection
Correct Answer: (C) Sandbox Detection
View Solution




Step 1: Understanding the Question:

The question asks to identify the security technique used to run a suspicious file or application within an isolated, virtual testing environment to observe its behavior for malicious activity.


Step 2: Key Malware Detection Concepts:

- Signature-Based Detection: Identifies known malware by matching static binary signatures (like file hashes) against a database of known threats. It cannot detect zero-day or modified malware.

- Heuristic Analysis: Looks for suspicious code patterns or commands commonly found in malware.

- Sandboxing / Sandbox Detection: An isolated virtual environment (a "sandbox") where untrusted applications are executed safely. The system monitors the application's runtime actions, network requests, and system modifications without putting the production network at risk.


Step 3: Detailed Explanation:

- Let us map the problem description to these definitions:

- The phrase "executed in a virtual environment" is the core characteristic of a Sandbox.

- The phrase "behavioral fingerprint is observed" refers to dynamic analysis, where we monitor active operations like unauthorized registry changes, process spawning, or malicious connection attempts.

- Executing a file in a controlled, isolated virtual machine ensures that even if the program is malware, it cannot infect the host computer.

- This active observation technique is known as Sandbox Detection (or Sandboxing).


Step 4: Final Answer:

The process of executing an application in an isolated virtual environment to inspect its behavior is called Sandbox Detection.

Hence, option (C) is the correct choice.
Quick Tip: Think of a physical "sandbox":
Children can build or break things inside the sandbox, and the mess stays safely confined within the box.
In computer security, a digital sandbox keeps malware safely isolated!


Question 28:

If a data has outliers, then which measure of central tendency is preferred for finding central value?

  • (A) Mean
  • (B) Median
  • (C) Mode
  • (D) Hash
Correct Answer: (B) Median
View Solution




Step 1: Understanding the Question:

The question asks to identify the most robust and preferred measure of central tendency for a dataset containing extreme values or outliers.


Step 2: Analysis of Measures of Central Tendency:

- Mean (Arithmetic Average): Sum of all values divided by the number of values.

- Median (Middle Value): The physical middle data point when the data is sorted in ascending or descending order.

- Mode (Most Frequent Value): The value that appears most often in the dataset.


Step 3: Detailed Explanation:

- Let us analyze how outliers affect these measures using a simple numerical example:

- Suppose we have five data points representing salaries: 20, 22, 25, 28, 500 (where 500 is an extreme outlier).

- Let's compute the Mean:

\[ Mean = \frac{20 + 22 + 25 + 28 + 500}{5} = \frac{600}{5} = 120 \]

The mean of 120 is not a good representation of the central value, as four out of five data points are far below 120. The outlier has heavily skewed the mean upward.

- Let's compute the Median (middle element of sorted data):

The sorted data is 20, 22, [25], 28, 500. The middle value is 25.

This value (25) is a much better representation of the central tendency of the group, and it remains completely unaffected by the extreme value of 500.

- Because the median relies purely on the ordinal position of values rather than their magnitude, it is highly resistant (robust) to outliers.


Step 4: Final Answer:

When a dataset contains outliers, the Median is the preferred measure of central tendency for finding the central value.

Hence, option (B) is the correct choice.
Quick Tip: - Use Mean for symmetric data with no outliers.
- Use Median for skewed data or datasets containing extreme outliers.
- Use Mode for qualitative or categorical data.


Question 29:

Insertion sort will have a time complexity of ______ in the worst case.

  • (A) n\(^3\)
  • (B) log(n)
  • (C) n
  • (D) n\(^2\)
Correct Answer: (D) n\(^2\)
View Solution




Step 1: Understanding the Question:

The question asks for the worst-case asymptotic time complexity (Big-O) of the Insertion Sort algorithm.


Step 2: Key Operational Logic of Insertion Sort:

- Insertion sort works by taking elements one by one from an unsorted portion of an array and inserting them into their correct relative positions in a sorted portion.

- The worst-case scenario occurs when the input array is sorted in exact reverse order.


Step 3: Detailed Explanation:

- Let us calculate the number of comparisons made in the worst-case scenario for an array of size \(n\):

- To insert the 2nd element, we compare it with the 1st element (1 comparison).

- To insert the 3rd element, we may compare it with the 2nd and 1st elements (2 comparisons).

- To insert the \(i\)-th element, we must compare it with all \(i-1\) elements in the sorted portion (\(i-1\) comparisons).

- Summing up all comparisons for an array of size \(n\):

\[ Total Comparisons = 1 + 2 + 3 + \dots + (n-1) \]

- Using the standard summation formula for the first \(n-1\) integers:

\[ Total Comparisons = \frac{(n-1) \times n}{2} = \frac{n^2 - n}{2} \]

- In Big-O notation, we drop the lower-order term (\(n\)) and the constant fraction (\(1/2\)), leaving:

\[ T(n) = O(n^2) \]

- Thus, the worst-case time complexity of insertion sort is \(O(n^2)\).


Step 4: Final Answer:

The worst-case time complexity of Insertion Sort is \(O(n^2)\).

Hence, option (D) is the correct choice.
Quick Tip: Remember these Insertion Sort complexities:
- Best Case (already sorted array) = \(O(n)\) comparisons.
- Worst Case (reverse sorted array) = \(O(n^2)\) comparisons.
- Average Case = \(O(n^2)\) comparisons.


Question 30:

The elements A, B, C, D, E are to be entered in an empty queue starting from A. The following operations are performed:

Enqueue(), Enqueue(), Enqueue(), Dequeue(), Dequeue(), Enqueue(), Dequeue()

What will be the status of the queue after the above operation?

  • (A) C and D
  • (B) D and E
  • (C) B and C
  • (D) C, D and E
Correct Answer: (A) C and D
View Solution




Step 1: Understanding the Question:

The question asks to determine the final elements remaining inside a queue after performing a specific sequence of Enqueue and Dequeue operations on a set of elements starting from A.


Step 2: Key Concepts of Queue Operations:

- A queue is a linear data structure that operates under the First-In, First-Out (FIFO) principle.

- Enqueue(): Adds an element to the rear of the queue.

- Dequeue(): Removes an element from the front of the queue.


Step 3: Detailed Explanation and Trace:

- Let us trace the operations on an initially empty queue:

- Start with an empty queue: []

- First Enqueue() \(\rightarrow\) Inserts 'A' at the rear: [A]

- Second Enqueue() \(\rightarrow\) Inserts 'B' at the rear: [A, B]

- Third Enqueue() \(\rightarrow\) Inserts 'C' at the rear: [A, B, C]

- First Dequeue() \(\rightarrow\) Removes the front element 'A': [B, C]

- Second Dequeue() \(\rightarrow\) Removes the front element 'B': [C]

- Fourth Enqueue() \(\rightarrow\) Inserts 'D' at the rear: [C, D]

- At this point, the elements remaining in the queue are C and D.

- Note regarding the final printed Dequeue(): If the final Dequeue() operation is executed, 'C' is removed, leaving only [D] in the queue. However, since [D] is not available in any of the choices, this indicates a typographical print error in the official question where the last Dequeue() operation is meant to be omitted.

- Following the standard textbook references, the final state is evaluated as [C, D].


Step 4: Final Answer:

The status of the queue contains the elements C and D.

Hence, option (A) is the correct choice.
Quick Tip: If a trace results in a value not listed in the choices (like [D]}), check the second-to-last state.
Typos in exam questions often involve an extra trailing operation that can be safely ignored to match the intended answer.


Question 31:

Which of the following devices uses IP address as means of communication?

A. Hub

B. Gateway

C. Router

D. Repeater

Choose the correct answer from the options given below:

  • (A) A and D only
  • (B) B and C only
  • (C) B, C and D only
  • (D) A, B, C and D
Correct Answer: (B) B and C only
View Solution




Step 1: Understanding the Question:

The question asks to identify which of the listed network devices (Hub, Gateway, Router, Repeater) process and use IP addresses (Layer 3 of the OSI model) for packet routing and communication.


Step 2: Key Concepts of OSI Layer Devices:

- Physical Layer (Layer 1): Deals with raw bit transmission over physical media. Devices working here (like Hubs and Repeaters) have no concept of addressing (MAC or IP). They only regenerate and replicate electrical/optical signals.

- Network Layer (Layer 3): Manages host addressing and logical packet routing. Devices here (like Routers) read and use IP addresses.

- Higher Layers (Layers 4 to 7): Gateways operate at multiple layers, including the network layer and above, to connect networks using different protocols. They parse IP headers to perform protocol translation and address translation.


Step 3: Detailed Explanation:

Let us analyze each device:

- A. Hub: A Layer 1 physical device. It simply broadcasts incoming electrical signals to all ports. It cannot read IP addresses.

- D. Repeater: A Layer 1 physical device. It only amplifies or regenerates weak incoming signals. It does not look at packet data or IP addresses.

- C. Router: A Layer 3 device that connects different IP networks. It reads the source and destination IP addresses in packet headers to determine the best path to forward the packets. It uses IP addresses directly.

- B. Gateway: A protocol translation device that operates across Layer 3 and above. It uses IP addresses to coordinate data conversion and routing between incompatible networks.

- Therefore, only B (Gateway) and C (Router) use IP addresses as a means of communication.


Step 4: Final Answer:

The devices that use IP addresses for communication are B (Gateway) and C (Router).

Hence, option (B) is the correct choice.
Quick Tip: - Layer 1 (Physical) \(\rightarrow\) Hub, Repeater (No addressing).
- Layer 2 (Data Link) \(\rightarrow\) Switch, Bridge (Uses MAC addresses).
- Layer 3 (Network) \(\rightarrow\) Router (Uses IP addresses).
- Layer 3+ \(\rightarrow\) Gateway (Uses IP addresses and higher-layer protocols).


Question 32:

Give output of the evaluation of the following postfix expression:

10 2 8 * + 3 -

  • (A) 23
  • (B) 97
  • (C) 25
  • (D) 47
Correct Answer: (A) 23
View Solution




Step 1: Understanding the Question:

The question asks to evaluate the given postfix mathematical expression and compute its final numerical output using a stack-based evaluation approach.


Step 2: Postfix Evaluation Algorithm:

To evaluate a postfix expression:

- Scan the expression from left to right.

- If an operand (number) is encountered, push it onto the stack.

- If an operator (like +, -, *, /) is encountered:

- Pop the top element as the second operand (op2).

- Pop the next top element as the first operand (op1).

- Perform the operation: result = op1 [operator] op2.

- Push the result back onto the stack.


Step 3: Detailed Step-by-Step Evaluation:

Let us trace the evaluation of: 10 2 8 * + 3 -

- Token 10: It is an operand. Push onto stack.

Stack: [10]

- Token 2: It is an operand. Push onto stack.

Stack: [10, 2]

- Token 8: It is an operand. Push onto stack.

Stack: [10, 2, 8]

- Token *: It is an operator.

- Pop op2 = 8

- Pop op1 = 2

- Compute: \(2 \times 8 = 16\). Push 16 onto stack.

Stack: [10, 16]

- Token +: It is an operator.

- Pop op2 = 16

- Pop op1 = 10

- Compute: \(10 + 16 = 26\). Push 26 onto stack.

Stack: [26]

- Token 3: It is an operand. Push onto stack.

Stack: [26, 3]

- Token -: It is an operator.

- Pop op2 = 3

- Pop op1 = 26

- Compute: \(26 - 3 = 23\). Push 23 onto stack.

Stack: [23]

- The expression is completely evaluated, and the final value left on the stack is 23.


Step 4: Final Answer:

The final evaluated output of the postfix expression is 23.

Hence, option (A) is the correct choice.
Quick Tip: Be very careful when applying subtraction (-}) or division (/}):
Always calculate the first popped element as the second operand:
\[ Expression = op1 - op2 \]
Getting the order backwards is a common trap!


Question 33:

__________ is used to insert a new element to the queue at the __________ end.

  • (A) DEQUEUE ; front
  • (B) ENQUEUE ; front
  • (C) DEQUEUE ; rear
  • (D) ENQUEUE ; rear
Correct Answer: (D) ENQUEUE ; rear
View Solution




Step 1: Understanding the Question:

The question asks to identify the correct terms for inserting a new element into a queue and the specific end of the queue where insertions are performed.


Step 2: Key Operational Rules of a Queue:

- A Queue is a linear data structure working under the First-In, First-Out (FIFO) principle.

- It has two distinct ends:

- Front End: The position where elements are deleted (removed). This operation is called DEQUEUE.

- Rear End: The position where elements are inserted (added). This operation is called ENQUEUE.


Step 3: Detailed Explanation:

- Let us evaluate the options:

- Option (A) is incorrect because DEQUEUE is a removal operation, and it happens at the front, not insertion.

- Option (B) is incorrect because ENQUEUE (insertion) does not occur at the front.

- Option (C) is incorrect because DEQUEUE does not occur at the rear, and it is a deletion operation.

- Option (D) correctly states that ENQUEUE is the operation used to insert a new element and that it takes place at the rear end of the queue.


Step 4: Final Answer:

ENQUEUE is used to insert a new element to the queue at the rear end.

Hence, option (D) is the correct choice.
Quick Tip: Remember this layout:
- Insertion \(\rightarrow\) ENQUEUE \(\rightarrow\) REAR end.
- Deletion \(\rightarrow\) DEQUEUE \(\rightarrow\) FRONT end.
This is standard across all computer science exams!


Question 34:

In a dataset of cars, a column 'colour' has missing values. The dataset has to be free of any missing values. Which measure of central tendency we should use to fill the data?

  • (A) Mean
  • (B) Median
  • (C) Mode
  • (D) Count
Correct Answer: (C) Mode
View Solution




Step 1: Understanding the Question:

The question asks to identify the most suitable measure of central tendency to impute (fill in) missing values in a categorical data column named 'colour' in a dataset.


Step 2: Data Types and Central Tendency:

- Numerical Data: Quantitative measurements (like price or age) where mathematical calculations like averages can be performed. Useful measures: Mean, Median.

- Categorical Data: Qualitative groupings (like colour, brand, or gender) consisting of text labels instead of numbers.


Step 3: Detailed Explanation:

- Let us evaluate the applicability of each measure of central tendency to the 'colour' column:

- Mean: Requires adding all the values and dividing by the total count. Since we cannot mathematically add text values (e.g., "Red" + "Blue" + "Green"), the mean is impossible to calculate for categorical data.

- Median: Requires sorting values numerically to locate the middle element. Since there is no inherent numerical order for color names, the median cannot be calculated for categorical data.

- Mode: Identifies the most frequently occurring value in the dataset. This can easily be computed for text data by counting the frequency of each category (e.g., if "Red" is the most common color, then "Red" is the mode).

- Therefore, when cleaning categorical columns with missing values, the standard practice is to replace the missing fields with the most frequent value, which is the Mode.


Step 4: Final Answer:

For categorical columns containing missing text data, the Mode is the preferred measure of central tendency to fill in the gaps.

Hence, option (C) is the correct choice.
Quick Tip: Imputation standard:
- For numerical variables: Fill with Mean or Median.
- For categorical variables: Always fill with Mode (the most frequent value).


Question 35:

Can a single try block have multiple except clauses in Python?

  • (A) Yes, to catch different types of exceptions
  • (B) No, only one exception type is allowed per block
  • (C) Yes, but only if they are nested
  • (D) No, exceptions must be handled separately
Correct Answer: (A) Yes, to catch different types of exceptions
View Solution




Step 1: Understanding the Question:

The question asks about the rules of exception handling in Python, specifically whether a single try block is allowed to be associated with multiple except blocks to handle different errors.


Step 2: Syntax of Python Exception Handling:

Python uses a structured block system to capture and manage runtime errors:

- A single try block contains the code that could potentially fail.

- It can be followed by multiple sequential except blocks, each handling a different type of exception class.


Step 3: Detailed Explanation:

- When code in a try block is executed and an error occurs, Python stops running the try block immediately and searches the subsequent except blocks from top to bottom.

- By specifying multiple except blocks, we can write specialized recovery code depending on the exact error that occurred. For example:

\indent try:

\indent \ \ \ \ num = 10 / zero

\indent except ZeroDivisionError:

\indent \ \ \ \ print("Cannot divide by zero!")

\indent except NameError:

\indent \ \ \ \ print("Variable is not defined!")

- This ensures that if a division by zero occurs, the first handler is run; if an undefined variable is accessed, the second handler is run.

- This structure is fully supported, standard, and highly encouraged in Python development. Thus, Option (A) is correct.


Step 4: Final Answer:

A single try block can indeed have multiple except clauses to catch and handle different types of exceptions separately.

Hence, option (A) is the correct choice.
Quick Tip: When chaining multiple except} clauses:
Always place specific subclass exceptions (e.g., ZeroDivisionError}) above more generic exception classes (e.g., Exception}) to ensure the specialized handler is matched first!


Question 36:

To upload a text document at the rate of 5 pages per 10 seconds. What will be the required data rate of the channel, assuming 1 page contain 1000 characters and each character is of 8 bits.

  • (A) 4000 bps
  • (B) 6250 bps
  • (C) 8000 bps
  • (D) 5000 bps
Correct Answer: (A) 4000 bps
View Solution




Step 1: Understanding the Question:

The question asks to calculate the minimum network transmission rate (data rate in bits per second, or bps) required to successfully upload 5 pages of a document in 10 seconds, given the specific sizing parameters of the pages and characters.


Step 2: Key Formulas:

To compute the channel data rate:

- Calculate the total size of a single page in bits:

\[ Bits per page = Characters per page \times Bits per character \]

- Calculate the total data size of all pages to be uploaded:

\[ Total bits = Number of pages \times Bits per page \]

- Calculate the required data rate of the channel:

\[ Data Rate = \frac{Total bits}{Total time in seconds} \]


Step 3: Detailed Step-by-Step Calculation:

- Let us extract the parameters from the problem:

- Number of pages = \(5\)

- Transmission time = \(10 seconds\)

- Characters per page = \(1000\)

- Bits per character = \(8 bits\)

- Calculate the number of bits in 1 page:

\[ 1000 characters \times 8 bits/character = 8000 bits \]

- Calculate the total number of bits for 5 pages:

\[ 5 pages \times 8000 bits/page = 40000 bits \]

- Calculate the required data rate of the channel:

\[ Data Rate = \frac{40000 bits}{10 seconds} = 4000 bits per second (bps) \]

- Thus, the channel must support a minimum transmission speed of 4000 bps.


Step 4: Final Answer:

The required data rate of the channel is 4000 bps.

Hence, option (A) is the correct choice.
Quick Tip: Always keep track of units during calculations:
Ensure you convert characters/bytes to bits by multiplying by 8 to get the final answer in "bps" (bits per second) rather than "Bps" (Bytes per second)!


Question 37:

Match the LIST-I with LIST-II



Choose the correct answer from the options given below:

  • (A) A-IV, B-II, C-III, D-I
  • (B) A-I, B-IV, C-II, D-III
  • (C) A-IV, B-II, C-I, D-III
  • (D) A-III, B-IV, C-I, D-II
Correct Answer: (C) A-IV, B-II, C-I, D-III
View Solution




Step 1: Understanding the Question:

The question asks to match different types of electromagnetic waves used as transmission media in computer networks (List-I) with their corresponding operational frequency ranges (List-II).


Step 2: Key Concepts and Spectrum Ranges:

- Wireless transmission media transmit electromagnetic signals through the air.

- Different bands of the electromagnetic spectrum are allocated to different technologies based on their frequency ranges.


Step 3: Detailed Explanation of Matching:

- Radio waves: These are electromagnetic waves in the lowest frequency band of the communication spectrum. Their standard frequency range is from \(3 KHz\) to \(1 GHz\). Thus, C matches with I.

- Microwaves: These waves operate at higher frequencies than radio waves, enabling them to transmit more data. Their standard frequency range is from \(1 GHz\) to \(300 GHz\). Thus, D matches with III.

- Infrared waves: These high-frequency waves are used for short-range communication (like remote controls) and operate in the range just below visible light, from \(300 GHz\) to \(400 THz\). Thus, B matches with II.

- Light waves (Visible Light): These have the highest frequency among the listed options, ranging from \(400 THz\) to \(900 THz\). Thus, A matches with IV.

- Combining these matches: A-IV, B-II, C-I, D-III.


Step 4: Final Answer:

The correct matching sequence is A-IV, B-II, C-I, D-III.

Hence, option (C) is the correct choice.
Quick Tip: To easily match electromagnetic frequencies:
- Remember the order of increasing frequency: Radio waves \(<\) Microwaves \(<\) Infrared waves \(<\) Light waves.
- Align this order with the frequency units: KHz/GHz \(\rightarrow\) GHz \(\rightarrow\) GHz/THz \(\rightarrow\) THz.


Question 38:

Match the LIST-I with LIST-II



Choose the correct answer from the options given below:

  • (A) A-III, B-II, C-IV, D-I
  • (B) A-II, B-III, C-IV, D-I
  • (C) A-II, B-III, C-I, D-IV
  • (D) A-III, B-IV, C-I, D-II
Correct Answer: (B) A-II, B-III, C-IV, D-I
View Solution




Step 1: Understanding the Question:

The question requires matching different types of malicious software (malware) listed in List-I with their corresponding definitions or behavioral descriptions listed in List-II.


Step 2: Key Concepts of Malware Types:

- Malware is any software intentionally designed to cause damage to a computer, server, client, or computer network.

- Different malware classes are distinguished by how they replicate and their target objectives.


Step 3: Detailed Explanation of Matching:

- A. Worms: A computer worm is a self-replicating program. Unlike a virus, it is a standalone application and does not need to attach itself to an existing host file or program to spread. Thus, A matches with II.

- B. Virus: A computer virus attaches its malicious code to an executable host file or document. It replicates and infects other files or systems when the compromised host file is shared or run. Thus, B matches with III.

- C. Adware: Short for advertising-supported software. It automatically displays or downloads advertising material (such as banners or pop-ups) to generate revenue, often on a pay-per-click basis. Thus, C matches with IV.

- D. Spyware: This software is installed clandestinely to monitor and gather information about a user's activities (such as keystrokes, browsing history, and credentials) and transmit it to third parties or advertisers. Thus, D matches with I.

- Combining these matches: A-II, B-III, C-IV, D-I.


Step 4: Final Answer:

The correct matching sequence is A-II, B-III, C-IV, D-I.

Hence, option (B) is the correct choice.
Quick Tip: The key distinction between a virus and a worm is:
- Virus = Needs a host program to attach to and propagate.
- Worm = Standalone, spreads automatically across networks without a host.


Question 39:

Assume a list = [2, 4, 6, 8, 10, 12, 14]

How many comparisons are required to find element '4' in the list using Binary search?

  • (A) 3
  • (B) 4
  • (C) 2
  • (D) 1
Correct Answer: (C) 2
View Solution




Step 1: Understanding the Question:

The question asks to find the exact number of key comparisons required to locate the element 4 within the sorted list [2, 4, 6, 8, 10, 12, 14] using the Binary Search algorithm.


Step 2: Binary Search Logic:

- Binary search operates on a sorted array by repeatedly dividing the search interval in half.

- Let low represent the start index and high represent the end index.

- In each step, we calculate the middle index:

\[ mid = \lfloor \frac{low + high}{2} \rfloor \]

- We then compare the element at mid with the target element.


Step 3: Step-by-Step Execution Trace:

- Given list: [2, 4, 6, 8, 10, 12, 14]

- Target element = 4

- Indices of list: 0, 1, 2, 3, 4, 5, 6 (total elements, \(n = 7\))


- Iteration 1:

- Initial pointers: \(low = 0\), \(high = 6\).

- Calculate middle index:

\[ mid = \lfloor \frac{0 + 6}{2} \rfloor = 3 \]

- Compare element at index 3 (list[3] which is 8) with target (4):

- Comparison 1: Is 8 == 4? No.

- Since 4 < 8, the search space is restricted to the left half.

- New pointers: \(low = 0\), \(high = mid - 1 = 2\).


- Iteration 2:

- Current pointers: \(low = 0\), \(high = 2\).

- Calculate middle index:

\[ mid = \lfloor \frac{0 + 2}{2} \rfloor = 1 \]

- Compare element at index 1 (list[1] which is 4) with target (4):

- Comparison 2: Is 4 == 4? Yes.

- The target is found at index 1. The search terminates successfully.

- Thus, the total number of comparisons made is exactly 2.


Step 4: Final Answer:

The Binary Search algorithm makes 2 comparisons to locate the element '4'.

Hence, option (C) is the correct choice.
Quick Tip: Always perform integer division (floor division) when calculating mid}:
\[ mid = (low + high) // 2 \]
Keep a clear track of the comparison count at each step of the loop!


Question 40:

After two complete passes of Bubble Sort on the array [7, 2, 9, 4], what will the new order be?

A. 7

B. 2

C. 4

D. 9

Choose the correct answer from the options given below:

  • (A) B, C, A, D
  • (B) A, B, C, D
  • (C) B, A, D, C
  • (D) B, A, C, D
Correct Answer: (A) B, C, A, D
View Solution




Step 1: Understanding the Question:

The question asks to find the order of the array elements [7, 2, 9, 4] after executing exactly two complete passes of the Bubble Sort algorithm in ascending order.


Step 2: Bubble Sort Algorithm:

- Bubble Sort works by repeatedly swapping adjacent elements if they are in the wrong order.

- In each pass, the largest unsorted element "bubbles up" to its correct position at the end of the array.


Step 3: Step-by-Step Trace of the Passes:

- Initial Array: [7, 2, 9, 4]


- Pass 1:

- Compare indices 0 and 1 (7 and 2): \(7 > 2\) is True. Swap them.

Array becomes: [2, 7, 9, 4]

- Compare indices 1 and 2 (7 and 9): \(7 > 9\) is False. No swap.

Array remains: [2, 7, 9, 4]

- Compare indices 2 and 3 (9 and 4): \(9 > 4\) is True. Swap them.

Array becomes: [2, 7, 4, 9]

- End of Pass 1: The largest element 9 is placed at the final index. It is now in its sorted position.


- Pass 2:

- We only need to sort the remaining unsorted elements [2, 7, 4].

- Compare indices 0 and 1 (2 and 7): \(2 > 7\) is False. No swap.

Array remains: [2, 7, 4, 9]

- Compare indices 1 and 2 (7 and 4): \(7 > 4\) is True. Swap them.

Array becomes: [2, 4, 7, 9]

- End of Pass 2: The second largest element 7 is placed in its correct position.

- The array order after two passes is: [2, 4, 7, 9].

- Mapping elements to the given variable labels:

- 2 is labeled as B.

- 4 is labeled as C.

- 7 is labeled as A.

- 9 is labeled as D.

- This gives the sequence: B, C, A, D.


Step 4: Final Answer:

The state of the array after two passes of Bubble Sort is represented by B, C, A, D.

Hence, option (A) is the correct choice.
Quick Tip: At the end of the \(k\)-th pass of Bubble Sort, the \(k\) largest elements are guaranteed to be in their final sorted positions at the end of the array!
Here, after 2 passes, the last two elements must be 7 and 9 (represented by A and D).


Question 41:

The columns of a relation represents __________.

  • (A) Tuple
  • (B) Schema
  • (C) Attribute
  • (D) Domain
Correct Answer: (C) Attribute
View Solution




Step 1: Understanding the Question:

The question asks to identify what the columns in a relational database table (relation) represent in standard relational model terminology.


Step 2: Relational Model Key Terms:

- Relation: A table consisting of rows and columns.

- Tuple: A single row in a table representing a single data record.

- Attribute: A named column in a table representing a property or characteristic of the entity.

- Domain: The set of allowable values for a given attribute.

- Schema: The structural design of the database (table names, column names, and data types).


Step 3: Detailed Explanation:

- In the relational database model proposed by E.F. Codd:

- A table represents a set of related data.

- Each column represents a specific property or feature of the data, which is formally defined as an Attribute.

- For example, in a Student table, columns like RollNo, Name, and Age are attributes that describe each student.

- Therefore, the columns of a relation represent attributes.


Step 4: Final Answer:

The columns of a relation represent Attributes.

Hence, option (C) is the correct choice.
Quick Tip: Remember these synonyms for database exams:
- Row = Tuple = Record
- Column = Attribute = Field
- Table = Relation


Question 42:

All the packets coming from outside the network are filtered at which of the following device?

  • (A) Switch
  • (B) Gateway
  • (C) Hub
  • (D) Router
Correct Answer: (B) Gateway
View Solution




Step 1: Understanding the Question:

The question asks to identify the network device responsible for filtering all incoming packets from external networks before they are permitted to enter the local network.


Step 2: Analyzing Network Border Security:

- Local networks require boundary protection systems to screen untrusted traffic arriving from the Internet.

- Packet filtering can occur at multiple nodes, but the ultimate security, translation, and access control boundary point is typically situated at the network entry node.


Step 3: Detailed Explanation of Devices:

- Hub (C): Operates purely at the Physical Layer (Layer 1) and broadcasts all data indiscriminately. It cannot read packet contents or filter traffic.

- Switch (A): Operates at the Data Link Layer (Layer 2) to route internal traffic based on MAC addresses. It is an internal LAN device and does not filter incoming external WAN traffic.

- Router (D): Routes traffic between different networks based on IP addresses. While routers can perform basic packet filtering, they are primarily path-selection devices.

- Gateway (B): Serves as the key entry and exit node (protocol converter and traffic gatekeeper) connecting a local network to an external, untrusted network. Because it acts as an entry/exit portal, all external packets must pass through it, where they are actively filtered, translated, and checked by firewall rules.


Step 4: Final Answer:

All packets originating from outside the network are filtered at the Gateway, which acts as the security border of the network.

Hence, option (B) is the correct choice.
Quick Tip: A Gateway serves as a "security checkpoint" or "border control" for a network.
It connects completely different protocols and networks, making it the perfect place to enforce firewall security and packet filtering!


Question 43:

Consider the runs scored by Virat Kohli in IPL 2025 as 90, 102, 115, 85, 90, 100, 110, 110 in the 9 matches. Find the standard deviation of the score.

  • (A) 10.2
  • (B) 104.22
  • (C) 101.33
  • (D) 102
Correct Answer: (A) 10.2
View Solution




Step 1: Understanding the Question:

The question asks to find the standard deviation of the runs scored by a player. The question mentions 9 matches but lists only 8 scores explicitly: 90, 102, 115, 85, 90, 100, 110, 110. We must resolve this discrepancy to find the correct answer among the choices.


Step 2: Identifying the Missing Value and Computing Statistics:

Let us analyze the choices:

- Choice (C) is 101.33.

- Choice (B) is 104.22.

- Choice (A) is 10.2.

- If the mean score of the 9 matches is exactly 101.33 (which is \(912 / 9\)):

- The sum of all 9 scores must be: \(9 \times 101.333 = 912\).

- Sum of the given 8 scores is: \(90 + 102 + 115 + 85 + 90 + 100 + 110 + 110 = 802\).

- This indicates the missing 9th score is: \(912 - 802 = 110\).

- Therefore, the complete dataset of 9 matches is: 90, 102, 115, 85, 90, 100, 110, 110, 110.


Step 3: Calculating Variance and Standard Deviation:

- Mean (\(\mu\)):

\[ \mu = \frac{912}{9} \approx 101.33 \]

- Deviations from the Mean (\(x_i - \mu\)):

- \(90 - 101.33 = -11.33 \rightarrow (-11.33)^2 \approx 128.37\)

- \(102 - 101.33 = 0.67 \rightarrow (0.67)^2 \approx 0.45\)

- \(115 - 101.33 = 13.67 \rightarrow (13.67)^2 \approx 186.87\)

- \(85 - 101.33 = -16.33 \rightarrow (-16.33)^2 \approx 266.67\)

- \(90 - 101.33 = -11.33 \rightarrow (-11.33)^2 \approx 128.37\)

- \(100 - 101.33 = -1.33 \rightarrow (-1.33)^2 \approx 1.77\)

- \(110 - 101.33 = 8.67 \rightarrow (8.67)^2 \approx 75.17\)

- \(110 - 101.33 = 8.67 \rightarrow (8.67)^2 \approx 75.17\)

- \(110 - 101.33 = 8.67 \rightarrow (8.67)^2 \approx 75.17\)

- Sum of Squared Deviations (\(\sum (x_i - \mu)^2\)):

\[ \sum (x_i - \mu)^2 = 128.37 + 0.45 + 186.87 + 266.67 + 128.37 + 1.77 + 75.17 + 75.17 + 75.17 = 938.01 \]

- Population Variance (\(\sigma^2\)):

\[ \sigma^2 = \frac{938.01}{9} = 104.22 \]

- Note that this matches Option (B) 104.22 exactly as the variance.

- Standard Deviation (\(\sigma\)):

\[ \sigma = \sqrt{104.22} \approx 10.21 \]

- This matches Option (A) 10.2 as the standard deviation.


Step 4: Final Answer:

The standard deviation of the player's runs is 10.2.

Hence, option (A) is the correct choice.
Quick Tip: Notice the relationships in the options:
- Option C is the Mean (101.33).
- Option B is the Variance (104.22).
- Option A is the Standard Deviation (10.2), which is \(\sqrt{Variance} \approx \sqrt{104.22}\).
Understanding these connections saves you calculation time!


Question 44:

What is the worst-case scenario for a linear search in an array of 'n' elements?

  • (A) The target element is the last element
  • (B) The target element is the first element
  • (C) The array is sorted
  • (D) The array is unsorted
Correct Answer: (A) The target element is the last element
View Solution




Step 1: Understanding the Question:

The question asks to identify the worst-case scenario for running a Linear Search algorithm on a database array consisting of \(n\) elements.


Step 2: Linear Search Comparisons:

- Linear search compares the target element with each element of the array sequentially, starting from index 0.

- The number of steps depends directly on the location of the target value.


Step 3: Detailed Explanation of Scenarios:

- Let us evaluate each scenario:

- Best Case: The target element is found at the first position index 0. The search ends after exactly 1 comparison.

- Average Case: The target is somewhere in the middle of the array, requiring approximately \(n/2\) comparisons.

- Worst Case: The target is located at the very last index of the array (\(n-1\)), or it does not exist in the collection at all. In both cases, the algorithm is forced to compare the target with all \(n\) elements in the array. This requires \(n\) comparison operations.

- Among the options, "The target element is the last element" represents this worst-case scenario of \(n\) comparisons.


Step 4: Final Answer:

The worst-case scenario for a linear search is when the target element is the last element of the array.

Hence, option (A) is the correct choice.
Quick Tip: In Linear Search, the worst-case complexity is \(O(n)\) because we must traverse the entire array to find the target if it is at the very end or absent!


Question 45:

Assume that in a relation, more than one attributes are eligible to be primary keys. Since there can only be 1 primary key, so what we will call the other key(s)?

  • (A) Foreign key
  • (B) Candidate key
  • (C) Composite key
  • (D) Super key
Correct Answer: (B) Candidate key
View Solution




Step 1: Understanding the Question:

The question describes a database table where multiple columns are uniquely capable of identifying tuples, making them eligible to be the primary key. It asks how we classify these eligible keys.


Step 2: Database Key Classification Definitions:

- Candidate Key: Any minimal set of attributes that can uniquely identify a record in a table. All attributes eligible to become a primary key are candidate keys.

- Primary Key: The single candidate key selected by the database administrator to uniquely identify tuples in a table.

- Alternate Key: The candidate keys that were not chosen as the primary key.


Step 3: Detailed Explanation:

- In the scenario where multiple columns are eligible to be primary keys (e.g., AadhaarNumber and StudentRollNo):

- All of these unique attributes are defined as Candidate Keys.

- Since only one primary key can be active per relation, we select one (e.g., StudentRollNo) as the Primary Key.

- The remaining unused eligible keys (e.g., AadhaarNumber) are alternate keys.

- Since "Alternate Key" is not listed among the choices, we classify the other eligible keys under their general parent group, which is Candidate Keys.


Step 4: Final Answer:

The attributes eligible to be primary keys are called Candidate keys.

Hence, option (B) is the correct choice.
Quick Tip: Formula to remember:
\[ Candidate Keys = Primary Key + Alternate Keys \]
If alternate key is not in the options, the other eligible keys are simply Candidate Keys!


Question 46:

Arrange the following in correct order:

A. listvalues = ['abc', 'Gen', 1, 2.4]

B. pickle.load(fileobject)

C. fileobject = open("file.dat", "wb")

D. pickle.dump(listvalues, fileobject)

Choose the correct answer from the options given below:

  • (A) A, B, C, D
  • (B) B, A, C, D
  • (C) D, C, B, A
  • (D) A, C, D, B
Correct Answer: (D) A, C, D, B
View Solution




Step 1: Understanding the Question:

The question requires arranging four Python file-handling statements (A, B, C, D) using the pickle module in their correct, logical operational order for writing data to a file and subsequently reading it.


Step 2: Logical Lifecycle of Object Pickling:

To serialize (write) and deserialize (read) an object in Python:

1. Initialize the data object in memory.

2. Open the destination file in write-binary mode ("wb").

3. Write (serialize) the object using the pickle.dump() function.

4. (Optional Read Step) Open the file in read-binary mode and read it using the pickle.load() function.


Step 3: Detailed Alignment of Statements:

Let us align the statements into a logical sequence:

- First, we must define the data array that we want to serialize:

listvalues = ['abc', 'Gen', 1, 2.4] (Statement A).

- Next, we must open a file stream in write-binary mode to receive the serialized data:

fileobject = open("file.dat", "wb") (Statement C).

- Next, we use the pickle module to write the list object into the file stream:

pickle.dump(listvalues, fileobject) (Statement D).

- Finally, if we wish to read back the serialized data, we load it using:

pickle.load(fileobject) (Statement B).

- Thus, the correct operational sequence is: A, C, D, B.


Step 4: Final Answer:

The correct logical sequence of Python commands is A, C, D, B.

Hence, option (D) is the correct choice.
Quick Tip: Remember:
- You cannot use pickle.dump()} (D) before defining the list (A) and opening the file (C).
- You cannot read/load data (B) until you have first created and written it to the file (A \(\rightarrow\) C \(\rightarrow\) D)!


Question 47:

Which of the following are applications of stack?

A. Print commands from multiple files from the same computer

B. Bangles worn on wrist

C. Multiple chairs in a vertical pile

D. Pile of clothes in an almirah

Choose the correct answer from the options given below:

  • (A) A, B and D only
  • (B) A, C and D only
  • (C) A, B, C and D
  • (D) B, C and D only
Correct Answer: (D) B, C and D only
View Solution




Step 1: Understanding the Question:

The question asks to identify which of the listed real-world scenarios (A, B, C, D) are correct representations or applications of the Stack (LIFO) data structure.


Step 2: Stack vs Queue Behavioral Rules:

- Stack (Last-In, First-Out / LIFO): The item that is added last is the first one to be removed.

- Queue (First-In, First-Out / FIFO): The item added first is processed first.


Step 3: Analysis of Scenarios:

- A. Print commands from multiple files: When multiple documents are sent to a printer, they are processed in the order they were received. This represents a print queue working on a First-In, First-Out (FIFO) basis. Thus, it is an application of a Queue, not a stack.

- B. Bangles worn on wrist: When removing bangles, the bangle worn last (closest to the hand) must be removed first, while the first bangle worn is removed last. This follows LIFO, representing a Stack.

- C. Multiple chairs in a vertical pile: When stacking chairs, the last chair added to the top of the pile is the first one you can remove. This follows LIFO, representing a Stack.

- D. Pile of clothes in an almirah: When clothes are folded and piled, the piece placed on the top of the pile (last added) is the first one taken. This follows LIFO, representing a Stack.

- Therefore, only B, C, and D are applications of a stack.


Step 4: Final Answer:

The applications of a stack are B, C, and D only.

Hence, option (D) is the correct choice.
Quick Tip: To check if a real-life example is a stack:
Ask yourself, "Can I access or remove the first element placed without removing everything on top of it?"
If you must remove the top items first, it is a Stack (LIFO)!


Question 48:

Which of the following attacks are associated with network intrusion?

A. Traffic flooding

B. Asymmetric routing

C. Trojan-based attacks

D. Buffer overflow attacks

Choose the correct answer from the options given below:

  • (A) A, B and C only
  • (B) A, B and D only
  • (C) A, B, C and D
  • (D) B, C and D only
Correct Answer: (C) A, B, C and D
View Solution




Step 1: Understanding the Question:

The question asks to identify which of the listed cyber security threats and routing concepts (A, B, C, D) are associated with network intrusion and security breaches.


Step 2: Core Concepts of Network Intrusion:

Network intrusion is any unauthorized activity or attack on a computer network aimed at compromising network integrity, availability, or confidentiality.


Step 3: Evaluation of the Attack Vectors:

- A. Traffic flooding: Involves overwhelming a network node or server with a massive volume of packets (e.g., DoS/DDoS attacks), disrupting services and crashing systems to force entry or bypass filters. This is a primary intrusion method.

- B. Asymmetric routing: Occurs when packets take one path to a destination and return via a different path. Intruder systems exploit asymmetric routing to evade detection, as security devices (like stateful firewalls) that only see one half of the conversation cannot perform proper session validation. This is widely associated with intrusion evasion.

- C. Trojan-based attacks: Involves tricking users into installing a seemingly benign program that secretly contains malicious code. Once run, Trojans establish a back door, facilitating unauthorized remote access and system control. This is a common intrusion technique.

- D. Buffer overflow attacks: An attacker sends more data to a system memory buffer than it is designed to hold, overwriting adjacent memory spaces. This is used to run malicious commands with administrative privileges, causing a major security compromise.

- Since all four elements are associated with network intrusion techniques and vulnerabilities, they are all correct.


Step 4: Final Answer:

All listed elements (A, B, C, and D) are associated with network intrusion.

Hence, option (C) is the correct choice.
Quick Tip: Intruders exploit a mix of routing anomalies (Asymmetric routing), protocol vulnerabilities (Traffic flooding), software bugs (Buffer overflow), and social engineering (Trojans) to compromise networks!


Question 49:

Which of the following protocol is used for transferring files from one machine to another even though both systems have different directory structures?

  • (A) HTTP
  • (B) PPP
  • (C) TCP/IP
  • (D) FTP
Correct Answer: (D) FTP
View Solution




Step 1: Understanding the Question:

The question asks for the standard network protocol used to copy and transfer files between two distinct computers, regardless of potential differences in their operating systems and directory structure formats.


Step 2: Analysing Common Application Protocols:

- HTTP (Hypertext Transfer Protocol): Used primarily for fetching and displaying web pages.

- PPP (Point-to-Point Protocol): A Layer 2 protocol used to establish a direct connection between two network nodes over physical links.

- TCP/IP: The foundational protocol suite of the Internet, used for packet transmission and routing rather than direct file manipulation.

- FTP (File Transfer Protocol): A client-server protocol specifically designed for sending, receiving, and managing files across a network.


Step 3: Detailed Explanation of FTP:

- FTP is designed to handle different directory formats, naming conventions, and file structures across diverse operating systems (such as Windows, UNIX, and macOS).

- It abstracts these system-specific differences by establishing two parallel connections:

- Control Connection (Port 21): Used for sending commands and navigating directories.

- Data Connection (Port 20): Used for the actual file data transfer.

- This abstraction allows a user to download or upload files seamlessly, even if the client computer's directory design is entirely different from the server's directory layout.


Step 4: Final Answer:

The protocol used to transfer files between machines with different directory structures is FTP (File Transfer Protocol).

Hence, option (D) is the correct choice.
Quick Tip: Remember:
- To download/upload files \(\rightarrow\) use FTP.
- To view web pages \(\rightarrow\) use HTTP / HTTPS.
- To establish serial dial-up links \(\rightarrow\) use PPP.


Question 50:

The elements to be inserted in the Deque are 10, 20, 30, 40, 50, 60, starting from 10.

What will be the sequence of elements after the following operations are performed on a Deque:

INSERTFRONT(), INSERTREAR(), INSERTFRONT(), DELETEREAR(), DELETEFRONT(), INSERTFRONT(), INSERTREAR(), INSERTFRONT()

A. 10

B. 40

C. 50

D. 60

Choose the correct answer from the options given below:

  • (A) D, B, A, C
  • (B) B, D, A, C
  • (C) B, A, C, D
  • (D) D, C, A, B
Correct Answer: (A) D, B, A, C
View Solution




Step 1: Understanding the Question:

The question asks to trace the state of a Double-Ended Queue (Deque) after executing a specific sequence of insertion and deletion operations. The sequence of incoming input elements is 10, 20, 30, 40, 50, 60, processed in order.


Step 2: Key Operational Principles of a Deque:

- A Deque (Double-Ended Queue) allows insertion and deletion of elements from both ends (Front and Rear).

- INSERTFRONT(): Adds an element to the left (beginning) of the queue.

- INSERTREAR(): Adds an element to the right (end) of the queue.

- DELETEFRONT(): Removes the leftmost element from the queue.

- DELETEREAR(): Removes the rightmost element from the queue.


Step 3: Detailed Step-by-Step Execution Trace:

- We begin with an empty Deque: []

- The incoming elements are: 10, then 20, then 30, then 40, then 50, then 60.


- 1. INSERTFRONT() \(\rightarrow\) Inserts 10 at the front:

Deque state: [10]

- 2. INSERTREAR() \(\rightarrow\) Inserts 20 at the rear:

Deque state: [10, 20]

- 3. INSERTFRONT() \(\rightarrow\) Inserts 30 at the front:

Deque state: [30, 10, 20]

- 4. DELETEREAR() \(\rightarrow\) Removes the rear element (20):

Deque state: [30, 10]

- 5. DELETEFRONT() \(\rightarrow\) Removes the front element (30):

Deque state: [10]

- 6. INSERTFRONT() \(\rightarrow\) Inserts 40 at the front:

Deque state: [40, 10]

- 7. INSERTREAR() \(\rightarrow\) Inserts 50 at the rear:

Deque state: [40, 10, 50]

- 8. INSERTFRONT() \(\rightarrow\) Inserts 60 at the front:

Deque state: [60, 40, 10, 50]

- The final sequence of elements in the Deque is: [60, 40, 10, 50].

- Now let us map these values to the corresponding variable labels:

- 60 is represented by D.

- 40 is represented by B.

- 10 is represented by A.

- 50 is represented by C.

- This translates to the sequence: D, B, A, C.


Step 4: Final Answer:

The final sequence of elements in the Deque is D, B, A, C.

Hence, option (A) is the correct choice.
Quick Tip: Trace Deque operations using a simple list on paper:
- Add/remove on the left for FRONT operations.
- Add/remove on the right for REAR operations.
Keep a pointer index on your input sequence (10, 20, 30...}) to remember which number is being enqueued next!


Question 51:

Which attribute is added to display whisker in horizontal direction in the boxplot?

  • (A) vert=True
  • (B) vert="H"
  • (C) vert=False
  • (D) vert=1
Correct Answer: (C) vert=False
View Solution




Step 1: Understanding the Question:

The question asks for the specific parameter/attribute in Matplotlib's boxplot function that allows the user to orient the plot horizontally.

By default, box plots are drawn vertically, but we can change this orientation using a boolean parameter.


Step 2: Key Formula or Approach:

In the Python Matplotlib library, the function matplotlib.pyplot.boxplot() is used to create a box-and-whisker plot.

The parameter vert controls the orientation of the boxplot.

It accepts a boolean value: True for vertical and False for horizontal.


Step 3: Detailed Explanation:

A boxplot is a standardized way of displaying the distribution of data based on a five-number summary: minimum, first quartile (Q1), median, third quartile (Q3), and maximum.

When plotting a boxplot using Matplotlib, the default orientation is vertical because the default value of the vert parameter is True.

When vert is set to True, the box lies vertically, and the whiskers extend up and down along the y-axis.

If we want to display the boxplot horizontally, where the box lies along the x-axis and the whiskers extend left and right, we must set the vert parameter to False.

Other options such as vert="H" or vert=1 are syntactically incorrect or do not produce a horizontal boxplot.

Therefore, using vert=False is the standard way to achieve a horizontal orientation in Matplotlib boxplots.


Step 4: Final Answer:

The correct parameter to render the whiskers and the box in a horizontal direction is vert=False.
Quick Tip: Remember: "vert" is short for "vertical".
Setting it to False naturally switches the boxplot orientation to horizontal.
This is a highly tested parameter in CBSE and CUET exams.


Question 52:

Pandas provide a function __________ to check whether any value is missing or not in the DataFrame.

  • (A) isnull()
  • (B) isnan()
  • (C) isna()
  • (D) ismissing()
Correct Answer: (A) isnull()
View Solution




Step 1: Understanding the Question:

The question asks for the built-in function provided by the Pandas library in Python to check for missing (NaN/Null) values within a DataFrame.

Identifying missing data is a crucial step in data preprocessing and cleaning.


Step 2: Key Formula or Approach:

Pandas provides two primary, identical functions to detect missing values: isnull() and isna().

These functions return a boolean DataFrame of the same shape as the original, where each cell is True if the value is missing, and False otherwise.

In many high school curricula, such as NCERT Informatics Practices, isnull() is the standard function emphasized for this task.


Step 3: Detailed Explanation:

Missing data in Pandas is typically represented by NaN (Not a Number) or None.

To detect these missing values, we can apply the df.isnull() method.

This method scans the entire DataFrame and flags every missing value.

For example, if we have a DataFrame df with some missing values, calling df.isnull() returns True for missing entries and False for valid data.

To get a count of missing values per column, we can chain it with the sum() function: df.isnull().sum().

While isna() is also a valid alias in modern Pandas, isnull() remains the historically preferred and widely taught function in academic syllabus guidelines.

The option isnan() is a NumPy function (numpy.isnan()) and not directly a Pandas DataFrame method, and ismissing() does not exist in Pandas.


Step 4: Final Answer:

Thus, isnull() is the appropriate function to check for missing values in a Pandas DataFrame.
Quick Tip: Both "isnull()" and "isna()" are correct in Python, but always look for "isnull()" first in textbook-aligned exams.
You can chain it with ".sum()" to get the count of nulls easily.


Question 53:

Match the LIST-I with LIST-II

  • (A) A-II, B-I, C-III, D-IV
  • (B) A-I, B-II, C-III, D-IV
  • (C) A-I, B-II, C-IV, D-III
  • (D) A-III, B-IV, C-I, D-II
Correct Answer: (B) A-I, B-II, C-III, D-IV
View Solution




Step 1: Understanding the Question:

The task is to match internet-related applications and terms in List-I with their corresponding correct descriptions in List-II.

We need to carefully analyze each term: HTTP, URL, HTML, and VoIP, and find their respective definitions.


Step 2: Key Formula or Approach:

Let's break down each component:

- HTTP (HyperText Transfer Protocol) is a protocol used for transmitting web pages over the internet.

- URL (Uniform Resource Locator) is the global address of documents and other resources on the World Wide Web.

- HTML (HyperText Markup Language) is the standard markup language used to create and structure web pages.

- VoIP (Voice over Internet Protocol) is a technology that allows voice communication over the broadband internet.


Step 3: Detailed Explanation:

- A. HTTP matches with I: HTTP is indeed the set of rules (protocol) used to retrieve linked web pages (hypertext) across the web.

- B. URL matches with II: URL provides both the exact address (location) and the protocol (mechanism) to access resources on the web.

- C. HTML matches with III: HTML is a standard markup language used to design and format the structure of Web Pages.

- D. VoIP matches with IV: VoIP stands for Voice over IP, which refers to telephony services delivered over broadband internet networks.

Matching these pairs, we get: A-I, B-II, C-III, D-IV, which corresponds to option (B).


Step 4: Final Answer:

The correct option is (B), containing the matches A-I, B-II, C-III, D-IV.
Quick Tip: Use elimination when matching lists.
Matching just "VoIP" with "broadband telephony" (D-IV) can often help eliminate several incorrect choices instantly.


Question 54:

Match the LIST-I with LIST-II

  • (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-III, B-IV, C-I, D-II
Correct Answer: (B) A-II, B-I, C-IV, D-III
View Solution




Step 1: Understanding the Question:

The question requires matching Creative Commons (CC) licenses with their corresponding standard descriptions.

Understanding CC licensing acronyms (BY, SA, ND, NC) is essential here.


Step 2: Key Formula or Approach:

Let us break down the standard Creative Commons abbreviations:

- BY: Attribution (credit must be given to the creator). All CC licenses contain this.

- NC: Non-Commercial (cannot be used for commercial purposes).

- ND: No Derivatives (the work cannot be modified or shared in adapted forms).

- SA: Share Alike (modified versions must be distributed under the same license).


Step 3: Detailed Explanation:

Let's match each license type based on these definitions:

- A. CC BY-SA: This license allows remixing, tweaking, and building upon the work even commercially, provided credit is given and new creations are licensed under identical terms (Share Alike). This matches with description II.

- B. CC BY-ND: This license allows reuse for any purpose, including commercially, but the work cannot be shared with others in an adapted form (No Derivatives). This matches with description I.

- C. CC BY-NC-SA: This license allows remixing, tweaking, and building upon the work non-commercially, as long as credit is given and new creations are licensed identically. This matches with description IV.

- D. CC BY-NC-ND: This is the most restrictive license, allowing only downloading and sharing of the work with credit, without any modifications (No Derivatives) or commercial use (Non-Commercial). This matches with description III.

Thus, the correct match is A-II, B-I, C-IV, D-III, which matches option (B).


Step 4: Final Answer:

The correct option is (B).
Quick Tip: In Creative Commons licensing acronyms:
- ND means "No Derivatives" (cannot adapt).
- NC means "Non-Commercial" (no commercial use).
- SA means "Share Alike" (keep same license).
- BY means "Attribution" (give credit).


Question 55:

Which of the following are single row functions?

A. MAX()

B. SUM()

C. MOD()

D. DAY()

  • (A) A and B only
  • (B) B and D only
  • (C) A and C only
  • (D) C and D only
Correct Answer: (D) C and D only
View Solution




Step 1: Understanding the Question:

The question asks us to identify which of the given SQL functions are single-row (scalar) functions as opposed to multiple-row (aggregate or group) functions.


Step 2: Key Formula or Approach:

In SQL, functions are categorized into two main groups:

1. Single-Row Functions: These functions operate on a single row at a time and return one output value for each row. Examples include numeric, character, and date functions like MOD(), DAY(), ROUND(), UPPER(), etc.

2. Multiple-Row (Aggregate) Functions: These functions operate on groups of rows to return a single summarized result. Examples include SUM(), MAX(), MIN(), AVG(), and COUNT().


Step 3: Detailed Explanation:

Let's analyze each option:

- A. MAX(): This is an aggregate function that finds the maximum value across a set of rows. It is not a single-row function.

- B. SUM(): This is also an aggregate function that calculates the total sum of values in a column across multiple rows. It is not a single-row function.

- C. MOD(): This is a mathematical single-row function that returns the remainder of a division for a specific numeric value in each row. It operates on a single row at a time.

- D. DAY(): This is a date-handling single-row function that extracts the day of the month from a date value in a specific row. It operates on each row individually.

Therefore, C and D are single-row functions, while A and B are aggregate functions.

This leads us to the combination "C and D only", which is option (D).


Step 4: Final Answer:

The correct option is (D), representing single-row functions C and D.
Quick Tip: Aggregate functions (MAX, SUM, AVG, MIN, COUNT) act on multiple rows to give one output.
Single-row functions (MOD, DAY, UPPER) calculate a result for every single row.


Question 56:

__________ method can also be used to change the data values of a row to a particular value.

  • (A) DataFrame.values[]
  • (B) DataFrame.change[]
  • (C) DataFrame.loc[]
  • (D) DataFrame.datavalues[]
Correct Answer: (C) DataFrame.loc[]
View Solution




Step 1: Understanding the Question:

We need to identify which method in Pandas is used to modify or update data values of a specific row or elements in a DataFrame.


Step 2: Key Formula or Approach:

In Pandas, indexers like .loc[] and .iloc[] are used for selecting, slicing, and modifying data.

Specifically, label-based indexing is performed using .loc[], which allows direct assignment of values to specific rows or columns.


Step 3: Detailed Explanation:

The .loc[] indexer is primarily label-based. It allows us to access a group of rows and columns by labels or a boolean array.

When we want to change the values of a specific row, we can index that row using df.loc[row_label] and assign a new value to it.

For example, df.loc['Row_1'] = 10 will change all values in the row with label 'Row_1' to 10.

Let's analyze the other options:

- DataFrame.values is an attribute that returns the raw NumPy representation of the DataFrame; it is not a method used for index assignment in this manner.

- DataFrame.change[] and DataFrame.datavalues[] do not exist in the Pandas library.

Therefore, DataFrame.loc[] is the correct and standard choice for accessing and modifying rows in a DataFrame.


Step 4: Final Answer:

The correct option is (C), which is DataFrame.loc[].
Quick Tip: The ".loc[]" indexer is label-based, while ".iloc[]" is integer-location based.
Both are powerful tools for updating data values dynamically in a DataFrame.


Question 57:

Match the LIST-I with LIST-II

  • (A) A-IV, B-II, C-III, D-I
  • (B) A-I, B-II, C-III, D-IV
  • (C) A-II, B-I, C-IV, D-III
  • (D) A-II, B-IV, C-I, D-III
Correct Answer: (C) A-II, B-I, C-IV, D-III
View Solution




Step 1: Understanding the Question:

The question requires matching different components of Teamwork in List-I with their standard definitions or functional descriptions in List-II.

This is part of the societal impacts and project-based learning module.


Step 2: Key Formula or Approach:

Teamwork consists of key soft skills like Communication, Listening, Sharing, and Respecting.

We can map each component to its actual real-world application in a project team setting.


Step 3: Detailed Explanation:

Let's analyze each match:

- A. Communication: Communication in modern projects involves exchange of information via tools. Thus, "e-mails and telephonic meeting can be done" corresponds to communication. This matches II.

- B. Listen: Listening in a team context means active comprehension to understand the underlying thoughts. Thus, "Understanding the idea" corresponds to listening. This matches I.

- C. Share: Sharing refers to distributing knowledge, skillsets, and experiences among teammates. Thus, "All of the members communicates their expertise and experience among the groups" corresponds to sharing. This matches IV.

- D. Respect: Respecting team members means valuing their diverse perspectives and paying attention to what they say. Thus, "Listening the views of the team members" corresponds to respect. This matches III.

Therefore, the correct matching is A-II, B-I, C-IV, D-III, which corresponds to option (C).


Step 4: Final Answer:

The correct option is (C).
Quick Tip: Teamwork components are highly practical.
Listen matches "Understanding the idea", which represents active listening.
Use this clue to verify the matching sequence quickly.


Question 58:

What is the purpose of JavaScript in a website?

  • (A) It helps to store the data.
  • (B) It makes the website interactive and dynamic.
  • (C) It provides structure to the website.
  • (D) It adds styling to the webpage.
Correct Answer: (B) It makes the website interactive and dynamic.
View Solution




Step 1: Understanding the Question:

The question asks about the primary function or role of JavaScript in web development compared to other technologies.


Step 2: Key Formula or Approach:

A standard website is built using three core frontend technologies:

1. HTML provides the structural foundation of the page.

2. CSS handles the styling, visual appearance, and layout.

3. JavaScript introduces logical behavior, interactivity, and dynamic content updates.


Step 3: Detailed Explanation:

Let's evaluate the functions of each technology to confirm the options:

- Option (A) refers to databases (like SQL or MongoDB) or local storage, not JavaScript's primary frontend role.

- Option (C) describes HTML, which sets the structure of a page using tags.

- Option (D) describes CSS, which controls fonts, colors, and layout styles.

- Option (B) correctly describes JavaScript. It is a client-side scripting language that enables interactive features such as drop-down menus, form validations, interactive maps, animations, and dynamic updates of page content without reloading.

Therefore, the core purpose of JavaScript is making the website interactive and dynamic.


Step 4: Final Answer:

The correct option is (B).
Quick Tip: A quick way to remember web technologies:
- HTML = Structure
- CSS = Styling
- JavaScript = Dynamic Behavior and Interactivity.


Question 59:

In the context of project, where it require many individuals efforts to accomplish a task is known as __________.

  • (A) Teamwork
  • (B) Monitoring
  • (C) Guidance
  • (D) Outcome
Correct Answer: (A) Teamwork
View Solution




Step 1: Understanding the Question:

The question seeks to identify the term used when multiple individuals coordinate their skills and efforts to complete a specific task or project.


Step 2: Key Formula or Approach:

This is a conceptual question related to project management and interpersonal skills.

Let's define the terms:

- Teamwork is the collaborative effort of a group to achieve a common goal.

- Monitoring is the process of tracking project progress.

- Guidance is advice or direction provided by a mentor.

- Outcome is the final result of the project.


Step 3: Detailed Explanation:

When complex projects are executed, they are often too large or multifaceted for a single individual to handle.

Therefore, a team is formed where members split tasks according to their expertise.

The combined effort of these individuals to achieve the set objectives is called teamwork.

Teamwork involves effective communication, dividing labor, supporting one another, and aligning diverse perspectives toward a single vision.

Thus, the collaborative effort described in the prompt is best defined as teamwork.


Step 4: Final Answer:

The correct option is (A), which is Teamwork.
Quick Tip: Collaborative projects require collective efforts.
This collective working format is always defined as "Teamwork".


Question 60:

Which of the following function of Pandas will replaces value by the value before the missing value?

  • (A) df.fillna(method='bfill')
  • (B) df.fillna(method='pad')
  • (C) df.fillna(method='afill')
  • (D) df.fillna(method='fillpad')
Correct Answer: (B) df.fillna(method='pad')
View Solution




Step 1: Understanding the Question:

The question asks about the Pandas function parameter that fills missing values (NaN) with the value that occurs directly before (above) the missing entry in the series or DataFrame column.


Step 2: Key Formula or Approach:

In Pandas, the fillna() method is used to replace null values.

The method parameter specifies how missing values should be propagated:

- ffill or pad: Forward fill (propagates the last valid observation forward to next valid).

- bfill or backfill: Backward fill (propagates the next valid observation backward to previous valid).


Step 3: Detailed Explanation:

When dealing with missing values, a common strategy is to propagate the last known value forward.

This is known as forward filling. In Pandas, this can be achieved using method='pad' (which stands for padding) or method='ffill'.

This replaces any missing value with the non-null value immediately preceding it along the given axis.

Let's look at the options:

- method='bfill' (backward fill) replaces the missing value with the one after (below) it.

- method='pad' is the correct alias for forward filling, which uses the value before the missing value.

- 'afill' and 'fillpad' are not valid parameters in Pandas and will raise a ValueError.

Therefore, df.fillna(method='pad') is the correct syntax.


Step 4: Final Answer:

The correct option is (B), df.fillna(method='pad').
Quick Tip: In missing value treatment, "pad" is synonymous with "ffill" (forward fill).
It copies the previous row's value down to fill the empty space.


Question 61:

What does a left-skewed histogram indicate?

  • (A) The mean is less than the median.
  • (B) The data is evenly distributed.
  • (C) The highest frequency is at the right end.
  • (D) There are no outliers.
Correct Answer: (A) The mean is less than the median.
View Solution




Step 1: Understanding the Question:

The question asks for the statistical implication of a left-skewed (negatively skewed) histogram.

We need to relate the shape of the distribution to the relationship between its mean, median, and mode.


Step 2: Key Formula or Approach:

A left-skewed distribution has a long left tail.

Mathematically, for skewed distributions:

- Right-skewed (positive skew): \(Mean > Median > Mode\)

- Symmetric: \(Mean = Median = Mode\)

- Left-skewed (negative skew): \(Mean < Median < Mode\)


Step 3: Detailed Explanation:

In a left-skewed histogram, the majority of the data observations are concentrated on the right side of the distribution, with a tail stretching out to the left (towards lower values).

Because the long tail contains extremely low values (outliers on the lower end), these low values pull the mean downwards more than they affect the median.

Consequently, the mean becomes smaller than the median.

The median represents the 50th percentile of the data and remains relatively robust to these extreme low values.

Therefore, a key and definitive mathematical property of a left-skewed distribution is that the mean is less than the median (\(Mean < Median\)).

Option (B) describes a symmetric distribution.

Option (C) says highest frequency is at the right end, which is visually typical but is not the strict mathematical definition of skewness like the mean-median relationship.

Thus, option (A) is the most standard, precise mathematical answer.


Step 4: Final Answer:

The correct option is (A), which states that the mean is less than the median.
Quick Tip: For skewed distributions, remember the inequality order:
- Left-Skewed: Mean \(<\) Median \(<\) Mode.
- Right-Skewed: Mode \(<\) Median \(<\) Mean.
The median is always in the middle.


Question 62:

Which property can be used to fill to each hist with pattern in histogram?

  • (A) explode
  • (B) fill
  • (C) patch
  • (D) hatch
Correct Answer: (D) hatch
View Solution




Step 1: Understanding the Question:

The question asks which property or parameter in Matplotlib plotting (such as histograms) is used to fill the bars with a pattern (like stripes, dots, or cross-hatching) instead of a solid color.


Step 2: Key Formula or Approach:

In Python's Matplotlib library, the hatch parameter is used to apply fill patterns to patches (including bars in bar charts and histograms).

The pattern is specified as a string containing characters like '/', '
', '|', '-', '+', 'x', 'o', 'O', '.', '*'.


Step 3: Detailed Explanation:

When visualizing data using histograms via plt.hist(), each bar is represented by a rectangle patch.

By default, these patches are filled with a solid color.

To distinguish between multiple distributions in black-and-white printing or for better accessibility, we can apply cross-hatching patterns using the hatch keyword argument.

For example: plt.hist(data, hatch='/') will fill the bars with diagonal stripes.

Let's analyze the other options:

- explode is used in pie charts to separate a slice from the center.

- fill is a boolean property indicating whether to fill the patch with color.

- patch is the class of shape objects but not a pattern property itself.

Thus, hatch is the correct property.


Step 4: Final Answer:

The correct option is (D), which is hatch.
Quick Tip: Hatching uses characters like slashes or dots to add patterns.
It is useful for creating accessible, black-and-white friendly visualizations.


Question 63:

Arrange the following steps of project based learning:

A. Guidance and Monitoring

B. Defining a plan

C. Identification of project

D. Outcome of project

  • (A) C, B, A, D
  • (B) A, B, C, D
  • (C) B, A, D, C
  • (D) C, B, D, A
Correct Answer: (A) C, B, A, D
View Solution




Step 1: Understanding the Question:

This question requires arranging the phases of Project-Based Learning (PBL) in their correct chronological order.


Step 2: Key Formula or Approach:

The standard lifecycle of any educational or software project consists of:

1. Selection/Identification of the problem statement.

2. Planning/Designing the solution.

3. Development/Execution, where progress is guided and monitored.

4. Delivering the final outcome/results.


Step 3: Detailed Explanation:

Let's map the given steps:

- First step: C (Identification of project): Before starting any project, we must identify the topic, scope, and objective.

- Second step: B (Defining a plan): Once the project is identified, the team creates a detailed plan, allocates resources, and sets a timeline.

- Third step: A (Guidance and Monitoring): During the project execution phase, teachers/mentors provide ongoing guidance, and progress is continuously monitored.

- Fourth step: D (Outcome of project): Finally, the project is completed, and the results, reports, or working models are presented as the outcome.

This sequence is C \(\rightarrow\) B \(\rightarrow\) A \(\rightarrow\) D, which corresponds to option (A).


Step 4: Final Answer:

The correct option is (A).
Quick Tip: All projects must start with "Identification" (C) and end with "Outcome" (D).
This simple boundary rule allows you to immediately identify the correct sequence.


Question 64:

How do you select rows from a DataFrame 'df' where the 'Salary' column is greater than 50000?

  • (A) df.select\_rows("Salary\(>\)50000")
  • (B) df[df['Salary'] \(>\) 50000]
  • (C) df["Salary\(>\)50000"]
  • (D) df.rows("Salary\(>\)50000")
Correct Answer: (B) df[df['Salary'] \(>\) 50000]
View Solution




Step 1: Understanding the Question:

The question asks for the correct syntax to filter or select rows from a Pandas DataFrame named df based on a condition applied to the 'Salary' column.


Step 2: Key Formula or Approach:

In Pandas, boolean indexing is the standard method for filtering rows.

The syntax is df[condition], where condition is a boolean series created by applying a comparison operator to a column, such as df['column_name'] > value.


Step 3: Detailed Explanation:

Let's analyze the syntax:

- df['Salary'] > 50000 evaluates to a series of boolean values (True or False) for every row in the DataFrame, indicating whether the 'Salary' is greater than 50000.

- Placing this boolean series inside the square brackets of the DataFrame, i.e., df[df['Salary'] > 50000], filters the rows. Pandas retains only those rows where the boolean condition is True.

- Let's check other options:

- df.select_rows() is not a valid Pandas DataFrame method.

- df["Salary>50000"] attempts to access a column named exactly "Salary>50000", which does not exist and will raise a KeyError.

- df.rows() is also not a valid Pandas method.

Therefore, the correct and standard Pandas syntax is option (B).


Step 4: Final Answer:

The correct option is (B).
Quick Tip: Boolean indexing is formatted as: df[df['column\_name'] condition].
Remember to write the dataframe name twice to filter rows properly.


Question 65:

In case of plots in Python, Marker "3" describes __________.

  • (A) tri\_right
  • (B) tri\_left
  • (C) tri\_down
  • (D) tri\_up
Correct Answer: (B) tri\_left
View Solution




Step 1: Understanding the Question:

The question is about the marker styles in Matplotlib plots. Specifically, it asks what the string marker "3" represents in Matplotlib's plot styling.


Step 2: Key Formula or Approach:

Matplotlib has a list of pre-defined marker styles used to highlight individual data points in line plots and scatter plots.

The numerical characters 1, 2, 3, and 4 are used to specify triangular shapes facing different directions:

- 1 represents tri_down (triangle pointing downwards).

- 2 represents tri_up (triangle pointing upwards).

- 3 represents tri_left (triangle pointing to the left).

- 4 represents tri_right (triangle pointing to the right).


Step 3: Detailed Explanation:

When plotting a chart using Matplotlib, we can specify the marker style using the marker keyword argument.

For example: plt.plot(x, y, marker='3') will mark each data point with a left-pointing triangle (tri_left).

Similarly, marker='1' draws a downward-pointing triangle, marker='2' draws an upward-pointing triangle, and marker='4' draws a right-pointing triangle.

These are also referred to as tri-markers in Matplotlib documentation.

Hence, marker "3" represents tri_left.


Step 4: Final Answer:

The correct option is (B).
Quick Tip: Matplotlib numeric markers for triangles are easy to memorize:
- 1 = tri\_down, 2 = tri\_up, 3 = tri\_left, 4 = tri\_right.
Just follow the counterclockwise rotation starting from down.


Question 66:

Arrange the steps required to read data from a MySQL database to a DataFrame:

A. pip install pymysql

B. pip install sqlalchemy

C. pandas.read_sql_query(query, sql_conn)

D. engine=create_engine('driver://username:password@host/name_of_database', index=false)

  • (A) A, B, D, C
  • (B) B, C, A, D
  • (C) B, A, C, D
  • (D) C, B, D, A
Correct Answer: (A) A, B, D, C
View Solution




Step 1: Understanding the Question:

The question asks us to order the steps required to establish a connection with a MySQL database in Python, extract data using a query, and load it into a Pandas DataFrame.


Step 2: Key Formula or Approach:

Before writing code, we must ensure that the necessary libraries are installed.

The workflow for database connectivity in Python using Pandas is:

1. Install database driver (pymysql) and ORM/Connection engine (sqlalchemy).

2. Create the database connection engine using create_engine.

3. Execute the SQL query and load the result into a DataFrame using pd.read_sql_query().


Step 3: Detailed Explanation:

Let's sequence the steps:

- Step 1 (A \& B): We must install the third-party dependencies. pymysql serves as the MySQL database driver for Python, and sqlalchemy is the SQL toolkit. Therefore, we run pip install pymysql (A) and pip install sqlalchemy (B).

- Step 2 (D): In Python code, we import create_engine from sqlalchemy and configure the database connection URI to instantiate an engine. Thus, engine = create_engine(...) is established (D).

- Step 3 (C): We pass our SQL query and connection engine object to pandas.read_sql_query() to fetch the table as a DataFrame (C).

Thus, the correct logical order is A, B, D, C.


Step 4: Final Answer:

The correct sequence is given by option (A).
Quick Tip: You cannot write code using libraries before installing them.
Therefore, "pip install" commands (A and B) must always come first in the workflow.


Question 67:

Which function is used to sort a Pandas DataFrame in descending order based on a column?

  • (A) df.sort\_values(by='column\_name', ascending=False)
  • (B) df.sort(by='column\_name', order='desc')
  • (C) df.order\_by('column\_name', reverse=True)
  • (D) df.sort\_data('column\_name', descending=True)
Correct Answer: (A) df.sort\_values(by='column\_name', ascending=False)
View Solution




Step 1: Understanding the Question:

The question asks for the correct Pandas method and arguments to sort the rows of a DataFrame in descending order based on values in a specified column.


Step 2: Key Formula or Approach:

In Pandas, the function sort_values() is the built-in method to sort a DataFrame.

The key parameters are:

- by: Specifies the column name(s) to sort by.

- ascending: A boolean parameter. Setting it to False sorts the data in descending order. By default, it is True.


Step 3: Detailed Explanation:

Let's evaluate the options:

- Option (A) uses the correct method sort_values() with the parameters by='column_name' and ascending=False. This is the standard, modern Pandas syntax.

- Option (B) uses df.sort(), which is deprecated in modern Pandas versions, and the parameters order='desc' are incorrect.

- Option (C) uses df.order_by(), which is not a valid Pandas DataFrame function (it is SQL or Django ORM syntax).

- Option (D) uses df.sort_data(), which does not exist in Pandas.

Thus, option (A) is the only correct syntax.


Step 4: Final Answer:

The correct option is (A).
Quick Tip: The parameter "ascending=False" is standard across SQL and Pandas.
Make sure to use the exact function "sort\_values" instead of "sort".


Question 68:

Which function is used to get the quartiles from a dataframe 'df'?

  • (A) df.quartile()
  • (B) df.pivot()
  • (C) df.quantile()
  • (D) df.qt()
Correct Answer: (C) df.quantile()
View Solution




Step 1: Understanding the Question:

The question asks for the built-in Pandas DataFrame function that calculates quartiles (or general quantiles) of numerical columns in a DataFrame.


Step 2: Key Formula or Approach:

A quartile divides data into four equal parts (25th, 50th, and 75th percentiles).

Pandas provides the quantile() function, which computes the values at the given quantile(s) over a specified axis.

To find quartiles, we can pass a list of values like [0.25, 0.5, 0.75] to the quantile() method.


Step 3: Detailed Explanation:

Let's examine the options:

- df.quartile(): Though intuitive, there is no function called quartile() in Pandas.

- df.pivot(): This method is used to reshape the DataFrame based on column values (pivoting), not for statistical summaries.

- df.quantile(): This is the correct function. By default, df.quantile(0.5) returns the median (50th percentile). To get the first, second, and third quartiles, we can execute df.quantile([0.25, 0.5, 0.75]).

- df.qt(): This is not a valid Pandas method.

Therefore, option (C) is the correct answer.


Step 4: Final Answer:

The correct option is (C).
Quick Tip: Quantiles are calculated via the ".quantile()" function.
Passing a list like [0.25, 0.5, 0.75] calculates all three quartiles at once.


Question 69:

__________ is the global network of computing devices.

  • (A) HTML
  • (B) Internet
  • (C) Protocol
  • (D) VoIP
Correct Answer: (B) Internet
View Solution




Step 1: Understanding the Question:

The question asks for the fundamental definition of the global system of interconnected computer networks that communicate with each other.


Step 2: Key Formula or Approach:

This is a basic computer networking concept.

We can define the terms provided in the options:

- HTML is a language for structuring web pages.

- Internet is a global network connecting millions of computing devices.

- Protocol is a set of rules governing data communication.

- VoIP is a technology for making voice calls over the internet.


Step 3: Detailed Explanation:

The Internet is a global network of billions of computers and other electronic devices.

With the Internet, it is possible to access almost any information, communicate with anyone else in the world, and do much more.

It uses the standard Internet Protocol Suite (TCP/IP) to link devices worldwide.

It is a network of networks that consists of private, public, academic, business, and government networks of local to global scope.

Hence, "Internet" is the most appropriate term that fills the blank.


Step 4: Final Answer:

The correct option is (B).
Quick Tip: The global network of computing devices is always the Internet.
Be careful not to confuse it with individual protocols like HTML or VoIP.


Question 70:

Recent cyber crime that include locking a person out of his/her own device until a payment is made can be termed as __________.

  • (A) Identity theft
  • (B) Phishing
  • (C) Ransomware
  • (D) Spamming
Correct Answer: (C) Ransomware
View Solution




Step 1: Understanding the Question:

The question asks for the specific term used to describe a cyber attack where malicious software encrypts user files or locks them out of their device, demanding money to restore access.


Step 2: Key Formula or Approach:

This relates to cyber security and different forms of malware:

- Identity theft: Stealing personal information to commit fraud under another identity.

- Phishing: Fraudulent attempts to obtain sensitive information like passwords by posing as a trustworthy entity.

- Ransomware: Malware that holds a computer system or data hostage in exchange for a ransom payment.

- Spamming: Sending unsolicited bulk messages.


Step 3: Detailed Explanation:

Ransomware is a type of malware from cryptovirology that threatens to publish the victim's personal data or perpetually block access to it unless a ransom is paid.

Common forms of ransomware encrypt the victim's files, making them inaccessible, and demand a financial payout (often in cryptocurrency like Bitcoin) to decrypt them.

Some simple locker ransomware may just lock the system screen and display a demand note without encrypting files.

Since the prompt specifically refers to locking a person out of their device until a payment is made, this matches the definition of Ransomware.


Step 4: Final Answer:

The correct option is (C).
Quick Tip: "Ransom" payment is the defining feature of Ransomware.
This simple keyword mapping makes cybercrime questions very easy to solve.


Question 71:

__________ gives the transpose of a DataFrame.

  • (A) DataFrame.TP
  • (B) DataFrame.Trans
  • (C) DataFrame.T
  • (D) DataFrame.Transpose
Correct Answer: (C) DataFrame.T
View Solution




Step 1: Understanding the Question:

The question asks for the specific attribute in Pandas that is used to get the transpose of a DataFrame (swapping rows and columns).


Step 2: Key Formula or Approach:

In linear algebra and data analysis, transposing a matrix or data table swaps its rows with its columns.

In Pandas, the transpose of a DataFrame can be accessed using the property .T or the method .transpose().


Step 3: Detailed Explanation:

Let's analyze the properties of a Pandas DataFrame:

- df.T is an accessor property that transposes the index and columns of the DataFrame.

- It is equivalent to calling df.transpose(), but the attribute .T is much more common and concise.

Let's evaluate the options:

- DataFrame.TP is invalid.

- DataFrame.Trans is invalid.

- DataFrame.T is the correct attribute.

- DataFrame.Transpose starts with an uppercase 'T', which is incorrect (it should be lowercase transpose() as a function call with parentheses). Thus, the exact attribute match is DataFrame.T.

Therefore, option (C) is the correct answer.


Step 4: Final Answer:

The correct option is (C).
Quick Tip: In Pandas, ".T" is a quick attribute, while ".transpose()" is a full method.
Both perform the exact same mathematical transposition of axes.


Question 72:

Which SQL query correctly filters out groups with a total sales amount greater than 10,000?

  • (A) SELECT CustomerID, SUM(Sales) FROM Orders WHERE SUM(Sales) \(>\) 10000 GROUP BY CustomerID;
  • (B) SELECT CustomerID, SUM(Sales) FROM Orders GROUP BY CustomerID ORDER BY SUM(Sales) \(>\) 10000;
  • (C) SELECT CustomerID, SUM(Sales) FROM Orders GROUP BY CustomerID HAVING SUM(Sales) \(>\) 10000;
  • (D) SELECT CustomerID, SUM(Sales) FROM Orders WHERE Sales \(>\) 10000 GROUP BY CustomerID;
Correct Answer: (C) SELECT CustomerID, SUM(Sales) FROM Orders GROUP BY CustomerID HAVING SUM(Sales) \(>\) 10000;
View Solution




Step 1: Understanding the Question:

The question asks us to identify the correct SQL query that aggregates order data by CustomerID and applies a filter on the aggregated sum of sales.

Specifically, we want to retrieve only those customer groups where the total sum of their sales exceeds 10,000.


Step 2: Key Formula or Approach:

In SQL, row-level filtering and group-level filtering are handled by two distinct clauses:

1. The WHERE clause is used to filter individual rows before any grouping occurs.

2. The HAVING clause is used to filter group results after the GROUP BY clause has aggregated the rows.

Aggregate functions like SUM(), AVG(), and COUNT() cannot be evaluated inside a WHERE clause.


Step 3: Detailed Explanation:

Let us evaluate each of the given SQL query options:

- Option (A) attempts to place SUM(Sales) \(>\) 10000 inside the WHERE clause. This will result in a syntax error because aggregate values are computed after grouping, whereas the WHERE clause executes before grouping.

- Option (B) uses ORDER BY SUM(Sales) \(>\) 10000. This performs a sorting operation based on a boolean condition rather than filtering out records.

- Option (C) groups the rows by CustomerID first, computes the aggregate SUM(Sales) for each group, and then correctly applies the HAVING SUM(Sales) \(>\) 10000 filter. This is the syntactically correct and standard method to filter grouped data.

- Option (D) filters individual sales transactions that are greater than 10,000 before grouping, which is not the same as filtering groups with a total combined sales sum greater than 10,000.

Thus, option (C) is the only valid query that achieves the desired result.


Step 4: Final Answer:

The correct query is option (C), which employs the HAVING clause alongside the GROUP BY statement.
Quick Tip: Remember the execution order of an SQL query:
FROM \(\rightarrow\) WHERE \(\rightarrow\) GROUP BY \(\rightarrow\) HAVING \(\rightarrow\) SELECT \(\rightarrow\) ORDER BY.
Since WHERE executes before GROUP BY, it can never evaluate aggregate functions.


Question 73:

Match the LIST-I with LIST-II

  • (A) A-III, B-II, C-IV, D-I
  • (B) A-I, B-II, C-III, D-IV
  • (C) A-II, B-III, C-I, D-IV
  • (D) A-I, B-IV, C-III, D-II
Correct Answer: (B) A-I, B-II, C-III, D-IV
View Solution




Step 1: Understanding the Question:

The question asks us to match different SQL clauses listed in List-I with their accurate functional descriptions provided in List-II.

A thorough understanding of basic SQL commands is required to make the correct associations.


Step 2: Key Formula or Approach:

Let's analyze the purpose of each SQL clause:

- GROUP BY: Groups rows that share a common attribute value together into summary rows.

- HAVING: Applies conditional filters on these grouped summary rows.

- ORDER BY: Sorts the resulting records in ascending or descending order.

- WHERE: Filters individual records before any grouping is performed.


Step 3: Detailed Explanation:

Let's match each clause to its description:

- A. GROUP BY matches with I: Description I states "Is used to fetch some rows on the basis of common values in a column," which aligns with grouping related elements.

- B. HAVING matches with II: Description II states "Is used to specify conditions on rows with Group By clause," which defines the exact role of the HAVING clause.

- C. ORDER BY matches with III: Description III states "Is used to display data in an ordered form," which is the purpose of sorting records with ORDER BY.

- D. WHERE matches with IV: Description IV states "Is used to retrieve data that meets certain conditions," which describes row filtering prior to aggregation.

This matching results in the sequence: A-I, B-II, C-III, D-IV.

Looking at the options, this matches perfectly with option (B).


Step 4: Final Answer:

The correct matching sequence is represented by option (B).
Quick Tip: An easy way to solve match-the-following questions is to start with the most obvious clause.
ORDER BY is always used for sorting or ordering data, matching C to III.
This immediately helps eliminate incorrect choices.


Question 74:

With reference to the parameter header of pd.read_csv(), which of the parameter values allow the column names to be inferred from the first line of csv file?

A. header = 1

B. header = 0

C. header = True

D. header = False

  • (A) A and D only
  • (B) B and C only
  • (C) B only
  • (D) C only
Correct Answer: (C) B only
View Solution




Step 1: Understanding the Question:

The question asks which value of the header parameter in the pandas.read_csv() function enables Pandas to automatically read and infer column header names from the first line of a CSV file.


Step 2: Key Formula or Approach:

The pd.read_csv() function has a parameter named header.

It accepts integers, list of integers, or None.

By default, header=0, which means the first row (index 0) of the CSV file contains the column names and should be used to infer them.


Step 3: Detailed Explanation:

Let's analyze the parameter choices:

- header=0 (B) is the standard value. Row index 0 (the first line of the file) is parsed as the header, and column names are extracted from it.

- header=1 (A) would imply that row index 1 (the second line of the file) is used as the header, causing the first row of data to be completely ignored.

- Passing boolean values like True (C) or False (D) to the header parameter is syntactically invalid in Pandas and will cause unexpected behavior or raise a TypeError.

Thus, only statement B (header=0) is correct.

This corresponds to option (C) which states "B only".


Step 4: Final Answer:

The correct option is (C), signifying that only statement B is correct.
Quick Tip: In Pandas, row indexing starts at 0.
Therefore, the first row of a file is represented by index 0.
Setting header=None tells Pandas that the file has no headers, and it assigns default numerical column names.


Question 75:

Which of the following describes plagiarism?

  • (A) Creating original content based on inspiration
  • (B) Copying someone else's work without giving proper credit
  • (C) Modifying open-source software legally
  • (D) Sharing content under a Creative Commons license
Correct Answer: (B) Copying someone else's work without giving proper credit
View Solution




Step 1: Understanding the Question:

The question asks for the correct definition of "plagiarism" in the context of cyber ethics, intellectual property rights, and academic honesty.


Step 2: Key Formula or Approach:

Plagiarism is defined as taking someone else's intellectual work, ideas, or language and presenting them as one's own without appropriate citation, attribution, or acknowledgment of the original creator.


Step 3: Detailed Explanation:

Let us evaluate each of the options:

- Option (A), "Creating original content based on inspiration," represents standard creative practice. Inspiration is not intellectual theft, so this is not plagiarism.

- Option (B), "Copying someone else's work without giving proper credit," is the precise definition of plagiarism. It violates copyright and ethical standards.

- Option (C), "Modifying open-source software legally," refers to working within the boundaries of open-source license agreements, which is completely legal and ethical.

- Option (D), "Sharing content under a Creative Commons license," is a legal way of distributing intellectual property with specific, clear permissions.

Thus, only option (B) accurately describes plagiarism.


Step 4: Final Answer:

The correct option is (B).
Quick Tip: To avoid plagiarism in research or project reports, always use citations and references.
Always cite the original author's name, book, or website whenever quoting external information.


Question 76:

Which of the following operation combines tuples from two relations resulting in all pairs of rows from the two input relations, regardless of whether or not they have the same values on common attributes?

  • (A) Union
  • (B) Cartesian Product
  • (C) Join
  • (D) Intersection
Correct Answer: (B) Cartesian Product
View Solution




Step 1: Understanding the Question:

We need to identify the relational algebra operation that pairs every row of one relation with every row of another, without checking for any match on common attribute values.


Step 2: Key Formula or Approach:

Let us review the fundamental database operations:

- Union: Combines rows from two relations that are union-compatible (same schema).

- Cartesian Product (denoted as \(R \times S\)): Generates all possible ordered pairs of tuples from relation \(R\) and \(S\).

- Join: Combines matching rows based on a specific predicate.

- Intersection: Yields only the rows that exist in both relations.


Step 3: Detailed Explanation:

The Cartesian Product operation does not look at the actual values of attributes.

If relation \(R\) has \(m\) rows and relation \(S\) has \(n\) rows, the Cartesian Product will always yield \(m \times n\) rows.

Each tuple of \(R\) is paired with every tuple of \(S\) sequentially.

Joins, such as Equi-Join or Natural Join, only combine those tuples that share matching values on their common attributes.

Therefore, the operation that creates all possible pairs of rows regardless of common attributes is the Cartesian Product.

Thus, Option (B) is correct.


Step 4: Final Answer:

The correct option is (B).
Quick Tip: For Cartesian Product (\(R \times S\)):
- Cardinality (Number of rows) = \(Cardinality(R) \times Cardinality(S)\).
- Degree (Number of columns) = \(Degree(R) + Degree(S)\).
This is a standard calculation tested in exams.


Question 77:

What will be the output of the following code?

>>> seriesCapCntry = pd.Series(['NewDelhi', 'WashingtonDC', 'London', 'Paris'], index=['India', 'USA', 'UK', 'France'])

>>> seriesCapCntry[1:3]

  • (A) 1
  • (B) 2
  • (C) 3
  • (D) 4
Correct Answer: (A) 1
View Solution




Step 1: Understanding the Question:

The question asks for the resulting output when slicing a Pandas Series object using positional integer index slices.


Step 2: Key Formula or Approach:

In Pandas, when slicing a Series using positional indexing (series[start:stop]), the slice is inclusive of the start index and exclusive of the stop index.

The indices correspond to positions:

- Position 0: 'India' \(\rightarrow\) 'NewDelhi'

- Position 1: 'USA' \(\rightarrow\) 'WashingtonDC'

- Position 2: 'UK' \(\rightarrow\) 'London'

- Position 3: 'France' \(\rightarrow\) 'Paris'


Step 3: Detailed Explanation:

The slice expression is seriesCapCntry[1:3].

This extracts elements starting at position 1 up to (but not including) position 3.

The positions selected are 1 and 2.

At position 1, the index label is 'USA' and the value is 'WashingtonDC'.

At position 2, the index label is 'UK' and the value is 'London'.

Pandas displays Series slices with both their index labels and their associated values.

Thus, the printed output will show:

USA WashingtonDC

UK London

This matches option (A).


Step 4: Final Answer:

The correct output of the positional slicing is option (A).
Quick Tip: Remember: positional slicing [1:3] in Python is exclusive of the end index (stops at 2).
However, label-based slicing ['USA':'UK'] is inclusive of the end label!
Paying attention to the type of indices in slices prevents silly mistakes.


Question 78:

For the DataFrame (df) given below, which of the following are correct ways to access column 'Texas'?




A. df['Texas']

B. df('Texas')

C. df.Texas

D. df.['Texas']

  • (A) B and D only
  • (B) A and C only
  • (C) B, C and D only
  • (D) A, B and C only
Correct Answer: (B) A and C only
View Solution




Step 1: Understanding the Question:

The question asks us to identify the correct syntax in Pandas to retrieve or access a single column named 'Texas' from a given DataFrame df.


Step 2: Key Formula or Approach:

In Pandas, there are two primary syntaxes to access a single column of a DataFrame:

1. Dictionary-like notation: df['column_name']

2. Attribute notation: df.column_name (this works only if the column name is a valid Python identifier and doesn't conflict with existing DataFrame method names).


Step 3: Detailed Explanation:

Let's analyze the statements:

- A. df['Texas']: This is correct. It uses dictionary-like square bracket notation to access the column label.

- B. df('Texas'): This is incorrect. DataFrames are not callable functions; using parentheses will raise a TypeError.

- C. df.Texas: This is correct. It uses attribute notation, which is valid since 'Texas' contains no spaces and is a valid identifier.

- D. df.['Texas']: This is incorrect. Combining attribute dot notation with square brackets is invalid Python syntax and will throw a SyntaxError.

Therefore, options A and C are the only correct ways.

This matches option (B).


Step 4: Final Answer:

The correct option is (B), meaning A and C only.
Quick Tip: While dot notation (df.Texas) is shorter to type, bracket notation (df['Texas']) is safer because it works even if column names contain spaces or special characters.


Question 79:

What does the df.isnull().sum() function do in Pandas?

  • (A) It finds the number of NaN values corresponding to each attribute.
  • (B) It fills the number of NaN values with average value in the DataFrame.
  • (C) It checks if there are any NaN values in the DataFrame.
  • (D) It fills NaN values with zeros in the DataFrame.
Correct Answer: (A) It finds the number of NaN values corresponding to each attribute.
View Solution




Step 1: Understanding the Question:

The question asks for the exact function and behavior of the chained Pandas command df.isnull().sum().


Step 2: Key Formula or Approach:

The method works in two distinct steps:

1. df.isnull() maps every cell in the DataFrame to True if it is missing (NaN) and False otherwise.

2. Chaining .sum() on this boolean DataFrame aggregates the results. In Python, True is treated as 1 and False is treated as 0. By default, it sums along the columns (axis=0), giving the count of missing values per column.


Step 3: Detailed Explanation:

Let's analyze the options:

- Option (A) states "It finds the number of NaN values corresponding to each attribute." This is correct. Summing the booleans column-wise directly gives the count of nulls in each attribute (column).

- Option (B) describes data imputation with the mean, which is done using df.fillna(df.mean()).

- Option (C) refers to checking if any NaN exists anywhere, which is typically done using df.isnull().any() or df.isnull().values.any().

- Option (D) describes filling NaNs with zero, which is executed using df.fillna(0).

Thus, option (A) is the correct statement.


Step 4: Final Answer:

The correct option is (A).
Quick Tip: To get the total count of missing values in the entire DataFrame instead of column-wise, you can chain sum twice:
df.isnull().sum().sum()


Question 80:

Arrange the following steps in working of a dynamic web page:

A. HTTP response

B. An Application program handles HTTP requests

C. The program executes and produces HTML output

D. HTTP request

  • (A) A, B, C, D
  • (B) D, B, A, C
  • (C) D, A, B, C
  • (D) D, B, C, A
Correct Answer: (D) D, B, C, A
View Solution




Step 1: Understanding the Question:

The question asks us to order the steps detailing how a web server processes and renders a dynamic web page to a client in response to their action.


Step 2: Key Formula or Approach:

Dynamic web page creation follows a standard client-server request-response lifecycle:

1. Client initiates the interaction by sending a request.

2. Server handles the request and runs server-side scripts or database queries.

3. The server program generates a raw HTML document dynamically.

4. The server packs this HTML and transmits it back as a response.


Step 3: Detailed Explanation:

Let us arrange the given steps chronologically:

- First step (D - HTTP request): The client browser requests a page by sending an HTTP request across the internet to the server.

- Second step (B - An Application program handles HTTP requests): The web server receives the request and forwards it to an application program (like Python, PHP, or Java) to process the logical request.

- Third step (C - The program executes and produces HTML output): The application program executes business logic, fetches database records if required, and generates the resulting HTML markup.

- Fourth step (A - HTTP response): The web server wraps this dynamic HTML inside an HTTP response and sends it back to the client's browser.

Thus, the correct logical order is D \(\rightarrow\) B \(\rightarrow\) C \(\rightarrow\) A.

This corresponds to option (D).


Step 4: Final Answer:

The correct order is given by option (D).
Quick Tip: Every web interaction begins with a client "Request" (D) and ends with a server "Response" (A).
This simple paradigm immediately narrows down the options to those ending with A.


Question 81:

In the context of Project based learning, the following question has to be solved-

What is the total population, total male population and total female population aged 10 to 24 in India?

Arrange the following solution steps to accomplish the same:

A. Read CSV file and check the shape of the DataFrame.

B. Identify the columns and the number of rows that you wants to use for plotting.

C. Create a new DataFrame containing the filtered data and Group data as per the requirement.

D. Plot data for the DataFrame.

  • (A) A, B, C, D
  • (B) D, B, C, A
  • (C) B, A, D, C
  • (D) C, B, D, A
Correct Answer: (A) A, B, C, D
View Solution




Step 1: Understanding the Question:

The question asks to chronologically order the steps involved in a typical data analysis and plotting workflow when solving a real-world statistical problem in Python.


Step 2: Key Formula or Approach:

A standard, logical data analysis cycle using Pandas and Matplotlib is structured as:

1. Data Acquisition: Load data and check its format.

2. Data Inspection: Identify relevant columns and rows.

3. Data Processing: Filter and aggregate (group) the target datasets.

4. Data Visualization: Plot the processed data for interpretation.


Step 3: Detailed Explanation:

Let's map the given steps:

- Step 1: A (Read CSV and check shape): Before performing any analysis, the CSV file must be loaded using pd.read_csv(), and we check its layout using df.shape to verify the data is read correctly.

- Step 2: B (Identify columns and rows): We inspect the column labels (e.g., 'Age', 'Gender', 'Population') to determine which attributes are needed.

- Step 3: C (Filter and Group): We filter the age range between 10 and 24, and group the population by gender or other criteria to get totals.

- Step 4: D (Plot data): Finally, we visualize the aggregated numbers using charts like bar plots or line graphs.

Thus, the correct logical order is A \(\rightarrow\) B \(\rightarrow\) C \(\rightarrow\) D.

This corresponds to option (A).


Step 4: Final Answer:

The correct order is option (A).
Quick Tip: Visualization is always the final step of a data science task.
Thus, "Plot data" (D) must occur at the end of the pipeline, which makes option (A) the logical choice.


Question 82:

Which of the following is a benefit of Free and Open Source Software (FOSS)?

  • (A) High licensing fees
  • (B) Inability to modify the software
  • (C) Community collaboration and ongoing improvements
  • (D) Restricted access to the source code
Correct Answer: (C) Community collaboration and ongoing improvements
View Solution




Step 1: Understanding the Question:

The question asks us to identify a correct advantage or benefit of Free and Open Source Software (FOSS) from the given options.


Step 2: Key Formula or Approach:

FOSS refers to software that is licensed to grant users the freedom to run, study, share, modify, and improve its source code.

Its key characteristics include transparent source code, no licensing costs, and collaborative developmental communities.


Step 3: Detailed Explanation:

Let us evaluate each of the given options:

- Option (A), "High licensing fees," is incorrect. FOSS is usually free of licensing costs, unlike proprietary commercial software.

- Option (B), "Inability to modify the software," is incorrect. The core freedom of FOSS is the right to modify code to suit specific needs.

- Option (C), "Community collaboration and ongoing improvements," is a primary benefit. Because the source code is public, developers worldwide collaborate to fix bugs, add features, and optimize performance continuously.

- Option (D), "Restricted access to the source code," is incorrect. FOSS guarantees unrestricted access to source code.

Thus, option (C) is the only correct benefit of FOSS.


Step 4: Final Answer:

The correct option is (C).
Quick Tip: Linux, Python, Mozilla Firefox, and VLC Media Player are popular examples of FOSS.
Remembering these real-world examples helps in answering descriptive questions about FOSS.


Question 83:

How can you display percentage values inside a pie chart in Matplotlib?

  • (A) Use the autopct="%1.1f%%" argument in plt.pie()
  • (B) Enable show\_labels=True in plt.pie()
  • (C) Add percentage="on" inside plt.pie()
  • (D) It is not possible to display percentages inside slices
Correct Answer: (A) Use the autopct="%1.1f%%" argument in plt.pie()
View Solution




Step 1: Understanding the Question:

The question asks for the correct Matplotlib keyword argument used to calculate and format the percentages shown inside each wedge of a pie chart.


Step 2: Key Formula or Approach:

In Matplotlib, the plt.pie() function has an argument called autopct (automatic percentage formatting).

This argument accepts a string formatter or a function that calculates and styles the numerical value on the plot.

The format string "%1.1f%%" indicates that the percentage should be displayed as a floating-point number with one decimal place.


Step 3: Detailed Explanation:

Let us examine the options:

- Option (A) is correct. The argument autopct="%1.1f%%" tells Matplotlib to auto-calculate percentages and print them using string formatting. The double percentage signs %% are used to escape and display a literal '%' symbol on the chart.

- Option (B), show_labels=True, does not exist in plt.pie(). Labels are passed using the labels parameter.

- Option (C), percentage="on", is a non-existent parameter.

- Option (D) is incorrect because Matplotlib fully supports showing percentages inside the slices.

Thus, option (A) is the only valid, correct choice.


Step 4: Final Answer:

The correct parameter to display percentages is autopct="%1.1f%%", represented by option (A).
Quick Tip: The "1.1f" in "%1.1f%%" formats the number as a float with 1 digit after the decimal point.
To show no decimal digits (e.g. 25% instead of 25.0%), use "%1.0f%%".


Question 84:

To show a forecast of a stock performance throughout the year, which plot is most suitable?

  • (A) Scatter Plot
  • (B) Bar Plot
  • (C) Box Plot
  • (D) Line Plot
Correct Answer: (D) Line Plot
View Solution




Step 1: Understanding the Question:

We need to select the most appropriate plot type to visualize the trend, fluctuation, and performance of stock prices continuously tracked throughout a year.


Step 2: Key Formula or Approach:

Different plots have specific applications:

- Scatter Plot: Used for showing relationships/correlation between two variables.

- Bar Plot: Used for discrete comparison between different categories.

- Box Plot: Used for analyzing data distribution and identifying outliers.

- Line Plot: Used for showing trends and changes in values over a continuous period (time-series data).


Step 3: Detailed Explanation:

Stock price data is sequential and continuous time-series data.

To understand stock performance, we look for trends like growth, decline, and volatility over days, weeks, and months.

A Line Plot connects individual data points with straight lines.

This visual flow makes it exceptionally easy to track whether prices are trending upwards or downwards over time.

While scatter plots show individual points, they do not emphasize sequence, and bar charts look cluttered with 365 daily points.

Hence, a Line Plot is the universally accepted and most suitable chart for displaying financial market trendlines and forecasting.

Thus, option (D) is correct.


Step 4: Final Answer:

The correct option is (D).
Quick Tip: Whenever you see terms like "trends", "over time", "chronological", or "throughout the year", the answer is almost always a Line Plot.


Question 85:

What is the best way to verify the legitimacy of an email claiming to be from your bank?

  • (A) Clicking on any links in the email to check their authenticity.
  • (B) Contacting the bank directly using their official website or phone number.
  • (C) Replying to the email and asking for proof of legitimacy.
  • (D) Downloading and running any attachments in the email.
Correct Answer: (B) Contacting the bank directly using their official website or phone number.
View Solution




Step 1: Understanding the Question:

The question asks for the safest cyber security practice to verify whether an email claiming to be from a bank is genuine or a malicious phishing attempt.


Step 2: Key Formula or Approach:

Phishing is a social engineering attack where malicious actors impersonate trusted organizations (like banks) to steal user credentials, credit card details, or install malware.

Security rules advise users to avoid trusting links, attachments, or contact details enclosed within suspicious messages.


Step 3: Detailed Explanation:

Let us evaluate each of the given choices:

- Option (A), "Clicking on any links," is highly dangerous. Phishing links lead to fake login portals that capture passwords or trigger drive-by malware downloads.

- Option (B), "Contacting the bank directly using their official website or phone number," is the best practice. By independently looking up the bank's contact details, you bypass the phishing channel and get authentic confirmation from bank staff.

- Option (C), "Replying to the email," is unsafe. You are interacting with the attacker, who will simply falsify proofs of legitimacy to trick you further.

- Option (D), "Downloading and running attachments," is extremely risky because attachments in phishing emails often contain spyware, trojans, or ransomware.

Therefore, option (B) is the safest and most effective method.


Step 4: Final Answer:

The correct option is (B).
Quick Tip: Banks never ask for sensitive personal information, PINs, or passwords over emails.
Always verify details using an independent, trusted channel.

CUET UG 2026 Exam Pattern

Parameter Details
Exam Name Common University Entrance Test (CUET UG) 2026
Conducting Body National Testing Agency (NTA)
Exam Mode Computer-Based Test (CBT)
Exam Duration 60 minutes per test
Total Sections 3 (Languages, Domain Subjects, General Test)
Question Type Multiple Choice Questions (MCQs)
Questions per Test 50 questions (all compulsory)
Marking Scheme +5 for correct, -1 for incorrect
Maximum Marks 250 marks per test
Maximum Subject Choices 5 subjects in total
Syllabus Base Class 12 NCERT (mainly for Domain Subjects)

CUET UG 2026 Paper Analysis