wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Demo 2024

Total questions: 23

Worksheet time: 54mins

Name
Class
Date
1.

What is the time complexity of adding an element to the end of an array list in Java?

a)

 O(1)


b)

O(log n)

c)

O(n)

d)

O(n^2)

2.

What is the purpose of a loop in programming?

a)

To store data

b)

To repeat a block of code

c)

To perform mathematical calculations

d)

To display output on the screen

3.

What is the role of a compiler in programming?

a)

To execute the program

b)

To convert source code to machine code

c)

To debug the program

d)

To design the user interface

4.

Which of the following is not a data structure?

a)

Stack

b)

Queue

c)

Array

d)

Function

5.

SDLC stands for

a)

System development life cycle

b)

Software development life cycle

c)

Software design life cycle

d)

None of the above

6.

Binary is having base - -

a)

2

b)

8

c)

10

d)

16

7.

. exe stands for

a)

Executable

b)

Extensible

c)

Ever since

d)

None of the above

8.

Who is the father of Artificial Intelligence?

a)

William S.

b)

John McCarthy

c)

Doug Cutting

d)

Rasmus Lerdorf

9.

In a Computer a byte generally consists of:

a)

4 bits

b)

8 bits

c)

16 bits

d)

10 bits

10.

What will be the output of the following Python code?

>>> a=(1,2,(4,5))

>>> a>a[::-1]

a)

(a) False

b)

  (b) True

c)

  (c) Error, > operator is not valid for tuples.

d)

  (d) Type Error.

11.

What will be the output of the following Python code?

>>> a=(1,2,(4,5))

>>> b=(1,2,(3,6,9))

>>> b>a

a)

(a) False

b)

  (b) True

 

c)

(c) Error, > operator is not valid for tuples.

 

d)

(d) Error, > operator is valid for tuples but not if there are sub-tuples.

12.

Comments start with ______ symbol?

a)

%

b)

&

c)

#

d)

@

13.

Choose the correct option with respect to Python.

a)

(a)Both tuples and lists are immutable.

b)

(b)Tuples are immutable while lists are mutable.

c)

(c)Both tuples and lists are mutable.

d)

(d)Tuples are mutable while lists are immutable.

14.

Which statement is a sequence of more than one statements?

a)

(a) Control statement

b)

  (b) Compound statement

c)

  (c) Single statement

d)

  (d) Sequence statement

15.

What will be the output of the following Python code?

tup1=((56, 89),(36,66),(88, 69))

s = tup1.sort()

print(s)

a)

(a) ((56, 89),(36,66),(69,88))

b)

(b) ((36, 66), (56, 89), (88, 69))

c)

(c) 'tuple' object has no attribute 'sort'

d)

(d) Error because tuples are immutable

16.

What will be the output of the following Python code?

tup1=((56),(36,66),(88, 69))

s = sorted(tup1)

print(s)

a)

(a) ((56),(36,66),(69,88))

b)

(b) ((36, 66), (56), (88, 69))

c)

(c) type error

d)

(d) Single element tuples cannot be compared with multiple element tuple.

17.
What enables different parts of the CPU to work on different tasks at the same time
a)
Hyper Threading
b)
Multiplier
c)
Cores
d)
Bus Speed
18.

Q16. What is the name of the chart pictured below? (1 mark)

a)

Graph chart

b)

Pie chart

c)

Line chart

d)

Bar chart

19.

Q15. What is the name of the chart pictured below? (1 mark)

a)

Graph chart

b)

Pie chart

c)

Line chart

d)

Bar chart

20.
_________ holds your data for later
a)
Object
b)
Expression
c)
Variable
d)
Value
21.

How much indentation is required for the action to be part of the loop

a)

3 spaces

b)

4 spaces

c)

5 spaces

d)

2 spaces

22.

What do you type for an infinite loop?

a)

while True:

b)

while True ()

c)

While True:

d)

While True ()

23.
___________ can be evaluated as True or False
a)
Expression
b)
Infinite Loop
c)
Object