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

Computer Science: CUET Mock Test - 1 - CUET MCQ


Test Description

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

Computer Science: CUET Mock Test - 1 for CUET 2025 is part of CUET UG Mock Test Series 2026 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 2025 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 UG Mock Test Series 2026 for CUET & Computer Science: CUET Mock Test - 1 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 - 1 | 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 - 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

Given below are two statements:
Statement I. When all the value are sorted in ascending or descending order, the middle value is called mode.
Statement II. Value that appears most number of times in the given data of an attribute / variable is called mode.

In the light of the above statements, choose the correct answer from the options given below:

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

The correct answer is Statement I is incorrect but statement II is true

Key Points

  • The mode is the value that appears most frequently in a set of data, not the middle value when sorted. So, Statement II accurately describes the mode.
Computer Science: CUET Mock Test - 1 - Question 3

Adjacent elements are compared and swapped in ________ sorting technique.

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

The correct answer is Bubble sort

Key Points

  • Bubble sort works by repeatedly comparing adjacent elements and swapping them if they are in the wrong order. This process continues until the list is sorted.

Additional Information

  • Insertion sort: Insertion sort builds the sorted list one element at a time. It compares each element with the sorted portion of the list and inserts it at the correct position.
  • Selection sort: Selection sort finds the minimum (or maximum) element in the unsorted part of the list and swaps it with the first element. This process continues until the list is sorted.
  • Adjacent sort: There is no sorting technique called "adjacent sort."
Computer Science: CUET Mock Test - 1 - Question 4

Which of the following statements are correct for Queue?

A. Queue is an ordered linear data structure

B. Deque can support both stack and queue operations

C. Queue is a non-linear data structure

D. Queue works on FILO principle

E. Deque is a version of Queue which does not allow insertion and deletion at both ends

Choose the correct answer from the options given below:

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

The correct answer is A and B only

Key Points

  • A. Queue is an ordered linear data structure (CORRECT)
    • Queues follow a specific order, adhering to the FIFO (First-In-First-Out) principle.
    • Elements are arranged linearly, one after the other.
  • B. Deque can support both stack and queue operations (CORRECT)
    • Deque (double-ended queue) allows insertion and deletion at both ends, making it flexible.
    • It can mimic stack behavior by performing operations at one designated end.
  • C. Queue is a non-linear data structure (INCORRECT)
    • As mentioned earlier, queues maintain a linear order of elements.
  • D. Queue works on FILO principle (INCORRECT)
    • Queues operate on FIFO, meaning the first element added is the first one removed.
    • FILO (First-In-Last-Out) describes stacks, where the last element added is accessed/removed first.
  • E. Deque is a version of Queue which does not allow insertion and deletion at both ends (INCORRECT)
    • The defining characteristic of a deque is its ability to perform operations at both ends, unlike a standard queue (insertion at rear, deletion from front).

Therefore, the correct answer is 2) A and B only.

Computer Science: CUET Mock Test - 1 - Question 5
The default reference point for file - object. seek(offset, [reference point]) is:
Detailed Solution for Computer Science: CUET Mock Test - 1 - Question 5

The correct answer is 0

Key Points

  • file-object.seek(offset, [reference point]) is a method used to move the file pointer to a specific position within a file.
  • offset is the number of bytes to move the pointer.
  • reference point is an optional argument that specifies where to start the offset count. If omitted, it defaults to 0.

Values for reference point:

  • 0: Seeks from the beginning of the file.
  • 1: Seeks from the current position of the file pointer.
  • 2: Seeks from the end of the file.

Important Points

  • The default reference point of 0 makes it convenient for common scenarios where you want to start seeking from the beginning of the file.
  • Understanding the reference point options allows for precise control over file pointer positioning.
Computer Science: CUET Mock Test - 1 - Question 6

From a text file "myfile.txt", Kriti will read next line through file object Fl using

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

The correct answer is Fl.readline()

Key Points1) Fl.readlines()

  • It reads all lines of the file into a list of strings, not just the next line.
  • It's less efficient if you only need to read one line at a time, as it loads the entire file into memory.

3) Fl.readnext()

  • This method doesn't exist in most programming languages.

4) Fl.read()

  • It reads all the content of the file from the current position to the end as a single string.
  • It's not suitable for reading individual lines separately.

Fl.readline() is specifically designed to read the next line from a file object and return it as a string. It's the most efficient way to read lines sequentially and process them one at a time.

Example:

Important Points

  • Use with open(...) to ensure proper file closing.
  • Call Fl.readline() repeatedly to read lines one by one.
  • Check for empty strings to detect the end of the file.
Computer Science: CUET Mock Test - 1 - Question 7

When does the search for an appropriate exception handler occur in the process of exception handling?

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

The correct answer is After an exception is raised but before it is executed.

Key PointsThe search for an appropriate exception handler occurs after an exception is raised but before the handler’s code is executed. This step is crucial for determining the appropriate course of action to manage or address the error.

Computer Science: CUET Mock Test - 1 - Question 8

What will be the output of the following Python code:

a = 1

if (a = 2):

print("value of a is", a)

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

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....etc.

In Python, assignment using `=` operator is not allowed inside an condition of if statement

The error thrown will be "SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '=' ".

Syntax of if statement in python:

if condition:

# code to execute in case if the above condition is true

Additional Information

IOError is raised when an input/output operation fails.

Computer Science: CUET Mock Test - 1 - Question 9

Match the following SQL functions to their descriptions.

Choose the correct answer from the options given below:

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

The correct answer is A - IV, B - II, C - III, D - I

Key Points

  • A-IV) length() - Returns the number of characters in a string.
  • B-II) lower() - Converts all characters in a string to lowercase.
  • C-III) concat() - Concatenates two or more strings into one string.
  • D-I) position() - Finds the position of a substring within a string.

Each function in SQL has a specific purpose regarding string manipulation.

  • length() is used to determine the length of a string, telling us how many characters it contains.
  • lower() is utilized to convert every character in a string to its lowercase variant, which is useful for case-insensitive comparisons.
  • concat() combines two or more strings into a single string, allowing for the construction of new strings from existing ones.
  • Lastly, position() is employed to find the starting position of a specified substring within another string, which can be crucial for substring analysis and manipulation.
Computer Science: CUET Mock Test - 1 - Question 10

Consider the following statements regarding key -
(I) A super key is an attribute or combination of attributes that uniquely identify records in an RDBMS table.
(II) A candidate key is a subset of a super key.
(III) All super keys are candidate keys but vice versa is not true.

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

The correct answer is (I) and (II) are true
Concept:
Statement 1: A super key is an attribute or combination of attributes that uniquely identify records in an RDBMS table.
True, A super key, or just key, is a combination of every attribute that may be used to specifically identify rows (or tuples) in a database. This indicates that a superkey may contain additional information that isn't required for uniquely identifying table rows.
Statement 2: A candidate key is a subset of a super key.
True, A Candidate key is a subset of Super keys and is clear of any unnecessary attributes that are not essential for tuple identification. For all tuples, the Candidate key value is distinct and non-null. Additionally, each table must include at least one Candidate key.
Statement 3: All super keys are candidate keys but vice versa is not true.
False, Candidate keys are a subset of Super keys. They contain only those attributes which are required to uniquely identify tuples. All Candidate keys are Super keys. But the vice-versa is not true.
Hence the correct answer is (I) and (II) are true.

Computer Science: CUET Mock Test - 1 - Question 11

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

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

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 which uses curly braces {}.

Computer Science: CUET Mock Test - 1 - Question 12

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

Detailed Solution for Computer Science: CUET Mock Test - 1 - Question 12
  • A foreign key is a field in one table that refers to the primary key in another table, ensuring referential integrity by preventing invalid data in relationships.
Computer Science: CUET Mock Test - 1 - Question 13

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

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

In Python, the '/' operator is for numerical division and cannot be used with strings. However, '+' concatenates strings, '*' repeats a string, and 'in' checks for substring membership.

Computer Science: CUET Mock Test - 1 - Question 14

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 14

readline() reads the next line from a file object and returns it as a string, including the newline character if present. In contrast, readlines() reads all lines into a list, read() reads the entire file, and read(2) reads 2 bytes.

Computer Science: CUET Mock Test - 1 - Question 15

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

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

The false statement is B. A Python 'while' loop executes a block of statements repeatedly as long as the condition is true, stopping when it becomes false—not when it becomes true. A and C correctly describe loops, and D is true as 'for' loops can iterate over lists.

Computer Science: CUET Mock Test - 1 - Question 16

Which of the following statements is true?

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

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 17

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 17

A queue operates on the First In, First Out (FIFO) principle. Insertions occur at the rear end, and deletions occur at the front end.

Computer Science: CUET Mock Test - 1 - Question 18

What is the significance of the tell() method?

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

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 19

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

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

Data processing refers to the manipulation of data by a computer, such as calculations or transformations, distinguishing it from utilizing, batching, or upgrading.

Computer Science: CUET Mock Test - 1 - Question 20

What are the two advantages of database management system?

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

A database management system (DBMS) ensures database security (protecting data from unauthorized access) and integrity (maintaining data accuracy and consistency) through access controls and validation.

Computer Science: CUET Mock Test - 1 - Question 21

Which method is used to protect online images from hackers?

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

A firewall monitors network traffic and can help protect a server hosting online images by blocking unauthorized access, though additional measures like encryption are often used specifically for images.

Computer Science: CUET Mock Test - 1 - Question 22

_________ 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 22

Circuit switching establishes a dedicated path, making it well-suited for voice communication (e.g., telephone networks). Packet switching sends data in packets across multiple paths, ideal for data and non-voice communication (e.g., the internet).

Computer Science: CUET Mock Test - 1 - Question 23

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 23

A tuple is a collection of Python objects separated by commas and enclosed in parentheses ().

For example, L = (1, 'Python', '3.14') is a tuple, not a list, dictionary, or string.

Computer Science: CUET Mock Test - 1 - Question 24

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 24

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 25

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 25

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 26

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 26

To check if Title (first column, index 0) starts with 'R', use r[0][0] == 'R' for the first character

Computer Science: CUET Mock Test - 1 - Question 27

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 27

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 28

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. What should be used in Statement 6 to print the records properly?

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

Since row is a list containing all the values of a record, the best way to print it as a string is to use ",".join(row), which joins the list elements with commas.

print(",".join(row))

This ensures that the output looks like a proper CSV row.

Computer Science: CUET Mock Test - 1 - Question 29

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

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

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 30

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 30

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.

View more questions
39 docs|145 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
Download as PDF