CUET Exam  >  CUET Tests  >  CUET UG Mock Test Series 2026  >  Computer Science: CUET Mock Test - 9 - CUET MCQ

Computer Science: CUET Mock Test - 9 - CUET MCQ


Test Description

30 Questions MCQ Test CUET UG Mock Test Series 2026 - Computer Science: CUET Mock Test - 9

Computer Science: CUET Mock Test - 9 for CUET 2025 is part of CUET UG Mock Test Series 2026 preparation. The Computer Science: CUET Mock Test - 9 questions and answers have been prepared according to the CUET exam syllabus.The Computer Science: CUET Mock Test - 9 MCQs are made for CUET 2025 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Computer Science: CUET Mock Test - 9 below.
Solutions of Computer Science: CUET Mock Test - 9 questions in English are available as part of our CUET UG Mock Test Series 2026 for CUET & Computer Science: CUET Mock Test - 9 solutions in Hindi for CUET UG Mock Test Series 2026 course. Download more important topics, notes, lectures and mock test series for CUET Exam by signing up for free. Attempt Computer Science: CUET Mock Test - 9 | 50 questions in 60 minutes | Mock test for CUET preparation | Free important questions MCQ to study CUET UG Mock Test Series 2026 for CUET Exam | Download free PDF with solutions
Computer Science: CUET Mock Test - 9 - Question 1

Which of the following precedence orders is correct in Python?

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 1

Parentheses, Exponential, Multiplication, Division, Addition, Subtraction
Just remember: PEMDAS, that is, Parenthesis, Exponentiation, Multiplication, Division, Addition, Subtraction. Note that the precedence order of Division and Multiplication is the same.

Computer Science: CUET Mock Test - 9 - Question 2

Rohan starting working on MYSQL server. Kindly arrange the the following commands in a sequence so that he can create a table, then insert a record into it and display all the records.
A. Insert into command
B. Create database ; ;
C. Create table command
D. Use ;
E. Select * from ;
Choose the correct answer from the options given below:

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 2

The correct answer is B D C A E

Key Points

  1. B. Create database: This command establishes a new database within the MySQL server to store your tables. Replace with the desired name for your database (e.g., my_database).
  2. D. Use database: This command tells MySQL to start working within the newly created database. This ensures that all subsequent table creation, insertion, and selection operations occur within that specific database.
  3. C. Create table: This command defines the structure of your table, specifying column names and their data types. You'll need to provide the table name and column definitions (e.g., id INT PRIMARY KEY, name VARCHAR(255)).
  4. A. Insert data: This command adds a new record (row) to the table. You'll specify the column names and corresponding values for the record you want to insert (e.g., INSERT INTO my_table (id, name) VALUES (1, 'John Doe')).
  5. E. Select data: This command retrieves data from the table. You can use SELECT * to get all columns or specify individual column names. The FROM clause indicates the table you want to select data from.

Example:
B.
Create database; my_database; -- Create a database named "my_database"
D. Use my_database; -- Use the "my_database"
C. CREATE TABLE customers ( -- Create a table named "customers" id INT PRIMARY KEY, -- Column "id" as integer, primary key name VARCHAR(255) -- Column "name" as string (up to 255 characters) );
A. INSERT INTO customers (id, name) -- Insert a record into "customers" VALUES (1, 'Alice'); -- id: 1, name: 'Alice'
E. SELECT * FROM customers; -- Select all data from "customers"

By following this sequence, Rohan can effectively create a table, insert data, and view the contents of his database in MySQL.

Computer Science: CUET Mock Test - 9 - Question 3

_________ is not a DDL command.

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 3

The correct answer is Update

Key Points

  • DDL stands for Data Definition Language.
  • DDL commands are used to define and modify the structure of a database, such as creating or removing tables and specifying the data types of columns.
  • Update is a DML (Data Manipulation Language) command.
  • DML commands are used to manipulate the data within a database, such as inserting, updating, and deleting records.
  • The other options (Drop, Alter, Create) are all DDL commands.

Breakdown of all the options:

  • Drop: This command removes a database object, such as a table.
  • Alter: This command modifies the structure of an existing database object.
  • Update: This command modifies the data within a table. (Not a DDL command it is DML command)
  • Create: This command creates a new database object, such as a table.
Computer Science: CUET Mock Test - 9 - Question 4

Mr. Sameer wants to connect 20 systems, which are present within a single hall. Help him choose the best device out of the following to achieve his purpose.

[Note that the data arriving on any of the lines should be sent to the intended node / receiver only]

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 4

The correct answer is Switch

Key PointsOut of the options you provided, the best device for Mr. Sameer to connect 20 systems within a single hall and ensure data reaches the intended receiver is: 3) Switch

Here's why:

  • Repeater: Repeaters amplify the wireless signal to extend the range of an existing WiFi network. They're not suitable for Mr. Sameer's scenario as he likely wants a wired connection for stability and data transfer speed within the hall.
  • Hub: Hubs are basic devices that simply broadcast any data they receive to all connected devices. This can be inefficient and lead to network congestion, especially with 20 systems. Data wouldn't be sent directly to the intended receiver.
  • Switch: A switch is an intelligent device that learns the MAC addresses of the connected devices and creates a table to direct data only to the intended recipient. This avoids unnecessary traffic and improves network performance.

Switches are commonly used for wired connections within a local area network (LAN) like the one Mr. Sameer wants to create. They offer efficient data transfer and ensure data security by delivering information only to the designated system.

Computer Science: CUET Mock Test - 9 - Question 5

In file mode _________, the file offset position is end of the file.

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 5

The correct answer is a
file modes:

  • г (likely a typo for "r"): Opens a file for reading only. The file offset position is set to the beginning of the file.
  • w: Opens a file for writing only. Overwrites the existing file if it exists, or creates a new file if it doesn't. The file offset position is set to the beginning of the file.
  • w+: Opens a file for both reading and writing. Overwrites the existing file if it exists, or creates a new file if it doesn't. The file offset position is set to the beginning of the file.
  • a: Opens a file for appending new data to the end. Creates a new file if it doesn't exist. The file offset position is set to the end of the file.

Key Points

  • Use "a" mode when you want to add content to a file without overwriting existing data.
  • Use "w" or "w+" when you want to create a new file or overwrite an existing file.
  • The file offset position determines where the next write operation will occur.
Computer Science: CUET Mock Test - 9 - Question 6
Data integrity refers to ______.
Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 6

The correct answer is Accuracy

Key Points

Data Integrity:

  • Data Integrity refers to the characteristics that determine the reliability of the information in terms of its physical and logical validity.
  • Data Integrity is based on parameters such as accuracy, validity, and consistency of the data across its lifecycle.
  • It is the absence of unintended change to the information between two successive updates or modifications to data records.
  • Data Integrity can be considered as a polar opposite to data corruption that renders the information as ineffective in fulfilling desired data requirements.
  • Data integrity can be compromised in a variety of ways, making data integrity practices an essential component of effective enterprise security protocols. Data integrity may be compromised.
    • Human error, whether malicious or unintentional
    • Transfer errors, including unintended alterations or data, compromise during the transfer from one device to another
    • Bugs, viruses/malware, hacking, and other cyber threats
    • Compromised hardware, such as a device or disk crash
    • Physical compromise to devices
    • Since only some of these compromises may be adequately prevented through data security, the case for data backup and duplication becomes critical for ensuring data integrity. Other data integrity best practices include input validation to preclude the entering of invalid data, error detection/data validation to identify errors in data transmission, and security measures such as data loss prevention, access control, data encryption, and more.

Therefore, Data integrity refers to the validity of data.

Computer Science: CUET Mock Test - 9 - Question 7
Which of these are wild card characters ?
Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 7

The correct answer is ?, *

Key Points

The term "wildcard characters" refers to specific symbols that take the place of any character or group of characters in a string.

  • The most common wildcard characters are "*", which represents any number of characters (including none), and "?", which represents exactly one character.
  • "[ ]" are used as wild card expression for a set of characters in regex but not universally recognized as wildcard characters.
  • "*" is a wild card character, it can represent any number of characters. However, "/" is not.
  • both "?" and "*" are wild card characters.
  • Not all of these are wild card characters. For example, "{ }" and "/" are not.

So, the correct answer would be option 3) '?', '*' as these both are universally recognized as wildcard characters.

Computer Science: CUET Mock Test - 9 - Question 8
Which of the following steps is NOT part of the exception handling process?
Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 8

The correct answer is Automatically correcting all programming errors without any additional code.

Key Points

  • The exception handling process involves raising an exception when an error occurs, searching for an appropriate exception handler, and executing the handler's code to manage the error. It does not encompass automatically correcting all errors in the program without any intervention or additional code. Exception handling is about managing errors, not automatically fixing underlying causes.
Computer Science: CUET Mock Test - 9 - Question 9

Which of the following is not an SQL commands category?

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 9

Types of SQL Commands:

  • DDL (Data Definition Language)
  • DML (Data Manipulation Language)
  • DQL (Data Query Language)
  • DCL (Data Control Language)
  • Data administration commands
  • Transaction control commands
Computer Science: CUET Mock Test - 9 - Question 10

What will be the output of the following python code?

x=['ab', 'cd']
for i in x:
x.append(i.upper())
print(x)

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 10

The loop does not terminate as new elements are being added to the list in each iteration.

Computer Science: CUET Mock Test - 9 - Question 11

Secure transfer of data over an unsecured network such as internet can be done using

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 11

Cryptography is the study and practice of techniques for secure communication in the presence of third parties called adversaries. It deals with developing and analyzing protocols which prevents malicious third parties from retrieving information being shared between two entities thereby following the various aspects of information security.

Computer Science: CUET Mock Test - 9 - Question 12

The reverse() method reverses:

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 12

The reverse() method reverses the order of the elements in an array. The reverse() method overwrites the original array.

Computer Science: CUET Mock Test - 9 - Question 13

Consider the usual algorithm for determining whether a sequence of parentheses is balanced. The maximum number of parentheses that appear on the stack AT ANY ONE TIME when the algorithm analyzes: (()(())(()))is:

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 13

A right parenthesis makes pop operation to delete the elements in stack till we get left parenthesis as top most element. 3 elements are there in stack before right parentheses comes. Therefore, maximum number of elements in stack at run time is 3.

Computer Science: CUET Mock Test - 9 - Question 14

Two statements are given below:

Statement I: strings = ['apple', 'banana', 'cherry', 'date']lengths = list(map(lambda s: len(s), strings))print(lengths)# Output: [5, 6, 6, 4]
Statement II: strings = [ 'cherry', 'date', 'apple', 'banana',]lengths = list(map(lambda s: len(s), strings))print(lengths)# Output: [6, 4, 5, 6]

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 14

lengths = list(map(lambda s: len(s), strings))
The above line will count the number of characters in each string and store the result in list lengths. So, in first statement result will be [5,6,6,4] and the result of second statement will be [6,4,5,6].

Computer Science: CUET Mock Test - 9 - Question 15

____ are instructions given by the user to the database also known as statements.

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 15
  • Keywords : They have a special meaning in SQL. They are understood as instructions.
  • Commands : They are instructions given by the user to the database also known as statements.
  • Clauses : They begin with a keyword and consist of keyword and argument.
Computer Science: CUET Mock Test - 9 - Question 16

Match List-I with List-II:

Choose the correct answer from the options given below:

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 16
  • (A) HTTP → (IV) Defines how web browsers and servers communicate to retrieve and display web pages.
  • (B) FTP → (III) Used for transferring files between computers over a network, commonly seen in website file management.
  • (C) IP → (I) A set of rules for data transmission, ensuring that devices on a network are correctly identified and located.
  • (D) Bandwidth → (II) The amount of data that can be transmitted over a network, measured in Hz (Hertz) or bps (bits per second).
Computer Science: CUET Mock Test - 9 - Question 17

Which commands provide definitions for creating table structure, deleting relations and modifying relation schemas?

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 17

DDL commands provide definitions for creating table structure, deleting relations and modifying relation schemas.

Computer Science: CUET Mock Test - 9 - Question 18

Which of the following is/are threat(s)?

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 18

Some of the most common threats include:

  • Malware
  • Viruses
  • Spyware
  • Adware
  • Trojan horses
  • Worms
  • Phishing
  • Spear phishing
Computer Science: CUET Mock Test - 9 - Question 19

A text file student.txt is stored in the storage device. Identify the correct option out of the following to open the file in read mode.
i. myfile = open('student.txt','rb')
ii. myfile = open('student.txt','w')
iii. myfile = open('student.txt','r')
iv. myfile = open('student.txt')

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 19
  • There are some codes to handle a file in a programming language:
  • myfile=open('student. txt', 'w') is the mode that allows opening a file in write mode.
  • myfile=open('student.txt', 'r') is the mode that opens a file in only read mode.
  • myfile= open ('student.txt') also allows opening a file in reading mode.
Computer Science: CUET Mock Test - 9 - Question 20

Which of the following components is/are part(s) of a function header in Python?

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 20

Function Name and Parameter List are parts of a function header in Python.

Computer Science: CUET Mock Test - 9 - Question 21

Which of the following communication channels is established during telephone conversation?

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 21

Full-duplex mode is used when communication in both direction is required all the time. The capacity of the channel, however must be divided between the two directions.
Example: Telephone Network in which there is communication between two persons by a telephone line, through which both can talk and listen at the same time.

Computer Science: CUET Mock Test - 9 - Question 22

Two statements are given below:

Statement I: Purpose of the hue parameter in the seaborn library is to specify the color of the plot.
Statement II: Purpose of the hue parameter in the seaborn library to specify the variable to use for color encoding.

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 22

The hue parameter in the seaborn library is used to specify the variable to use for color encoding. It allows users to create plots with multiple colors based on a categorical variable. For example, if you have a dataset with different species of flowers and you want to create a scatter plot with different colors for each species, you can use the hue parameter to specify the species variable.

Computer Science: CUET Mock Test - 9 - Question 23

Directions: Match the contents under List I with those under List II.

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 23
  • Bar charts are useful for comparing data across categories or groups.
  • Line charts are useful for displaying trends over time or continuous data.
  • Scatter plots are useful for showing the relationship between two variables.
  • Pie charts are useful for showing parts of a whole or percentages.
Computer Science: CUET Mock Test - 9 - Question 24

Which of the following is not a type of computer network?

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 24

Remote Area Network or RAN was a network method that enabled wireless transfer of data via landline, RS232 serial port, cell phone or satellite connections. The Symax 8030 CRM 560 was a Remote Network Interface Module that used this method of linking IO from field devices to local area and remote area networks. The RAN methodlogy is the basis for transmitting data via radio modems.

Computer Science: CUET Mock Test - 9 - Question 25

The writelines() function is used for ___________________.

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 25

Correct option is write a sequence of strings
CONCEPT:
writelines() writes a sequence of strings to the file or a list of strings in an opened file.
Syntax:: 
fileObject.writelines( sequence )

Computer Science: CUET Mock Test - 9 - Question 26

When a particular section of code can raise more than one errors then to handle this __________ number of except block can be possible for one try block.

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 26

Correct option is Multiple

CONCEPT:
Try and Except statement is used to handle errors within our code in Python.
The try block is used to check some code for errors i.e the code inside the try block will execute when there is no error in the program.
Whereas the code inside the except block will execute whenever the program encounters some error in the try block.
A try statement may have more than one except clause, to specify handlers for different exceptions. At most one handler will be executed.

Example:
try:
    //operation which can raise an exception
except OSError:
    print("OS error)
except ValueError:
    print("Could not convert data to an integer.")
except BaseException:
    print("Unexpected")

Computer Science: CUET Mock Test - 9 - Question 27

Which of the following error will be raised by the given Python code:

randomList = ['a', 2, 3]

for element in randomList:
        print("The element is ", element)
        x = int(element+1)
print("The incremeant of ", element, "is", x)

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 27

CONCEPT:
 Type Error occurs when the data type of objects in an operation is inappropriate.
Example dividing an integer with a string.
In the above question, a for loop is executing through the list which tries to increment the value of each element of the list by 1 and store it in variable x.
" x=int(element + 1) " but will result in type error when it tries to increment the element 'a' at index 0 of the list by 1.
This is because 'a' is of type string and we cannot add an integer to a string. 

Computer Science: CUET Mock Test - 9 - Question 28

Which exception is raised when an interpreter does not find the requested module definition?

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 28

The correct answer is option 2.

Concept:
Exception:

An exception is an occurrence that happens during program execution that disturbs the regular flow of the program's instructions. When a Python script finds a condition that it cannot handle, it throws an exception. A Python object that reflects an error is known as an exception.
Option 1:EOFError
False, An EOFError is a Python exception that is thrown when methods like input() and raw input() return end-of-file (EOF) without reading any input. EOFError exception is raised when an interpreter finds the requested module definition.
Option 2:ImportError
True,The ImportError is raised when an import statement has trouble successfully importing the specified module. Typically, such a problem is due to an invalid or incorrect path, which will raise a ModuleNotFoundError in Python 3.6 and newer versions.
Example:
import maths
# Here ImportError exception is raised when an interpreter does not find the requested module definition.
It gives an error like,
Traceback(most recent call last): File "", line 1, in import maths Module, not FoundError: No module named ' maths' 
Option 3: IndexError
False, IndexError is a sort of Python exception produced by the system when the index supplied as subscript does not fall within the range of indices of boundaries of a list. This is a run-time exception that must be handled with a try-catch block.
Option 4:IOError
False, IOError stands for Input/Output Error. It happens when the file, file path, or OS activity we're looking for doesn't exist. For example, if you are performing a runtime action on an existent file and the file disappears from the location, Python will raise an IOError.

Hence the correct answer is ImportError.

Computer Science: CUET Mock Test - 9 - Question 29

Which statement is generally used in the beginning of the function or after a function call to check for valid input?

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 29

Concept:
Exception:

  • An exception is an occurrence that happens during program execution that disturbs the regular flow of the program's instructions. When a Python script finds a condition that it cannot handle, it throws an exception. A Python object that reflects an error is known as an exception.
  • Exception Handlers are programs that are designed to run when a specific exception is thrown.
  • Raising an exception involves stopping the usual flow of program execution and navigating to the exception handler. 
  • Raise and assert statements are used to raise exceptions.
  • Raise is often utilized when an erroneous condition has been recognized or when a condition does not fulfilled. Similar to assert, however, the exception is only triggered if a condition is fulfilled.

​Assert:

  • The assert statement is generally used at the beginning of the function or after a function call to check for valid input.
  • The assert statement accepts an expression as well as an optional message.
  • The assert statement is used to validate the types, values of arguments, and function output.
  • The assert statement is used as a debugging tool since it stops the application when an error occurs.

Syntax:
assert <condition>
assert <condition>,<error message>

Raise:
While they try and except blocks are for handling exceptions, the raise keyword on the contrary is to raise an exception.

Syntax:
raise  {name_of_ the_ exception_class}

Hence the correct answer is assert.

Computer Science: CUET Mock Test - 9 - Question 30

Match List-I with List-II:

Choose the correct answer from the options given below:

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 30
  • (A) Hackers are individuals who gain unauthorized access to systems, sometimes for ethical security testing (white-hat hacking).
  • (B) Crackers are malicious users who break security protections for illegal purposes (black-hat hacking).
  • (C) HTTPS (Hypertext Transfer Protocol Secure) encrypts data transmission to ensure secure communication over the internet.
  • (D) Denial of Service (DoS) attacks flood a system with excessive traffic, making it inaccessible to legitimate users.

Thus, the correct answer is (3) (A) - (III), (B) - (IV), (C) - (I), (D) - (II).

View more questions
39 docs|145 tests
Information about Computer Science: CUET Mock Test - 9 Page
In this test you can find the Exam questions for Computer Science: CUET Mock Test - 9 solved & explained in the simplest way possible. Besides giving Questions and answers for Computer Science: CUET Mock Test - 9, EduRev gives you an ample number of Online tests for practice
Download as PDF