| 101 |
Which module is used in Python to store objects such as lists in a binary file? |
Computer Science/Informatics Practices Binary files |
Easy |
| 102 |
Which file mode should be used to write pickled data to a new binary file? |
Computer Science/Informatics Practices Binary files |
Easy |
| 103 |
What is the correct form of the statement to write a dictionary d into the binary file object f? |
Computer Science/Informatics Practices Binary files |
Medium |
| 104 |
The process of converting a Python object into a byte stream is called |
Computer Science/Informatics Practices Binary files |
Medium |
| 105 |
A program writes a list and then a dictionary with two pickle.dump() calls, then reads the file with pickle.l… |
Computer Science/Informatics Practices Binary files |
Hard |
| 106 |
Which principle does a stack follow? |
Computer Science/Informatics Practices Stack |
Easy |
| 107 |
Removing an element from an empty stack is called |
Computer Science/Informatics Practices Stack |
Easy |
| 108 |
Starting with an empty Python list s, the operations s.append(10), s.append(20), s.pop(), s.append(30), s.app… |
Computer Science/Informatics Practices Stack |
Medium |
| 109 |
Which feature of a web browser is a typical application of a stack? |
Computer Science/Informatics Practices Stack |
Medium |
| 110 |
The characters of "CAT" are pushed one by one onto a stack and then all popped and joined in the order popped… |
Computer Science/Informatics Practices Stack |
Hard |
| 111 |
What is the postfix form of the infix expression A + B * C? |
Computer Science/Informatics Practices Expression notation |
Easy |
| 112 |
Which data structure is used to evaluate a postfix expression? |
Computer Science/Informatics Practices Expression notation |
Easy |
| 113 |
What is the value of the postfix expression 4 5 + 3 2 − *? |
Computer Science/Informatics Practices Expression notation |
Medium |
| 114 |
What is the postfix form of (A + B) * (C − D)? |
Computer Science/Informatics Practices Expression notation |
Medium |
| 115 |
What is the value of the postfix expression 8 2 3 * − 4 +? |
Computer Science/Informatics Practices Expression notation |
Hard |
| 116 |
Which principle does a queue follow? |
Computer Science/Informatics Practices Queue |
Easy |
| 117 |
In a queue implemented with a Python list q using append() for insertion, which statement removes the front e… |
Computer Science/Informatics Practices Queue |
Easy |
| 118 |
Starting with an empty queue, A, B and C are enqueued, one element is dequeued and then D is enqueued. Which … |
Computer Science/Informatics Practices Queue |
Medium |
| 119 |
Which real-life system is best modelled by a queue? |
Computer Science/Informatics Practices Queue |
Medium |
| 120 |
A student implements a queue with a Python list using append() to insert but pop() with no argument to delete… |
Computer Science/Informatics Practices Queue |
Hard |
| 121 |
Which of the following best describes a deque? |
Computer Science/Informatics Practices Deque |
Easy |
| 122 |
In a list-based deque d, which statement inserts x at the front? |
Computer Science/Informatics Practices Deque |
Easy |
| 123 |
Starting with an empty list d, the operations d.append(5), d.insert(0, 3), d.append(8), d.pop(0) are performe… |
Computer Science/Informatics Practices Deque |
Medium |
| 124 |
A deque is used only with insertRear and deletionRear operations. It then behaves like a |
Computer Science/Informatics Practices Deque |
Medium |
| 125 |
Why is a deque convenient for checking whether a word is a palindrome? |
Computer Science/Informatics Practices Deque |
Hard |
| 126 |
Which condition must a list satisfy before binary search can be applied to it? |
Computer Science/Informatics Practices Linear and binary search |
Easy |
| 127 |
What is the worst-case number of comparisons for linear search in a list of n elements? |
Computer Science/Informatics Practices Linear and binary search |
Easy |
| 128 |
Binary search is used to find 14 in [3, 9, 14, 21, 30, 38, 45, 52, 60]. How many comparisons with list elemen… |
Computer Science/Informatics Practices Linear and binary search |
Medium |
| 129 |
In linear search, when does the best case occur? |
Computer Science/Informatics Practices Linear and binary search |
Medium |
| 130 |
What is the maximum number of comparisons binary search needs to search a sorted list of 1,000 elements? |
Computer Science/Informatics Practices Linear and binary search |
Hard |
| 131 |
Using the hash function h(k) = k % 10, at which index is the key 57 stored? |
Computer Science/Informatics Practices Hashing |
Easy |
| 132 |
What is a collision in hashing? |
Computer Science/Informatics Practices Hashing |
Easy |
| 133 |
With h(k) = k % 10 and linear probing, the keys 23, 43 and 13 are inserted in that order into an empty table.… |
Computer Science/Informatics Practices Hashing |
Medium |
| 134 |
Why can searching by hashing be faster than binary search? |
Computer Science/Informatics Practices Hashing |
Medium |
| 135 |
A hash table of size 7 uses h(k) = k % 7 with linear probing. Slots 6 and 0 are already full. The key 20 is i… |
Computer Science/Informatics Practices Hashing |
Hard |
| 136 |
In which sorting method are adjacent elements compared and swapped if they are in the wrong order? |
Computer Science/Informatics Practices Sorting algorithms |
Easy |
| 137 |
After the first pass of bubble sort in ascending order, which element is guaranteed to be in its final positi… |
Computer Science/Informatics Practices Sorting algorithms |
Easy |
| 138 |
What is the list [7, 3, 9, 1, 5] after the first pass of bubble sort in ascending order? |
Computer Science/Informatics Practices Sorting algorithms |
Medium |
| 139 |
What is the list [29, 10, 14, 37, 13] after two passes of selection sort in ascending order? |
Computer Science/Informatics Practices Sorting algorithms |
Medium |
| 140 |
For an already sorted list of 8 elements, how many comparisons does insertion sort make? |
Computer Science/Informatics Practices Sorting algorithms |
Hard |
| 141 |
A student conducts a survey of classmates to find their favourite sport. The data collected is |
Computer Science/Informatics Practices Collecting and organising data |
Easy |
| 142 |
Which of the following is an example of structured data? |
Computer Science/Informatics Practices Collecting and organising data |
Easy |
| 143 |
A researcher uses rainfall figures published by a government department for a study. What kind of data is thi… |
Computer Science/Informatics Practices Collecting and organising data |
Medium |
| 144 |
Which statement correctly distinguishes data from information? |
Computer Science/Informatics Practices Collecting and organising data |
Medium |
| 145 |
A shop's billing software stores wrong prices for several items, and the monthly profit report it produces is… |
Computer Science/Informatics Practices Collecting and organising data |
Hard |
| 146 |
What is the median of 3, 7, 7, 2, 9, 1? |
Computer Science/Informatics Practices Statistical measures |
Easy |
| 147 |
What is the range of the data 12, 5, 19, 8, 15? |
Computer Science/Informatics Practices Statistical measures |
Easy |
| 148 |
The data set 2, 4, 4, 4, 5, 5, 7, 9 has mean 5. What is its standard deviation (using division by n)? |
Computer Science/Informatics Practices Statistical measures |
Medium |
| 149 |
Which measure is the value that occurs most frequently in a data set? |
Computer Science/Informatics Practices Statistical measures |
Medium |
| 150 |
Every student's marks in a test are increased by 5 as grace marks. What happens to the mean and the standard … |
Computer Science/Informatics Practices Statistical measures |
Hard |