Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Reviewer Computer 9 - 4th Quarter

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

Which of the following utilizes the flowchart symbol below?

a)

I/O box

b)

Process capsule

c)

Terminal interrupt

d)

Connectors

2.

Which of the following utilizes the flowchart symbol below?

a)

I/O box

b)

Process box

c)

Program interrupt

d)

Connectors

3.

Who conceptualized Python?

a)

ABC

b)

Guido Van Rossum

c)

Linux

d)

Seymour Papert

4.

Which of the following designs and architectures was not influenced by Python?

a)

Cobra

b)

CoffeeScript

c)

Apple’s Shift

d)

Apple’s Swift

5.

What type of identifier is i_do_not_know?

a)

valid

b)

Keyword

c)

invalid

d)

i_do_not_know

6.

What symbol is used to insert comments in Python?

a)

//

b)

/* */

c)

/*

d)

#

7.

What is the output of the program below?

a)

Error message

b)

Programming

c)

Python

d)

var

8.

What is the data type of 3.143?

a)

int

b)

string

c)

float

d)

char

9.

What is the output of the program below?

a)

True

b)

Error message

c)

False

d)

79

10.

Which of the following statements assigns the value 100 to the variable x in Python?

a)

x <-- 100

b)

let x = 100

c)

x << 100

d)

x = 100

11.

What is the maximum possible length of an identifier?

a)

31 characters

b)

63 characters

c)

79 characters

d)

Identifiers can be of any length.

12.

Why are local variable names beginning with an underscore discouraged to be used as a variable name?

a)

They are used to indicate a private variable of a class.

b)

They confuse the interpreter.

c)

They are used to indicate global variables.

d)

They slow down execution.

13.

Which of the following is not a keyword?

a)

eval

b)

nonlocal

c)

assert

d)

pass

14.

Which of the following is true for variable names in Python?

a)

Variable names can be of any length.

b)

All private members must have leading and trailing underscores.

c)

Underscore and ampersand are the only two special characters allowed.

d)

limited length names for variable.

15.

What will be the output of the following Python code?

d1 = {"john":40, "peter":45}

d2 = {"john":466, "peter":45}

d1 == d2

a)

True

b)

john: 466, peter: 45

c)

False

d)

Error

16.

Which of the following is a Python tuple?

a)

[1, 2, 3]

b)

(1, 2, 3)

c)

{1, 2, 3}

d)

{ }

17.

Suppose t = (1, 2, 4, 3), which of the following is incorrect?

a)

print(t[3])

b)

print(len(t))

c)

print(max(t))

d)

t[3] = 45

18.

What will be the output of the following Python code?

>>>t=(1, 2, 4, 3)

>>>t[1:3]

a)

(1, 2)

b)

(2, 4)

c)

(1, 2, 4)

d)

(2, 4, 3)

19.

Which of following is not true about a set?

a)

Mutable data type

b)

Allows duplicate values.

c)

Data type with unordered values.

d)

Immutable data type

20.

What will be the output of the following Python code?

>>>t=(1, 2, 4, 3, 8, 9)

>>>[t[i] for i in range (0, len(t), 2)]

a)

[2, 3, 9]

b)

[1, 2, 4, 3, 8, 9]

c)

[1, 4, 8]

d)

(1, 4, 8)