Search Header Logo
Computational Thinking Algorithms and Programming

Computational Thinking Algorithms and Programming

Assessment

Presentation

â€Ē

Computers

â€Ē

12th Grade

â€Ē

Practice Problem

â€Ē

Hard

Created by

J Bangura

Used 17+ times

FREE Resource

2 Slides â€Ē 13 Questions

1

Computational Thinking Algorithms and Programming

Slide image

2

Open Ended

Question image

A program needs to store the names of plants that are in a garden, so they can be easily found and accessed in alphabetical order . State the type of tree shown.

3

Open Ended

Question image

A program needs to store the names of plants that are in a garden, so they can be easily found and accessed in alphabetical order . Show the output of a breadth-first traversal of the tree shown

4

Binary Tree/Binary Search Tree

show the output of a breadth-first traversal of the three shown (review the image in detail and select from the options on the next slide)

Slide image

5

Multiple Select

Question image

Show the output of a breadth-first traversal of the tree shown.(Click on the image to enlarge)

1

1st layer Lily

2nd Layer Daisy, Sunflower,

3rd Layer Begonia, Hosta, Peony

4th Layer Rose

2

1st layer Lily

2nd Layer Daisy, Begonia,

3rd Layer Sunflower, Hosta, Peony

4th Layer Rose

6

Open Ended

Question image

Explain how backtracking is used in depth first (post-order) traversal. Use the tree in fig.2.1 (click the image to enlarge)

7

Fill in the Blank

Question image

The element in the tree Fig 2.1 are read into a linked list producing an alphabetised list. Complete the following table to show the linked list for the data

8

Fill in the Blank

Question image

A new plant, Lavender, needs adding to the linked list. The linked list needs to retain its alphabetical order. Complete the table to show the linked list after Lavender is added e.g. (Complete the NextPointer column)

9

Multiple Select

Question image

identify the type of branching statements used in the function

1

if

2

While

3

For

10

Multiple Select

Question image

Identify the parameters in the function displayed

1

num1

2

function

3

num2

11

Multiple Select

Question image

Explain the difference between branching and iteration. (there are 3 possible options)

1

Branching decides which code is run

2

parameters are declared

3

only runs code once

4

Iteration repeatedly runs the same code in the same sequence

12

Multiple Select

Question image

State weather the parameters should be passed by value or by reference. (select 3 options explaining the operators function and a example)

1

By Value .. the original value do not need to be modified

2

parameters are declared

3

byRef would not work

4

would cause the routine to crash

13

Multiple Select

Question image

Describe the arithmetic operation of MOD. Use an example in your answer (select 3 options explaining the operators function and a example)

1

Divides multiple elements

2

9 MOD 3 = 3

3

10 MOD 3 = 1

4

Give the remainder after division

14

Multiple Select

Question image

Trace the recursive function when it is called by the statement GCD(250, 20).

Give the final value returned (select 3 options explaining and giving the final result returned)

1

Num2 != 0 therefore return GCD(20,10)

2

Num2 != 0 therefore return GCD(10,0)

3

Final return value = 10

4

Final return value = 0

5

Num2 != 0 therefore return GCD(12,5)

15

Open Ended

The function has been rewritten using iteration instead of recursion.

state one benefit and one drawback

Computational Thinking Algorithms and Programming

Slide image

Show answer

Auto Play

Slide 1 / 15

SLIDE