Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CSF U2 Algorithms p2

Total questions: 11

Worksheet time: 8mins

Name
Class
Date
1.

An 'for' statement is an example of

a)

repetition

b)

selection

c)

sequence

2.

What will the Python code will output?

a)

2, 3, 4

b)

3, 4, 5

c)

3, 4, 5, 6

d)

2, 3, 4, 5

3.

What will the Python code output?

a)

12

b)

13

c)

16

d)

17

4.

What will the Python code output?

a)

-10, -9, -8, 3, 4, 5

b)

-10, -9, -8, 4, 5, 6

c)

-10, -9, 3, 4, 5, 6

d)

-10, -9, -8, 3, 4

5.

What would the Python code output?

a)

4

b)

9

c)

13

d)

16

6.

In the diagram A is called:?

a)

weight

b)

edge

c)

vertex

d)

node

7.

What is true about the following graph?

a)

it is a MST

b)

it could NOT be an MST

c)

it is an undirected weighted graph

d)

it is a spanning tree

8.

Which MST algorithm iterates over all the vertices and then repeats this process by identifying subgroups as a vertex?

a)

Kruskal’s

b)

Borůvka’s

c)

Prim's

9.

Which MST algorithm starts with any vertex and grows by finding the smallest edge

a)

Kruskal’s

b)

Borůvka’s

c)

Prim's

10.

Which MST algorithm chooses the smallest weights and adds them making sure not to create cycles

a)

Kruskal’s

b)

Borůvka’s

c)

Prim's

11.

Google Maps is an abstraction of the real world

a)

yes, because it hides away details that are not important

b)

yes, because it is very fast at finding routes

c)

no, because it can only be used for driving

d)

no, because you can use Apple Maps