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

Computer Science: CUET Mock Test - 9 - CUET MCQ


Test Description

40 Questions MCQ Test CUET Mock Test Series - Computer Science: CUET Mock Test - 9

Computer Science: CUET Mock Test - 9 for CUET 2024 is part of CUET Mock Test Series 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 2024 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 Mock Test Series for CUET & Computer Science: CUET Mock Test - 9 solutions in Hindi for CUET Mock Test Series 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 | 40 questions in 45 minutes | Mock test for CUET preparation | Free important questions MCQ to study CUET Mock Test Series 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

Which of the following is not an SQL commands category?

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

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
1 Crore+ students have signed up on EduRev. Have you? Download the App
Computer Science: CUET Mock Test - 9 - Question 3

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 3

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

Computer Science: CUET Mock Test - 9 - Question 4

Two statements are given below, one is Assertion (A) and the other is Reason (R). Read the statements carefully and choose the correct answer.

Assertion (A): Queue is a data structure that follows the First-In-First-Out (FIFO) principle.
Reason (R): The last item added to the queue is the first item to be removed from the queue.

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

A queue is a data structure that follows the First-In-First-Out (FIFO) principle. It means the first item added to the queue is the first item to be removed from the queue.

Computer Science: CUET Mock Test - 9 - Question 5

Which set of functions can be used to read or write a file randomly?

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

To access only a particular part of a file, functions such as fseek(), rewind(), and ftell() can be used.

Computer Science: CUET Mock Test - 9 - Question 6

Ram opened a file in a certain mode. After opening the file, he forgot the mode. The interesting facts about that mode are " If the file doesn't exist, then a new file will be created" and "After opening file in that mode, the file handle will be at the end of the file". Help him identify the correct mode.

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

The append mode defines the way in which new data is added to the already existing data. The property can be used with both, import and export operations. During import, new table is created in the target database.

Computer Science: CUET Mock Test - 9 - Question 7

When we open an internet site, we see 'www'. What does 'www' stand for?

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

The World Wide Web—commonly referred to as www, W3, or the web—is an interconnected system of public web pages accessible through the internet.

Computer Science: CUET Mock Test - 9 - Question 8

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 8

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 9

The reverse() method reverses:

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

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 10

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 10

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 11

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 11

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 12

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

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 12
  • 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 13

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

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

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

Computer Science: CUET Mock Test - 9 - Question 14

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

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

Some of the most common threats include:

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

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 15
  • 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 16

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 16

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

Computer Science: CUET Mock Test - 9 - Question 17

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

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

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 18

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 18

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 19

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

Detailed Solution for Computer Science: CUET Mock Test - 9 - Question 19
  • 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 20

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

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

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 21

The writelines() function is used for ___________________.

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

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 22

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 22

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 23

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 23

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 24

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

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

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 25

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 25

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 26

Which of the following statement can be used to display all built in exceptions?

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

CONCEPT:

In Python, there are several built-in exceptions that are raised when errors occur.
To view these built-in exceptions local() function is used which returns a dictionary of the current local symbol table.
dir() is a function that returns a list of the attributes and methods of the object passed to it.

>>> print(dir(locals()['__builtins__']))

Computer Science: CUET Mock Test - 9 - Question 27

Which exception is raised when the index or subscript in a sequence is out of range?

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

CONCEPT:
When we try to access an item using a value that is out of the index range of the list and does not exist then “index out of range” error occurs.
For example, we have a list of 5 elements, the index is in the range of 0 to 4.
list = [18, 12, 33, 42, 15]     {0, 1, 2, 3, 4 }  // are the respective index of the list 
If we try to access index 5 of the list it will result in an IndexError: list index out of range 
as we are trying to access an item using a value that is out of the index range of the list.
In the above question:
Option 1
EOFError // When we ask the user for input using one function input() or raw_input(), but then have not provided any input in the input box results in EOFError.
Option 2 NameError // This error is raised when the identifier is accessed before being defined in the local or global scope.
Option 3 OverFlowError // This error occurs when an arithmetic operation exceeds the limits of the variable type.

Option 4 IndexError // This is the correct option as explained above.

Computer Science: CUET Mock Test - 9 - Question 28

When the processing of file gets over, which statement will automatically close that file?

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

CONCEPT:
In python to read or write a file, we need first to open it and python provides a function open(), which returns a file object.
Using this file object, we can read and write in the file. But in the end, we need to close the file using this same.
If we don’t call the close() function, the file will remain open, and its object will be consuming the memory of our process.
Therefore it is a standard practice to close an open file as a closed file reduces the risk of being unwarrantedly modified or read.
“with statement” creates an execution block and the object created in the with statement will be destroyed or gracefully closed when this execution block ends.

Benefits of calling open() using “with statement”:

  • Fewer chances of bugs due to coding error
  • Open multiple files in a single “with statement”
Computer Science: CUET Mock Test - 9 - Question 29

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

x = 10
y = 20

if (y > x)
  print("y is greater than x")

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

The correct option is Syntax Error

CONCEPT:

Syntax errors occur when the programmer does not follow or makes mistake in the syntax of a particular programming language

Common syntax errors in python:

  • leaving out a keyword.
  • misspelling a keyword.
  • leaving out a symbol, such as a comma, brackets, or colon.
Computer Science: CUET Mock Test - 9 - Question 30

The else clause is raised in try-except-else block execution, when _______________________.

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

Concept:

  • We can put an optional else clause along with the try...except clause.
  • An except block will be executed only if some exception is raised in the try block.
  • But if there is no error then none of the except blocks will be executed. In this case, the statements inside the else clause will be executed.
Computer Science: CUET Mock Test - 9 - Question 31

What is the size of MAC address in bits.

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

Concept:
The MAC address is a unique 12-digit hexadecimal numbers (48 bits in length) hardware address associated with a network adapter card, which is engraved on NIC at the time of manufacturing.
The can be physically identified on the network using its MAC address is a permanent address and cannot be changed under any circumstances it means two devices cannot have the same MAC address.
It is 12-digit hexadecimal numbers (48 bits in length) format on each device and is represented by Colon-Hexadecimal notation.
Example: 00:0b:45:9e:87:46.

Computer Science: CUET Mock Test - 9 - Question 32

LAN can be used as which type of architecture?

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

LAN can be used as Peer-to-Peer architecture and Client and server architecture.

Computer Science: CUET Mock Test - 9 - Question 33

Which of the following devices takes data sent from one network device and forwards it to the destination node based on MAC address?

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

The correct answer is "option C".

  • Switch is a device that takes data sent from one network device and forwards it to the destination node based on MAC address.
  • Switch is a layer 2 device that works using MAC address.
Computer Science: CUET Mock Test - 9 - Question 34

Which of the following is true about a Modem?

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

The correct answer is Modem is a device that modulates/demodulates carrier waves with digital information to transmit the data.

  • A modem or broadband modem is a hardware device that connects a computer or router to a broadband network.
  • Some examples of modems are - cable modems and DSL modems.
  • A modem is a short form for modulator/demodulator.
Computer Science: CUET Mock Test - 9 - Question 35

A host computer that wants to communicate with another host computer on the Internet requires the following to identify itself:

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

The correct answer is IP address.

  • A host computer that wants to communicate with another host computer on the Internet requires an IP address to identify itself.
  • Internet Protocol (IP) address:
    • The address provided to a connection in a network is called IP (Internet Protocol) address.
    • It identifies the connection of a computer on the internet.
    • IPv4 is a 32-bit (4 bytes) address, and IPv6 is a 128-bits (16 bytes) address.
    • An IP address does not uniquely identify a device on a network but, it specifies a particular connection in a network.
    • IP address changes each time a device is connected to the network as it is dynamically allocated to the device when it participates in the network.
Computer Science: CUET Mock Test - 9 - Question 36

In Ethernet networks, each network interface controller has a unique MAC address. MAC stands for _____________.

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

The correct answer is Media Access Control.

  • A Media Access Control (MAC) is a unique identifier assigned to a network interface controller for use as a network address in communications within a network segment.
  • This use is common in most IEEE 802 network technologies, including Ethernet, Wi-fi, and Bluetooth.
  • Every NIC ( Network Interface Controller) has a hardware address that's known as a MAC, for media access control where IP addresses are associated with TCP/IP (networking software).
Computer Science: CUET Mock Test - 9 - Question 37

Which device among the following is used for sending digital data over a phone line ?

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

Modem 

  • It stands for Modulator-Demodulator.
  • It is a device that helps computers send data over the telephone or cable. Hence, Option 4 is correct.
  • A Modem (Modulator-Demodulator) is a hardware component that allows a computer or another device, such as a router or switch, to connect to the Internet.
  • It converts or "modulates" an analog signal from a telephone or cable wire to digital data (1s and 0s) that a computer can recognize.
  • It can also convert digital data from a computer or other device into an analog signal that can be sent over standard telephone lines.

Computer Science: CUET Mock Test - 9 - Question 38

Which of the following device is used to connect similar LAN with same protocols?

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

Concept:

  • The bridge is used to connect similar LANs with the same protocols. A bridge operates at the data link layer. It is also used for interconnecting two LANs working on the same protocol. It has a single input and single output port, thus making it a 2 port device. A bridge must contain addressing and routing capability.
  • A bridge is a network device that joins two or more LANs (local area networks) to build a larger LAN. Network bridging is the process of aggregating networks. A bridge joins the various components to make them appear as if they are all part of the same network.

Hence the correct answer is Bridges.

Computer Science: CUET Mock Test - 9 - Question 39

Which of the following is used to allocate and manage resources for a network?

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

The correct option is B

  • Servers are that provide resources to other computers connected to a Network.
  • The most frequently used shared network environment objects are files, data multimedia, and hardware resources like printers, fax machines, and scanners.
  • A resource allocation process is a method that project managers use to allocate budget, equipment, people, tools, and data to the project areas where it's most needed.
  • It most commonly uses the hypervisor for managing the resources for every virtual system.
Computer Science: CUET Mock Test - 9 - Question 40

Which of the following is a type of computer networks?

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

Concept:
Computer networks:

The collection of autonomous computers interconnected by a single technology is called a computer network. Computers are said to be interconnected if they are able to exchange information.

Networks are categorized on the basis of their size. The three basic categories of computer networks are:

  • Local Area Networks (LAN) are usually limited to a few kilometers in length. It might be privately owned and consist of a network within an office on one of the floors of a building, or it could consist of all the computers in the building.
  • Metropolitan Area Network (MAN) is a network that is between LAN and WAN in size. It is larger than LAN but smaller than WAN. It might be the complete network in a city like Hyderabad.
  • A Wide Area Network (WAN) is a network that connects all networks in a big (geographic) area. A wide area network (WAN) might connect the whole state of Telangana.

Hence the correct answer is All the above.

8 docs|148 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

Up next

Download as PDF

Up next