1722611013computer Science Sample Paper
1722611013computer Science Sample Paper
Question No. : 1
A) Logical errors in the code B) Syntax errors C) Runtime errors D) All of the above
Question No. : 2
Question No. : 3
Question No. : 4
Question No. : 5
Question No. : 6
A) The code is executed B) The search continues C) The program terminates D) Exception is raised
Question No. : 7
A) For handling more than one type of errors B) For handling a specific type of error C) In both the cases
D) None of these are true
Question No. : 8
A) “OVER AND OUT” B) “OOPS.....SOME EXCEPTION RAISED” C) None of these D) Both of them
Question No. : 9
Question No. : 10
_____ used in a program have a lifetime that lasts till the time the program is under execution.
Question No. : 12
_____ consists of human-readable characters, which can be opened by any text editor.
Question No. : 13
Question No. : 14
Question No. : 15
We can read and write both text and binary files through _____
Question No. : 16
Python has _____ that contains different functions for handling files.
Question No. : 17
Which file mode opens the file in binary and read-only mode?
Question No. : 18
Question No. : 19
Question No. : 20
Question No. : 21
If no argument or a negative number is specified in read(), the entire file content is _____
Reading the entire file line by line using the readline() is said to be
Question No. : 23
Question No. : 24
Question No. : 25
Question No. : 26
Question No. : 27
Question No. : 28
The file will be opened in read mode, and reading will begin from ______
Question No. : 29
Question No. : 30
_____ is used for serializing and de-serializing any Python object structure.
Question No. : 31
Question No. : 32
A) binary write mode B) read mode C) write mode D) binary read mode
WIN CUET Computer Science 01
Question No. : 33
Question No. : 34
A linear list of elements from which deletion can be done from one end and insertion can take place only at the other end is
known as a-
Question No. : 35
A) First in, first out B) First in last out C) Last in first out D) All of these
Question No. : 36
In which data structure element is inserted at one end called rear and deleted at other end called a front.
Question No. : 37
Question No. : 38
Question No. : 39
Objects always get removed from the other end, usually called
Question No. : 40
In operation on Queue, the FIFO approach, data structure queue supports the following operation
Question No. : 41
______ used to check whether the Queue has any element or not
Question No. : 42
Question No. : 43
A) name of the queue B) Return the deleted element C) Both a and b D) None of these
Question No. : 45
Question No. : 46
Question No. : 47
In a deque, if insertion and deletion of elements are done from the opposite end, it will behave as
Question No. : 48
_____ operation is the same as, i.e. is to remove an element from the form of the Queue
Question No. : 49
What is used in the operation of deque for remove on the character from the front and one character from the rear
Question No. : 50
A function ____ to check the presence of elements in deque will be the same function.
Question No. : 1
Question No. : 2
Question No. : 3
A) Give instructions to the user via messages B) Writing additional codes C) Encountering an exception
D) All of the above
Question No. : 4
_______ is a useful technique that helps in capturing runtime errors and to avoid program crashing.
Question No. : 5
_____ is a complex mechanism consisting of hardware and software that comes into action as soon as the program is put for
execution
Question No. : 6
Question No. : 7
If Zero Division Error exception will not appear on the search then-
Question No. : 8
A) If there is no handler code B) If there is no error C) If there are many errors D) If there are no except clauses
Question No. : 9
Question No. : 10
Question No. : 12
Question No. : 13
Question No. : 14
Question No. : 15
Question No. : 16
_____ establishes a link between the program and the data file stored in the permanent storage.
Question No. : 17
Question No. : 18
Question No. : 19
Question No. : 20
Question No. : 21
To read the entire file line by line using the readline(), we can use ____
A) When EOF is reached B) When error is made C) When file is read D) None of this
Question No. : 23
Question No. : 24
Question No. : 25
Which function returns an integer that specifies the current position of the file object in the file?
Question No. : 26
A) 0 B) 1 C) 3 D) 10
Question No. : 27
Question No. : 28
Question No. : 29
Question No. : 30
Question No. : 31
____ method is used to convert (pickling) Python objects for writing data in a binary file
Question No. : 32
A) Logical in first out B) First in, first out C) Last in first out D) Last in logical out
Question No. : 34
A queue is a
Question No. : 35
Question No. : 36
A) Push and pop B) Enqueue and dequeue C) Insert and delete D) None
Question No. : 37
Question No. : 38
The element that has been longest in the Queue will be removed first, it is also known as
Question No. : 39
REAR is known as
Question No. : 40
______ is used to insert a new element to the Queue at the rear end
Question No. : 41
Question No. : 42
Question No. : 43
____ functions always adds an element at the end of the list, hence rear of queue
Question No. : 45
Question No. : 46
Question No. : 47
_____ operation, which is used to insert a new element at the front of the dequeue?
Question No. : 48
This operation is used to remove one element at a time from the rear of the deque
Question No. : 49
Question No. : 50
Question No. : 1
A) Syntactically correct B) Logically accurate C) Having no runtime error D) Not at all correct
Question No. : 2
Question No. : 3
Question No. : 4
____ separate the main logic of the program from the error detection and correction code.
Question No. : 5
Question No. : 6
A) When the value of denominator is zero B) value of denominator is non-zero C) Any value of denominator
D) None of these values
Question No. : 7
_____ is used while working with files to ensure that the file object is closed.
Question No. : 8
Question No. : 9
Question No. : 10
Question No. : 12
Question No. : 13
Question No. : 14
Even a single ____ change can corrupt the file and make it unreadable
Question No. : 15
A) Creating and opening a file to read B) Writing data in a file, C) Traversing a file D) All of these
Question No. : 16
Question No. : 17
Question No. : 18
The advantage of using with clause is that any file that is opened using this clause is ______
Question No. : 19
Which method is used to clear the buffer and write contents in buffer to the file?
Question No. : 20
_____ method is used to read a specified number of bytes of data from a data file.
Question No. : 21
___________ method can also be used to read a specified number (n) of bytes of data from a file.
__________ method reads all the lines and returns the lines along with newline as a list of strings.
Question No. : 23
A) To enable each line returned as element of a list B) To enable proper splitting C) To remove errors while splitting
D) None of these
Question No. : 24
The string is accepted from the user and written in the file using-
Question No. : 25
Question No. : 26
Question No. : 27
In _____ mode, the new data will be written after the existing data.
Question No. : 28
Question No. : 29
To save any object structure along with data, Python provides a module called
Question No. : 30
______ is the process of transforming data or an object in memory (RAM) to a stream of bytes called
A) Serialization, Byte streams B) De-serialization, Pickling C) De-pickling, Byte streams D) Serialization, Pickling
Question No. : 31
Question No. : 32
A) Logical in first out B) First in, first out C) Last in first out D) Last in logical out
Question No. : 34
If the element 'A, B, C and D are placed in Queue and are deleted one at a time, in what order will they be renowned
Question No. : 35
Question No. : 36
__________ form of access is used to add and remove nodes from a queue
A) LIFO, last in first out B) FIFO, first in, first out C) Both a and b D) None of these
Question No. : 37
A queue in which elements get added in an empty area in the front of a queue is called
Question No. : 38
Queue is an arrangement in which new objects/items always get added at one end called is _
Question No. : 39
Sometimes on calling a customer service centre, takes on which system tells us to wait list support person is available
Question No. : 40
________ is used to remove one element at a time frame the front of Queue.
Question No. : 41
____ is used to check whether any more elements can be added to the Queue or not
Question No. : 42
A) enqueue (z) F →Z→ R B) Dequeue (i) F →V→ R C) enqueue (c) F →Z X C→ R D) Both a, b and c
Question No. : 43
What is the correct option for checking the length of the Queue
What is used function of Python's list to find the number of elements in the Queue
Question No. : 45
Question No. : 46
In a queue, if insertion and deletion of elements are done from the same end, it will behave as
Question No. : 47
_____ operation is the same as a normal queue, insert a new element at the rear of the Queue
Question No. : 48
To perform operations efficiently on a queue, we will need supporting operations used in a normal Queue
Question No. : 49
Question No. : 50
A) P (queue empty) B) Print (queue empty) C) Print queue empty ( ) D) Print (“Queue empty”)
WIN CUET Computer Science 04
DIRECTIONS for the question: Mark the best option:
Question No. : 1
How to read value from the front of deque, without remaining if from the queue
A) def get front (my deque): B) Def get front my deque ( ): C) def get rear (my deque): D) Def get front ( ) my dequq
Question No. : 2
Question No. : 3
Question No. : 4
A deque contains ‘Z’, ‘X’, ‘C’ ‘V’ and ‘B’. Elements received after deletion are ‘z’, ‘b’, ‘v’, ‘x’ and ‘c’ ___ is the sequence of deletion
operation performed on deque.
Question No. : 5
Question No. : 6
How a many elements means changing their positions with each other
Question No. : 7
____ explain how an algorithm will perform when the input grows larger
Question No. : 8
In ____ the smallest element is selected from the unsorted array and swapped with the leftmost element, and that element
becomes a part of the sorted array
Question No. : 9
Question No. : 10
Question No. : 12
How many passes does an insertion sort algorithm take to sort an array of n elements?
A) N B) N-1 C) N+1 D) N2
Question No. : 13
A) Arranging a pack of playing cards B) Database sceneries and distributes C) Arranging books on a library shelf
D) Real-time system
Question No. : 14
The amount of time an algorithm takes to process a given date can be called its time
Question No. : 15
Selection sort first finds the element in the list and puts it in the first position
Question No. : 16
If the number of records to be sorted is large and the key is long, then. ____ sorting can be efficient
Question No. : 17
Question No. : 18
_____ sorting algorithm is frequently used when n is small where n is the total number of elements
Question No. : 19
Question No. : 20
Question No. : 21
Each element in the list is compared one by one with the ___
Question No. : 23
Which of the following searching techniques do not require the data to be in sorted form
Question No. : 24
Question No. : 25
A) Requires more space B) Greater time complexities compared to other searching algorithms C) Not easy to understand
D) Not easy to implement
Question No. : 26
The key to be searched is compared with the element of the three possibilities
A) the element at the middle position itself matches the key B) the element at the middle position is greater than the key
C) the element at the middle position is smaller than the key D) all of above
Question No. : 27
Question No. : 28
A) Sorted linked list B) Sorted binary trees C) Sorted linear array D) Pointer array
Question No. : 29
Question No. : 30
In binary search, the average number of comparisons required for searching an element in a list if n number is
Question No. : 31
A) Indexing in database B) Implementing routing tables in routers C) Data compression code D) All of above
Question No. : 32
A simple hash function that works with numeric values is known as the
Question No. : 34
Question No. : 35
A) A function has allocated memory to keys B) A function that computes the location of the key in the array
C) A function that creates an array D) None of these
Question No. : 36
Question No. : 37
Question No. : 38
Question No. : 39
Governments systematically called and record data about the population through a process called
Question No. : 40
Question No. : 41
Question No. : 42
A) 1 B) 2 C) 3 D) 4
Question No. : 43
A) 1 B) 2 C) 3 D) 4
Question No. : 45
Data which is organized and can be recorded in a well defined format is called
Question No. : 46
Question No. : 47
A newspaper contains various types of news items which are also called
Question No. : 48
A) KB B) MB C) BM D) Both a & b
Question No. : 49
Question No. : 50