wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

12 CSC ATAR - programming skills and concepts

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

for i in range(5):

print(i)

This is an example of...

a)

Sequence

b)

Selection

c)

Iteration (pre-test)

d)

Iteration (post-test)

2.

loop = 0

while True:

print("Hi there")

loop += 1

if loop > 5:

break

This is an example of...

a)

Sequence

b)

Selection

c)

Iteration (pre-test)

d)

Iteration (post-test)

3.

greeting = f"Hi there, {name}."

Variable 'greeting' holds data of type...

a)

String

b)

Integer

c)

Float

d)

Boolean

4.

thinking_clearly = True

Variable 'thinking_clearly' holds data of type...

a)

String

b)

Integer

c)

Float

d)

Boolean

5.

The elements in a 2D array are accessed using the row and column indices, whereas in a 1D array, only a single index is used.

a)

True

b)

False

6.

A 2D array is an array of arrays.

a)

True

b)

False

7.

my_friends = ['Tim', 'Sally', 'Ahnold']

This data structure is a ...

a)

List

b)

Tuple

c)

Dictionary

d)

Struct

8.

my_friends = ('Tim', 'Sally', 'Ahnold')

This data structure is a ...

a)

List

b)

Tuple

c)

Dictionary

d)

Struct

9.

my_friends = {'Tim': 'hiker', 'Sally': 'swimmer', 'Ahnold': 'ranger'}

This data structure is a ...

a)

List

b)

Tuple

c)

Dictionary

d)

Struct

10.

Variables with global scope are accessible ...

a)

From all code blocks

b)

Within a single code block

11.

Variables with local scope are accessible ...

a)

From all code blocks

b)

Within a single code block

12.

print(True AND False)

This code would output...

a)

Nothing

b)

True

c)

False

13.

False

This code would output...

a)

Nothing

b)

True

c)

False

14.

print(True OR False)

This code would output...

a)

Nothing

b)

True

c)

False

15.

print(NOT(True OR False))

This code would output...

a)

Nothing

b)

True

c)

False

16.

print(True == False)

This code would output...

a)

Nothing

b)

True

c)

False

17.

Attempting division by zero is a ...

a)

Syntax error

b)

Logic error

c)

Runtime error

18.

An integer overflowing is a ...

a)

Syntax error

b)

Logic error

c)

Runtime error

19.

Misspelling a Python keyword is a ...

a)

Syntax error

b)

Logic error

c)

Runtime error

20.

When your program does not operate as expected, you have a ...

a)

Syntax error

b)

Logic error

c)

Runtime error