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

Computer Science: CUET Mock Test - 1 - CUET MCQ


Test Description

30 Questions MCQ Test CUET Mock Test Series - Computer Science: CUET Mock Test - 1

Computer Science: CUET Mock Test - 1 for CUET 2024 is part of CUET Mock Test Series preparation. The Computer Science: CUET Mock Test - 1 questions and answers have been prepared according to the CUET exam syllabus.The Computer Science: CUET Mock Test - 1 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 - 1 below.
Solutions of Computer Science: CUET Mock Test - 1 questions in English are available as part of our CUET Mock Test Series for CUET & Computer Science: CUET Mock Test - 1 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 - 1 | 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 - 1 - Question 1

Python is a/an ______based language.

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

Python is an interpreted, object-oriented, high-level programming language with dynamic semantics.

Computer Science: CUET Mock Test - 1 - Question 2

What do we use to define a block of code in Python language?

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

Python uses indentations to define blocks of code. Indentations are simply spaces or tabs used as an indicator that is part of the indent code child, as used in curly braces C, C++, and Java.

1 Crore+ students have signed up on EduRev. Have you? Download the App
Computer Science: CUET Mock Test - 1 - Question 3

Referential integrity constraint in a relational database is specified with the help of a _________.

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

A foreign key is a field (or collection of fields) in one table, that refers to the primary key in another table. The table with the foreign key is called the child table, and the table with the primary key is called the referenced or parent table.

Computer Science: CUET Mock Test - 1 - Question 4

Which among the following SQL commands does not fall under the category of data manipulation language?

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

CREATE command is a data definition language command but not a data manipulation command. Data manipulation command is used to manipulate the data of those tables that are created by Data definition languages.

Computer Science: CUET Mock Test - 1 - Question 5

Which of the following networking components is called a three-layer switch?

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

This networking component is called a three-layer switch. It can operate at the physical, data link and network layers. A layer 3 switch combines the functionality of a switch and a router. It acts as a switch to connect devices that are on the same subnet or virtual LAN at lightning speeds and has IP routing intelligence built into it to double up as a router.

Computer Science: CUET Mock Test - 1 - Question 6

Which of the following operators cannot be used with string data type?

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

Operator ''/'' can not be used with string data type.

Computer Science: CUET Mock Test - 1 - Question 7

To read the next line of the file from a file object infile, we use ____________.

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

The readlines() method returns a list containing each line in the file as a list item. The hint parameter is used to limit the number of lines returned. If the total number of bytes returned exceeds the specified number, no more lines are returned.

Computer Science: CUET Mock Test - 1 - Question 8

Which of the following is correctly evaluated for this function?
pow(x,y,z)

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

The built-in function pow() can accept two or three arguments. When it takes in two arguments, they are evaluated as x**y. When it takes in three arguments, they are evaluated as (x**y)%z.

Computer Science: CUET Mock Test - 1 - Question 9

Which of the following is false regarding the loops in Python?

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

'While loop' is used when multiple statements are to be executed repeatedly until the given condition becomes false.
Python 'While loop' is used to execute a block of statements repeatedly until a given condition is satisfied. And when the condition becomes false, the line immediately after the loop in the program is executed. 'While loop' falls under the category of indefinite iteration.

Computer Science: CUET Mock Test - 1 - Question 10

Which of the following statements is true?

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

Pickle in Python is primarily used in serializing and deserializing of a Python object structure. In other words, it's the process of converting a Python object into a byte stream to store it in a file/database, maintain program state across sessions, or transport data over the network.

Computer Science: CUET Mock Test - 1 - Question 11

Insertions take place at the rear end of the queue and deletions take place at the 'front' end of the queues. On which principal does this work?

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

In linear queue, an insertion takes place from one end while the deletion occurs from another end. The end at which the insertion takes place is known as the rear end, and the end at which the deletion takes place is known as the front end.

Computer Science: CUET Mock Test - 1 - Question 12

What is the significance of the tell() method?

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

The tell() method returns the current position of file object. This method takes no parameters and returns an integer value. Initially file pointer points to the beginning of the file (if not opened in append mode). So, the initial value of tell() is zero.

Computer Science: CUET Mock Test - 1 - Question 13

Computers manipulate data in many ways, this manipulation is called _____.

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

Processing is any computer program that is not a control program, such as an application program, or a non-controlling part of the operating system, such as a sort-merge program or language translator.

Computer Science: CUET Mock Test - 1 - Question 14

What are the two advantages of database management system?

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

Data base security and integrity are two advantages of the data base management system. Central control also ensures that adapted checks are incorporated.

Computer Science: CUET Mock Test - 1 - Question 15

Which method is used to protect online images from hackers?

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

A firewall is an essential piece of security software that monitors all incoming and outgoing traffic going through your network, checking for hackers, malware, unauthorized outgoing information, or anything that might put you or your PC at risk. Firewalls are often the first line of defense when protecting your data.

Computer Science: CUET Mock Test - 1 - Question 16

_________ switching is well suited for voice communication while _________switching is better suited for data and other non-voice communication.

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

In-circuit switching when the source does not have enough data to transmit, the resources are unnecessarily kept idle. To avoid such situation, Message switching is used.
Circuit Switching is a switching technique method that establishes a dedicated path between the sender and the receiver to send the data. The example of a Circuit-switch network is a telephone network.

Computer Science: CUET Mock Test - 1 - Question 17

Consider a declaration, L = (1, 'Python', '3.14').
Which of the following represents the data type of L?

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

A tuple is almost like a List and contains python objects and objects inside are separated by comma (,) and enclosed within parentheses.
Example:
list1 = (6.25, 'brinjal', 'onion', 'beans')
list1 is a tuple.

Computer Science: CUET Mock Test - 1 - Question 18

Which of the following file modes is not valid?

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

File mode r+, w+, or a+ may be to perform both read and write operations using a single file object.

Computer Science: CUET Mock Test - 1 - Question 19

Radha Shah is a programmer, who has recently been given a task to write a python code to perform the following CSV file operations with the help of two user defined functions/modules:

a. CSVOpen() : to create a CSV file called BOOKS.CSV in append mode containing information of books – Title, Author, and Price.
b. CSVRead() : to display the records from the CSV file called BOOKS.CSV where the field title starts with 'R'.

She has succeeded in writing partial code and has missed out certain statements, so she has left certain queries in comment lines.
import csv
def CSVOpen():
with open('books.csv','______',newline='') as csvf:
#Statement-1
cw=______ #Statement-2
______ #Statement-3
cw.writerow(['Rapunzel','Jack',300])
cw.writerow(['Barbie','Doll',900])
cw.writerow(['Johnny','Jane',280])
def CSVRead():

Q. Choose the appropriate mode in which the file is to be opened in append mode (Statement 1).

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

Mode 'a' opens a file for appending. The file pointer is placed at the end of the file, if the file exists. If the file does not exist, it creates a new file for writing.

Computer Science: CUET Mock Test - 1 - Question 20

Radha Shah is a programmer, who has recently been given a task to write a python code to perform the following CSV file operations with the help of two user defined functions/modules:

a. CSVOpen() : to create a CSV file called BOOKS.CSV in append mode containing information of books – Title, Author, and Price.
b. CSVRead() : to display the records from the CSV file called BOOKS.CSV where the field title starts with 'R'.

She has succeeded in writing partial code and has missed out certain statements, so she has left certain queries in comment lines.
import csv
def CSVOpen():
with open('books.csv','______',newline='') as csvf:
#Statement-1
cw=______ #Statement-2
______ #Statement-3
cw.writerow(['Rapunzel','Jack',300])
cw.writerow(['Barbie','Doll',900])
cw.writerow(['Johnny','Jane',280])
def CSVRead():

Q. Choose the correct option for Statement 3 to write the names of the column headings in the CSV file, BOOKS.CSV.

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

Correct code for statement 3 is cw.writerow (['Title', 'Author', 'Price']) where, Title, Author and Price are the columns. writerow () method is used to write single row at a time.

Computer Science: CUET Mock Test - 1 - Question 21

Radha Shah is a programmer, who has recently been given a task to write a python code to perform the following CSV file operations with the help of two user defined functions/modules:

a. CSVOpen() : to create a CSV file called BOOKS.CSV in append mode containing information of books – Title, Author, and Price.
b. CSVRead() : to display the records from the CSV file called BOOKS.CSV where the field title starts with 'R'.

She has succeeded in writing partial code and has missed out certain statements, so she has left certain queries in comment lines.
import csv
def CSVOpen():
with open('books.csv','______',newline='') as csvf:
#Statement-1
cw=______ #Statement-2
______ #Statement-3
cw.writerow(['Rapunzel','Jack',300])
cw.writerow(['Barbie','Doll',900])
cw.writerow(['Johnny','Jane',280])
def CSVRead():

Q. Fill in the appropriate statement to check the field Title starting with 'R' for Statement 3 in the above program.

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

Title is the first column of CSV file, so its index would be r [0] [0]. Condition to check the field Title starting with 'R' will be r[0][0] = 'R'.

Computer Science: CUET Mock Test - 1 - Question 22

Radha Shah is a programmer, who has recently been given a task to write a python code to perform the following CSV file operations with the help of two user defined functions/modules:

a. CSVOpen() : to create a CSV file called BOOKS.CSV in append mode containing information of books – Title, Author, and Price.
b. CSVRead() : to display the records from the CSV file called BOOKS.CSV where the field title starts with 'R'.

She has succeeded in writing partial code and has missed out certain statements, so she has left certain queries in comment lines.
import csv
def CSVOpen():
with open('books.csv','______',newline='') as csvf:
#Statement-1
cw=______ #Statement-2
______ #Statement-3
cw.writerow(['Rapunzel','Jack',300])
cw.writerow(['Barbie','Doll',900])
cw.writerow(['Johnny','Jane',280])
def CSVRead():

Q. Which statement will be used to create a CSV writer object in Statement 2?

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

csv. writer is used to insert data to the CSV file. This class returns a writer object which is responsible for converting the user's data into a delimited string.
Syntax CSV.writer (CSVfile)
In statement 2, missing code is CSV. writer (csvf) where, csvf is CSV file.

Computer Science: CUET Mock Test - 1 - Question 23

Radha Shah is a programmer, who has recently been given a task to write a python code to perform the following CSV file operations with the help of two user defined functions/modules:

a. CSVOpen() : to create a CSV file called BOOKS.CSV in append mode containing information of books – Title, Author, and Price.
b. CSVRead() : to display the records from the CSV file called BOOKS.CSV where the field title starts with 'R'.

She has succeeded in writing partial code and has missed out certain statements, so she has left certain queries in comment lines.
import csv
def CSVOpen():
with open('books.csv','______',newline='') as csvf:
#Statement-1
cw=______ #Statement-2
______ #Statement-3
cw.writerow(['Rapunzel','Jack',300])
cw.writerow(['Barbie','Doll',900])
cw.writerow(['Johnny','Jane',280])
def CSVRead():

Q. Which statement will be used to create a CSV writer object in Statement 2?

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

csv. writer is used to insert data to the CSV file. This class returns a writer object which is responsible for converting the user's data into a delimited string.
Syntax CSV.writer (CSVfile)
In statement 2, missing code is CSV. writer (csvf) where, csvf is CSV file.

Computer Science: CUET Mock Test - 1 - Question 24

Which of the following terms are used to protects Intellectual Property?

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

Intellectual property rights:

  • Intellectual property rights (IPR) refer to the legal rights given to the inventor or creator to protect his invention or creation for a certain period of time. Intellectual Property is legally protected through patents, trademarks, copyrights, trade secrets, etc.​ 

Copyright:

  • Copyright grants legal rights to creators for their original works like writing, photograph, audio recordings, video, sculptures, architectural works, computer software, and other creative works like literary and artistic work. 

Patent:

  • A patent is usually granted for inventions. Unlike copyright, the inventor needs to apply (file) for patenting the invention.

Trademark:

  • A trademark includes any visual symbol, word, name, design, slogan, label, etc., that distinguishes the brand or commercial enterprise, from other brands or commercial enterprises.

Hence the correct answer is All the above.

Computer Science: CUET Mock Test - 1 - Question 25

When executing the given Python code, which of the following exceptions will occur?
a = 10
b = 0
c = a/b
print(c)

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

Concept:
The given code is,
a = 10
b = 0
c = a/b
print(c)
A number must be divided by another number that is not zero. If we write a simple program that divides an integer by zero, the Python interpreter will throw a ZeroDivisionError. This error will occur if the division denominator is set to zero.
Hence it throws the ZeroDivisionError.
Hence the correct answer is ZeroDivisionError.

Computer Science: CUET Mock Test - 1 - Question 26

Which of the following is not a built-in exceptions in Python?

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

Concept:
Built-in exceptions are the exceptions that are available in Python libraries. These exceptions are suitable to explain certain error situations. Some of the commonly occurring built-in exceptions are SyntaxError, ValueError, IOError, KeyboardInterrupt, ImportError, EOFError, ZeroDivisionError, IndexError, NameError, IndentationError, TypeError,and OverFlowerror.

ZeroDivisionError:
It is raised when the denominator in a division operation is zero.

OverFlowError:
It is raised when the result of a calculation exceeds the maximum limit for the numeric data type.

KeyboardInterrupt:
It is raised when the user accidentally hits the Delete or Esc key while executing a program due to which the normal flow of the program is interrupted.

SyntaxError:
It is raised when there is an error in the syntax of the Python code.

ValueError:
It is raised when a built-in method or operation receives an argument that has the right data type but mismatched or inappropriate values.

IOError:
It is raised when the file specified in a program statement cannot be opened.

ImportError:
It is raised when the requested module definition is not found.

EOFError:
It is raised when the end of the file condition is reached without reading any data by input().

Hence the correct answer is None of the above.

Computer Science: CUET Mock Test - 1 - Question 27

Consider the following array and what is the status of the array after the fourth pass when we use the insertion sort?

Array Elements: 20, 16, 12, 8, 4, 1

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

Concept:
Insertion sort:
Insertion sort is a basic sorting algorithm that operates in the same manner that you arrange cards in your hands. The array is divided into two halves, one sorted and one not. Values from the unsorted section are selected and placed in the sorted section at the appropriate location.
The given array is,
Input: 20, 16, 12, 8, 4, 1
Output:1, 4, 8, 12, 16, 20

Pass 1:
Consider the key is 16 and move the elements of array index 1 to 0
swaps are required because 20 is greater than 16.
Swap the elements 20 and 16
16, 20, 12, 8, 4, 1
No swaps are required because till array 1 index is sorted in order.
16, 20, 12, 8, 4, 1
Total swaps are = 1

Pass 2:
Consider the key is 12 and move the elements of array index 2 to 0
swaps are required because 20 is greater than 12.
Swap the elements 20 and 12
16, 12, 20, 8, 4, 1
swaps are required because 16 is greater than 12.
Swap the elements 16 and 12
12, 16, 20, 8, 4, 1
No swaps are required because till the array 2 index is sorted in order.
12, 16, 20, 8, 4, 1
Total swaps are=3

Pass 3:
Consider the key is 8 and move the elements of array index 3 to 0
swaps are required because 20 is greater than 8.
Swap the elements 20 and 8
12, 16, 8, 20, 4, 1
swaps are required because 16 is greater than 8.
Swap the elements 16 and 8
12, 8, 16, 20, 4, 1
swaps are required because 12 is greater than 8.
Swap the elements 12 and 8
8, 12, 16, 20, 4, 1
No swaps are required because till array 3 index is sorted in order.
8, 12, 16, 20, 4, 1
Total swaps are=6

Pass 4:
Consider the key is 4 and move the elements of array index 4 to 0
swaps are required because 20 is greater than 4.
Swap the elements 20 and 4
8, 12, 16, 4, 20, 1
swaps are required because 16 is greater than 4.
Swap the elements 16 and 4
8, 12, 4, 16, 20, 1
swaps are required because 12 is greater than 4.
Swap the elements 12 and 4
8, 4, 12, 16, 20, 1
swaps are required because 8 is greater than 4.
Swap the elements 8 and 4
4, 8, 12, 16, 20, 1
No swaps are required because till array 4 index is sorted in order.
4, 8, 12, 16, 20, 1
Total swaps are=10

Pass 5:
Consider the key is 1 and move the elements of array index 5 to 0
swaps are required because 20 is greater than 1.
Swap the elements 20 and 1
4, 8, 12, 16, 1, 20
swaps are required because 16 is greater than 1.
Swap the elements 16 and 1
4, 8, 12, 1, 16, 20
swaps are required because 12 is greater than 1.
Swap the elements 12 and 1
4, 8, 1, 12, 16, 20
swaps are required because 8 is greater than 1.
Swap the elements 8 and 1
4, 1, 8, 12, 16, 20
swaps are required because 4 is greater than 1.
Swap the elements 4 and 1
1, 4, 8, 12, 16, 20
No swaps are required because till array 5 index is sorted in order.
1, 4, 8, 12, 16, 20
Total swaps are=15
The sorted array is
1, 4, 8, 12, 16, 20
Hence the correct answer is 4, 8, 12, 16, 20, 1.

Computer Science: CUET Mock Test - 1 - Question 28

Let us consider a list of numbers (34, 16, 2, 93, 80, 77, 51) and has table size is 10. What is the order of elements(from index 0 to size-1) in the hash table? 

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

Concept:
Hashing:

Hashing is the process of employing an algorithm to turn any length of input into a fixed-size string or integer. The principle behind hashing is to utilize a hash function to transform a given key to a smaller integer, which is then used as an index in a hash table.
A simple hash function that works with numeric values is known as the remainder method. It takes an element from a list and divides it by the size of the hash table. The remainder so generated is called the hash value.
h(element) = element % size(hash table)
The given data,
list of numbers (34, 16, 2, 93, 80, 77, 51) and has a table size is 10.

The hash table is,

The remaining index stores the null values.
Hence the correct answer is 80, 51, 2, 93, 34, null, 16, 77, null, null.

Computer Science: CUET Mock Test - 1 - Question 29

The elements 9, 5, 7, and 2 are in the queue and are eliminated one by one. The order of elements received is __________?

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

Concept:
Queue:

  • The queue is an abstract data structure, somewhat similar to Stacks.
  • Insertion in a queue happens at the rear end and deletion happens at the front end.
  • Unlike stacks, a queue is open at both ends. One end is always used to insert data (en queue) and the other is used to remove data (de queue). Queue follows the First-In-First-Out methodology, i.e., the data item stored first will be accessed first.
  • Queue follows the principle of First In First Out (FIFO) and Last In Last Out (LILO)

Queue follows the principle of First In First Out so the element which comes first popped first. The poped elements order is 9, 5, 7, and 2.

Hence the correct answer is 9, 5, 7, and 2.

Computer Science: CUET Mock Test - 1 - Question 30

Consider the following real-life example. 
If a person uses someone’s song as background music in his/her music video then could be an act a person is an example of:

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

The correct answer is option 1.

Concept:
​Copyright Infringement:

The unauthorized use of someone else's copyrighted work is called copyright infringement. As a result, it is the unauthorized use of another person's copyrighted work, infringing on the copyright holder's rights to reproduce, distribute, exhibit, or perform the protected work.

Consider the following real-life example. 
If a person uses someone’s song as background music in his/her music video then could be an act a person is an example of copyright infringement. 

  • Copyright infringement occurs when a third party infringes on the copyright holder's rights, such as the exclusive use of a work for a specified period of time.
  • Music and movies are two of the most well-known kinds of entertainment that are subjected to substantial copyright violations. Infringement lawsuits may result in contingent liabilities, or funds set aside in the event of a lawsuit.

Hence the correct answer is Copyright Infringement.

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

Top Courses for CUET

Download as PDF

Top Courses for CUET