Coding
Encryption
Code Segments
Terms
Random
100

A precise sequence of instructions for processes that can be executed by a computer

Algorithm 

100

a process of encoding messages to keep them secret, so only "authorized" parties can read it.

Encryption

100

Which of the following Boolean expressions are equivalent to the expression num  15?


Select two answers.

Select one or more:

a. (num > 15) AND (num = 15)

b. (num > 15) OR (num = 15)

c. NOT (num < 15)

d. NOT (num < 16)

b. (num > 15) OR (num = 15)

c. NOT (num < 15)

100

a programming construct used to repeat a set of commands (loop) as long as (while) a boolean condition is true.while loopa program which replicates or mimics key features of a real world event in order to investigate its behavior without the cost, time, or danger of running an experiment in real life.

Models and Simulations

100

Which of the following activities poses the greatest personal cybersecurity risk? 

Select one:

a. Making a purchase at an online store that uses public key encryption to transmit credit card information

b. Paying a bill using a secure electronic payment system

c. Reserving a hotel room by e~mailing a credit card number to a hotel

d. Withdrawing money from a bank account using an automated teller machine (ATM)

c. Reserving a hotel room by e~mailing a credit card number to a hotel

200

Pulling out specific differences to make one solution work for multiple problems

Abstraction

200

used in public key encryption, it is scheme in which the key to encrypt data is different from the key to decrypt.

asymmetric encryption

200

A programmer wrote the code segment below to display the average of all the elements in a list called numbers. There is always at least one number in the list.

Line 1: count ← 0

Line 2: sum ← 0

Line 3: FOR EACH value IN numbers

Line 4: {

Line 5:    count ← count + 1

Line 6:    sum ←  sum + value

Line 7:    average ← sum / count

Line 8: }

Line 9: DISPLAY (average)


The programmer wants to reduce the number of operations that are performed when the program is run. Which change will result in a correct program with a reduced number of operations performed?

Select one:

a. Interchanging line 1 and line 2

b. Interchanging line 5 and line 6

c. Interchanging line 6 and line 7

d. lnterchanging line 7 and line 8

d. lnterchanging line 7 and line 8

200

To repeat in order to achieve, or get closer to, a desired goal.

Iterate

200


Which of the following questions is LEAST likely to be answerable using the trends feature?

Select one:

a. In what month does a particular sport receive the most searches?

b. In which political candidates are people interested?

c. What is the cost of a certain electronics product? 

d. Which region of the country has the greatest number of people searching for opera performances?

c. What is the cost of a certain electronics product?

300

A piece of code that you can easily call over and over again

Function 

300

In an asymmetric encryption scheme the decryption key is kept private and never shared, so only the intended recipient has the ability to decrypt a message that has been encrypted with a public key.

Private Key

300

Line 1: IF (a = 0)

Line 2: {

Line 3:    b ← a + 10

Line 4: }

Line 5: ELSE

Line 6: {

Line 7:    b ← a + 2O

Line 8: }


Which of the following changes will NOT affect the results when the code segment is executed?

Select one:

a. Changing line 3 to b ← 10 

b. Changing line 3 to a ← b + 10

c. Changing line 7 to b ← 20

d. Changing line 7 to a ← b + 10

a. Changing line 3 to b ← 10

300

A generic term for a programming data structure that holds multiple items.

List

300

An extra piece of information that you pass to the function to customize it for a specific need.

Parameter

400

a mathematical operation that returns the remainder after integer division. Example: 7 MOD 4 = 3

Modulo

400

Used prevalently on the web, it allows for secure messages to be sent between parties without having to agree on, or share, a secret key. It uses an asymmetric encryption scheme in which the encryption key is made public, but the decryption key is kept private

Public Key Encryption

400

The procedure below is intended to display the index in a list of unique names (nameList) where a particular name (targetName) is found. lf targetName is not found in nameList, the code should display 0.


PROCEDURE FindName (nameList, targetName)

{

   index ← 0     

   FOR EACH name IN nameList

   {

      index ← index + 1

      IF (name = targetName)

      {

         foundIndex ← index

      }

      ELSE

      {

         foundIndex ← 0

      }

   }

   DISPLAY (foundIndex)

}

Which of the following procedure calls can be used to demonstrate that the procedure does NOT Work as intended?

Select one:

a. FindName (["Andrea", "Ben"],  "Ben" )

b. FindName (["Andrea", "Ben" ], "Diane" )

c. FindName (["Andrea", "Ben", "Chris"], "Ben") 

d. FindName (["Andrea", "Chris", "Diane"], "Ben")

c. FindName (["Andrea", "Ben", "Chris"], "Ben")

400

a function specified as part of an event listener; it is written by the programmer but called by the system as the result of an event trigger

Callback Function

400

What ASCII character is represented by the binary (base 2) number 1001010 ?

Select one:

a. H

b. I

c. J 

d. K

c. J

500

a collection of commands made available to a programmer

API

500

an encryption technique that maps each letter of the alphabet to a randomly chosen other letters of the alphabet

Random substitution cypher

500

Consider the following code segment, which uses the variables r, s, and t.

          r ←  1

     s ← 2

     t ← 3

     r ← s

     s ← t

     DISPLAY (r)   

     DISPLAY (s)


What is displayed as a result of running the code segment?

Select one:

a. 1 1

b. 1 2

c. 2 3

d. 3 2

c. 2 3

500

A single value of either TRUE or FALSE

Boolean 

500

 Which of the following programs is most likely to benefit from the use of a heuristic?

Select one:

a. A program that calculates a student's grade based on the student's quiz and homework scores

b. A program that encrypts a folder of digital files

c. A program that finds the shortest driving route between two locations on a map

d. A program that sorts a list of numbers in order from least to greatest

c. A program that finds the shortest driving route between two locations on a map

M
e
n
u