Abstraction
The Bases are Loaded
(Binary, Decimal, Hexadecimal)
Go With The Flow
(Flowcharts)
Let's Sort This Out
(Sorting Algorithms)
Code Tracing R&R (Recursion & Random)
100

In problem solving, breaking a large problem into smaller, more manageable pieces is known as this computational thinking practice.

What is Decomposition?

100

Convert decimal number 34 into binary

100010

100

In a flowchart, this diamond-shaped symbol represents a point where a program must choose between two or more paths.

What is a Decision?

100

This sorting algorithm repeatedly swaps adjacent elements if they are in the wrong order, causing larger values to float toward the end.

What is a Bubble Sort

100

Consider the following definition:

int nextInt (int num )

Returns an integer value from 0 up to (but not including) num.  The return is a pseudorandom number with an approximately uniform distribution; that is, each integer value in the range (0, num] is approximately equally likely to be returned.

What is the MINIMUM value that can be produced by 

int number ← ran.nextInt(10 )

0

200

In computer science, this process involves simplifying a complex system by focusing on important details while ignoring unnecessary ones.

What is abstraction?

200

Convert decimal number 135 into hexadecimal

87

200

If a decision diamond has two arrows labeled “true” and “false,” the flowchart is representing this programming structure.

What is a Conditional? (if/else)

200

This sorting algorithm chooses a pivot element and partitions the array so that smaller elements go to the left and larger ones go to the right.  

What is a Quick Sort

200

This is the condition in a recursive function that stops the function from calling itself forever.

What is the BASE CASE?

300

The following are two representations of the same concept:

Red

#FF0000

Which is a HIGHER level of abstraction?

What is Red?

300

Convert hexadecimal AB2 to decimal

2738

300

If Income is 40,000, what will be the result?

Individual Pay Tax

300

The worst-case time complexity of Bubble Sort, Selection Sort, and Insertion Sort is this Big-O complexity.

What is O(n^2) or Quadratic

300

Consider the following definition:

int nextInt (int num )

Returns an integer value from 0 up to (but not including) num.  The return is a pseudorandom number with an approximately uniform distribution; that is, each integer value in the range (0, num] is approximately equally likely to be returned.

What is the MAXIMUM value that can be produced by 

int number ← ran.nextInt(10 ) * 5 

45

400

Consider the following list.

  • Programming Languages
  • Logic Gates
  • Applications
  • Operating Systems

Which of the following correctly arranges the list in order from highest level of abstraction to lowest level of abstraction?

What is Applications, programming languages, operating systems, logic gates

400
Convert Binary Number 11011001 to decimal

217

400

If income is exactly 60,000, what is the result?

Business Tax

400

This divide-and-conquer sorting algorithm requires additional memory to combine sorted subarrays.

What is merge sort?

400

function f(n)
    if n = 0
        return 0
    else
        return n + f(n-1)

What is returned for f(3)?

6

500

Consider the following list.

  • Web page
  • HTML Source Code
  • URL

Which of the following arranges the list in order from lowest level of abstraction to highest level of abstraction?

What is 

HTML source code, web page, URL

  

500

Convert hexadecimal number FC to binary

1111 1100

500

Consider the following algorithm used on an integer array x[0..n–1] of length n, where the index of array x starts at 0.

Describe what this flowchart will do:



Finds the Maximum Value

I. Initialize a variable, max, which will hold the largest value found in the array so far.
II. Go through the array elements and compare each value to max.
III. If a value is greater than max, set it as the new value of max.
IV. After going through the entire array, the maximum value in the array is the value of max.

500

Consider a partially sorted list that is undergoing the bubble sort in ascending order:

{ 3, 4, 6, 5, 1, 2, 7 }

If the value 7 has already been sorted, which will be the next value to be placed in its final position after the next pass?

6

500

Consider the following definition:

int nextInt (int num )

Returns an integer value from 0 up to (but not including) num.  The return is a pseudorandom number with an approximately uniform distribution; that is, each integer value in the range (0, num] is approximately equally likely to be returned.

Complete the expression such that it produces a random value with 10 as the least possible value and 55 as the greatest possible value.

int number ← ran.nextInt(__)+__

int number ← ran.nextInt(46)+10

M
e
n
u