NEW
Font size
WorksheetsDemo 2024
Total questions: 23
Worksheet time: 54mins
What is the time complexity of adding an element to the end of an array list in Java?
O(1)
O(log n)
O(n)
O(n^2)
What is the purpose of a loop in programming?
To store data
To repeat a block of code
To perform mathematical calculations
To display output on the screen
What is the role of a compiler in programming?
To execute the program
To convert source code to machine code
To debug the program
To design the user interface
Which of the following is not a data structure?
Stack
Queue
Array
Function
SDLC stands for
System development life cycle
Software development life cycle
Software design life cycle
None of the above
Binary is having base - -
2
8
10
16
. exe stands for
Executable
Extensible
Ever since
None of the above
Who is the father of Artificial Intelligence?
William S.
John McCarthy
Doug Cutting
Rasmus Lerdorf
In a Computer a byte generally consists of:
4 bits
8 bits
16 bits
10 bits
What will be the output of the following Python code?
>>> a=(1,2,(4,5))
>>> a>a[::-1]
(a) False
(b) True
(c) Error, > operator is not valid for tuples.
(d) Type Error.
What will be the output of the following Python code?
>>> a=(1,2,(4,5))
>>> b=(1,2,(3,6,9))
>>> b>a
(a) False
(b) True
(c) Error, > operator is not valid for tuples.
(d) Error, > operator is valid for tuples but not if there are sub-tuples.
Comments start with ______ symbol?
%
&
#
@
Choose the correct option with respect to Python.
(a)Both tuples and lists are immutable.
(b)Tuples are immutable while lists are mutable.
(c)Both tuples and lists are mutable.
(d)Tuples are mutable while lists are immutable.
Which statement is a sequence of more than one statements?
(a) Control statement
(b) Compound statement
(c) Single statement
(d) Sequence statement
What will be the output of the following Python code?
tup1=((56, 89),(36,66),(88, 69))
s = tup1.sort()
print(s)
(a) ((56, 89),(36,66),(69,88))
(b) ((36, 66), (56, 89), (88, 69))
(c) 'tuple' object has no attribute 'sort'
(d) Error because tuples are immutable
What will be the output of the following Python code?
tup1=((56),(36,66),(88, 69))
s = sorted(tup1)
print(s)
(a) ((56),(36,66),(69,88))
(b) ((36, 66), (56), (88, 69))
(c) type error
(d) Single element tuples cannot be compared with multiple element tuple.
Q16. What is the name of the chart pictured below? (1 mark)
Graph chart
Pie chart
Line chart
Bar chart
Q15. What is the name of the chart pictured below? (1 mark)
Graph chart
Pie chart
Line chart
Bar chart
How much indentation is required for the action to be part of the loop
3 spaces
4 spaces
5 spaces
2 spaces
What do you type for an infinite loop?
while True:
while True ()
While True:
While True ()
