wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

KSCS

Total questions: 25

Worksheet time: 13mins

Name
Class
Date
1.

Which statement type is used to declare a variable?

a)

Assignment

b)

Iteration

c)

Variable declaration

d)

Selection

2.

Why are named constants and variables used?

a)

To make programs more complicated

b)

To improve program performance

c)

To store and manipulate data

d)

To confuse programmers

3.

Which type of iteration is also known as count-controlled iteration?

a)

Definite iteration

b)

Indefinite iteration

c)

Nested iteration

d)

Iterative selection

4.

Which statement type is used to combine multiple statements in a specific order?

a)

Assignment

b)

Iteration

c)

Selection

d)

Sequence

5.

What is the purpose of nested selection structures?

a)

To repeat a block of code until a condition is met

b)

To execute different blocks of code based on conditions

c)

To combine variables and constants in a program

d)

To confuse programmers

6.

Which statement type is used to define a constant?

a)

Assignment

b)

Iteration

c)

Variable declaration

d)

Constant declaration

7.

Which statement type is used to repeat a block of code until a condition is met?

a)

Assignment

b)

Iteration

c)

Selection

d)

Subroutine

8.

Which statement type is used to call a reusable piece of code?

a)

Assignment

b)

Iteration

c)

Selection

d)

Subroutine

9.

Which data structure is used to store multiple values of the same type?

a)

Arrays

b)

Records

c)

Constants

d)

Subroutines

10.

Which data structure is used to store multiple values of different types?

a)

Arrays

b)

Records

c)

Constants

d)

Subroutines

11.

What is the maximum number of bits allowed per binary number when adding them together?

a)

4

b)

8

c)

16

d)

Unlimited

12.

In binary shifts, which type of shift is commonly used?

a)

Arithmetic shift

b)

Logical shift

c)

Circular shift

d)

Fractional shift

13.

What can binary shifts be used for?

a)

Simple multiplication/division by powers of 2

b)

Sorting data in ascending order

c)

Encryption and decryption of data

d)

Binary-to-decimal conversion

14.

Why is hexadecimal often used in computer science?

a)

It is the simplest number base to understand

b)

It is the fastest number base for computations

c)

It is more compact and easier to represent binary data

d)

It is required for advanced cryptography algorithms

15.

What is the maximum decimal value that can be represented in binary using 8 bits?

a)

127

b)

255

c)

512

d)

1024

16.

What is the maximum decimal value that can be represented in hexadecimal using 2 digits?

a)

15

b)

25

c)

99

d)

255

17.

How do you access an element in a two-dimensional array with indices (i, j)?

a)

array[i, j]

b)

array[i][j]

c)

array(i, j)

d)

array(i)(j)

18.

What is the purpose of using records in programming?

a)

To store a large number of values efficiently

b)

To perform complex calculations

c)

To organize and manage related data items together

d)

To execute a series of instructions repeatedly

19.

How can you check if a given string 'my_string' is empty in Python?

a)

if my_string == ""

b)

if my_string is None

c)

if len(my_string) == 0

d)

if not my_string

20.

What does the range() function in Python do?

a)

Generates a sequence of numbers

b)

Performs mathematical calculations

c)

Checks if a value is within a specified range

d)

Executes a block of code repeatedly

21.

How do you read user input from the console in Python?

a)

readline()

b)

input()

c)

get_input()

d)

console_input()

22.

What is the output of the following code snippet?

a)

[1, 2, 3, 4, 5]

b)

[1, 4, 9, 16, 25]

c)

[1, 8, 27, 64, 125]

d)

[2, 4, 6, 8, 10]

23.

What is the value of 'y' after executing the following code snippet?

a)

5

b)

10

c)

True

d)

False

24.

What is the output of the following code snippet?

a)

"World"

b)

"Hello"

c)

" "

d)

"Hello,"

25.

What will be the output of the following code snippet?

a)

0

b)

1

c)

2

d)

4