important CUET UG 2022 sample questions Computer Science

CUET UG 2022 sample questions Computer Science

In this article, I will discuss CUET UG 2022 sample questions in computer science. As you are aware of CUEG UG 2022 Exam will be conducted in July 2022, this article will help you in preparing for the same for the subject Computer science subject 308.

If you are looking for notes CUET UG 2022 Computer Science, follow this link:

Computer Science Syllabus CUET UG 2022

CUET UG 2022 sample questions Computer Science

Let’s begin the CUET UG 2022 sample questions Computer Science with the first part Exception and file handling. Here we go!

Expected questions Exception Handling CUET UG 2022

[1] Ms. Priya is executing a python program and her program is executed but generating an unexpected output and behaves abnormally. What are the causes for these? Choose the correct one:

a) Due to Python version conflict

b) Due to the code being large

c) Due to syntax, runtime or logical errors

d) None of these

[2] Read the following statements:

(i) Exceptions are triggered automatically.

(ii) Exceptions can be forcefully triggered and handled through program code.

a) (i) is correct, (ii) is incorrect

b) Both (i) and (ii) are incorrect

c) (i) is incorrect, (ii) is correct

d) Both (i) and (ii) are correct

[3] Mr. Ashish is a python beginner. He wrote a program in python but did not follow some rules of python programming while writing a program. He is getting some errors. Which type of the error he is getting?

a) Runtime Error

b) Syntax error

c) Logical Error

d) Typing Error

[4] Which of the following errors are also known as parsing errors?

a) Runtime Errors

b) Logical Errors

c) Syntax Errors

d) Typing Errors

[5] Observe the statements:

(i) On encountering a syntax error, the interpreter does not execute the program unless errors are rectified.

(ii) While a syntax error is encountered while working in shell mode python displays garbage output.

a) (i) is correct but (ii) is incorrect

b) (i) and (ii) both are correct

c) (i) is incorrect but (ii) is correct

d) (i) and (ii) both are incorrect

[6] When syntax errors encountered in a program, Python

a) terminates the program

b) giving a brief explanation about the error and suggestions to rectify it

c) giving only suggestions to rectify it

d) display a dialog box to start a new program

[7] Mrs. Ekta is working on a python script mode. She made a mistake while writing a statement and has done a syntax error. How python is showing the error?

a) Python indicates a red underline below the incorrect statement

b) Show errors and suggestions immediately in another window itself

c) Show errors while running a program with a dialog box specifying the name of the error and a small description

d) While debugging the program

[8] Which of the following statement is not correct about the exception?

a) The statement is syntactically correct but generates errors during execution

b) Exceptions can be handled without any code

c) The programmer has to write some piece of code to handle the exception

d) All exceptions are generated when a program is syntactically wrong

[9] Which of the following is not a type of error in python?

a) Syntax Error

b) Logical Error

c) Parsing Error

d) Typing Error

[10] Commonly occurring exceptions are usually defined in the compiler/interpreter. These are called _____________.

a) User Defined exceptions

b) Built-in exceptions

c) Program exceptions

d) Runtime exceptions

[11] Which of the following is true?

a) The standard exceptions are automatically handled by python’s standard library

b) All exceptions must be handled in python explicitly

c) when there is a rule-breaker in the program, logical errors are encountered

d) Every program has an exception

[12] Which of the following is not a built-in exception in python?

a) SyntaxError

b) ValueError

c) IOError

d) InputError

[13] Shusrut has written the following code with an error, help him to identify the type of error in each statement:

Print('CUET UG 2022')
print('Question Bank CUET UG 2022)

a) Logical, Syntax

b) Syntax, Syntax

c) Syntax, Logical

d) Semantic, Syntax

[14] Identify the exception in this case:

Shubash wants to enter stduentID “1250” in a program. But while running the program he entered “S1250” for studentID by mistake.

a) SyntaxError

b) IOError

c) OverFlowError

d) ValueError

[15] An exception ValueError encounters when

a) a built-in method or operation receives an argument that has the right datatype but mismatched/inappropriate value

b) a rule is broken for writing a statement

c) a value is not assigned to a variable

d) a value entered properly but not in the database

[16] Mayank has written a program in python to work with CSV file named data.csv. He wrote the filename properly but due to some unexpected error file is not opening. Which type of built-in exception he is encountering over here?

a) FileNotFoundError

b) FileError

c) FileOpenError

d) IOError

[17] The KeyboardInterrupt exception is encountered when

a) The keyboard is not working

b) use accidentally press the backspace key

c) user accidentally hits the Delete or Esc key while executing the program due to which the normal flow of the program is interrupted

d) use closes python suddenly and accidentally by pressing Alt + F4

[18] Which exception is raised when the end of file condition is reached without reading any data by input()?

a) IOError

b) EndOfFileError

c) EOFError

d) FileError

[19] Observe the statements given with exception, and identify the exception:

a = 50
c = a/b #Statement1 with exception
print(a/0) #Statement2 with exception

a) ValueError,ZeroDivisionError

b) NameError,ZeroDivisionError

c) IOError,DivisionError


[20] Saurabh has written the following code:

a = 5
b = 'C'

a) ValueError

b) IOError

c) AssitgnmentError

d) TypeError

Watch this video for more understanding:

[21] Dhaval has written the following code in python:

a =10
for i in range(a):
if a%2==0:

Which of the following exception is raised by this code?

a) NameError

b) I/OError

c) IndentationError

d) ValueError

[22] Namrata has written the following code, which exception is raised?

a) NameError
b) IndexError
c) OverFlowError
d) TypeError

[23] Which of the following are designed to execute when a specific exception is raised?

a) exception handlers

b) exception blocks

c) import exception

d) none of these

[24] Which of the following statement is used along with the raise statement to raise an exception?

a) try

b) catch

c) finally

d) assert

[25] Which of the following block is used to inspect a block of code for error?

a) try

b) except

c) finally

d) catch

[26] What will be the output of following code:

a = 'CUET UG 2022'
if not type(a) is int:
   raise TypeError("Only integers are allowed")

a) CUET UG 2022

b) Only integers are allowed

c) Error

d) No output

[27] Which type of argument is required to be passed in the raise function?

a) int

b) float

c) list

d) string

[28] Read the following statements and choose the correct answer:

i) Exception handling can be done for both user-defined and built-in exceptions

ii) Exception handlers separate the main logic of the program from error detection and correction code

a) i) and ii) both are incorrect

b) i) is incorrect and ii) is correct

c) i) is correct and ii) in incorrect

d) i) and ii) both are correct

[29] Python interpreter creates an object called

a) try object

b) exception object

c) throw object

d) execution object

[30] It is a complex mechanism consisting of hardware and software that comes into action as soon as the program, written in any programming language, is put for execution. Identify it.

a) Exception Handler

b) Exception Object

c) Try Block

d) Runtime System

[31] Rearrange the steps of exception handling:

i) runtime system searches exception handler if found execute catch block, if not found forward the exception, terminates the program

ii) exception is raised

iii) error encountered

iv) create an exception object

a) iv) – iii) – ii) – i)

b) i) – ii) – iii) – iv)

c) iii) – iv) – ii) – i)

d) iii) – ii) – iv) – i)

[32] The exception in caught in _________ block and handled in _________ block.

a) except, try

b) try, except

c) finally, try

d) try, finally

[33] Every try block is followed by which block?

a) except

b) finally

c) else

d) catch

[34] Read the following statements:

i) finally should always be placed at the end of the try clause

ii) else block is should always be placed after all except block

a) i) and ii) are correct

b) i) is correct, ii) is incorrect

c) i) is incorrect, ii) is correct

d) i) and ii) are incorrect

[35] The python exception handler can have how many except blocks?

a) 0

b) Only 1

c) Onlye 2

d) Any number more than zero

Expected questions Functions and File Handling CUET UG 2022

Follow this link for MCQs on Functions and File handling:

200+ MCQ Questions Python Functions and File handling

Database Concepts Important MCQ for CUET UG 2022 Computer Science

[1] Which of the following is one of the limitations of manual record keeping?

i) Data Consistency is achieved

ii) Loss of data is very high

iii) Erroneous Collection

iv) Makes it easy to find data from a large dataset

a) i) and ii) Only

b) ii) and iii)

c) iii) and iv)

d) All of them

[2] Which of the following is an advantage of a computerized system?

i) Find any data about any student at any time

ii) New entry made in a new file only

iii) There will be higher chances of duplicate data

iv) Data modifications become easy

a) i) and ii) Only

b) i), ii) and iii)

c) i) and iv)

d) All of the above

[3] A container to store data like texts, computer program code, CSV files etc. in a computer system. What it is?

a) File

b) Database

c) Record

d) Table

[4] What are the limitations of the file system?

a) Difficulties in Access

b) Avoid Data Redundancy

c) Data Consistency

d) All of these

[4] A software that can be used to create a database, store, manage, update/modify and retrieve data from a database server is known as _______________

a) Database


c) SQL

d) File

[5] Which of the following is an example of DBMS software?

a) Python

b) MS Excel

c) Google Chrome

d) MySQL

[6] Read the statements:

i) DBMS provides an interface between the database and end-users

ii) Users cannot modify the structure of the database using DBMS

a) Only i) is correct

b) Only ii) correct

c) i) is correct, ii) is incorrect

d) i) is incorrect, ii) is correct

[7] Retrieving data from a database through commands is called ________

a) Query

b) Report

c) Form

d) Table

[8] Database Schema is

a) Commands of database

b) Skeleton of database

c) Object of database

d) None of these

[9] Parul is learning the concepts of Databases. She read somewhere about the restrictions\limitation applied to the type of data that can be inserted in one or more columns of the table. Help her to recall the term by selecting the correction option.

a) Database Dictionary

b) Database Schema

c) Database Instance

d) Database Constraint

[10] Which of the following is not a constraint of database?

a) Primary key

b) Foreign Key

c) Unique Key

d) Candidate Key

[11] The database schema along with various constraints on the data stored by DBMS in a database catalog is known as

a) Database Instance

b) Database Objects

c) meta-data

d) Database Query

[12] The database instance refers to

a) rules defined for data

b) database scheme along with constraints

c) snapshot of a database

d) structure of database

[13] The most commonly used data model is

a) hierarchical data model

b) network model

c) relational data model

d) object-oriented data model

[14] The total number of attributes are _______ as well as number of tuples are known as _________

a) cardinality, degree

b) degree, cardinality

c) relation, domain

d) Object-Oriented Model, Relational Model

[15] The values which represent unknown or non-applicable certain attributes are known as


b) Keys

c) field

d) Domain

[16] One or more attributes in a relation take distinct values that are uniquely identify the tuples in the relation are called

a) Alternate Key

b) Foreign Key

c) Candidate key

d) None of these

[17] Mahesh applied the primary key on more than one attribute. This is known as

a) Unique Key

b) Foreign Key

c) Alternate Key

d) Composite Primary Key

[18] An attribute of a relation whose value is derived from the primary key of another relation. What it is?

a) Foreign Key

b) Unique Key

c) Alternate Key

d) Primary Key

[19] The primary key relation is also known

a) Composite relation

b) Master relation

c) Primary relation

d) Main relation

[20] The data about data refers to

a) Meta Data

b) Database Instance

c) Database Schema

d) Database Constraints