Miracle Bugs
Quiz by , created more than 1 year ago

Study Guide for AP ECS Final.

76
0
0
Miracle Bugs
Created by Miracle Bugs about 5 years ago
Close

AP Exploring Computer Science Final Study Guide

Question 1 of 28

1

Under which of the following conditions is it most beneficial to use a heuristic approach to solve a problem?

Select one of the following:

  • When the problem can be solved in a reasonable time and an approximate solution is acceptable

  • When the problem can be solved in a reasonable time and an exact solution is needed.

  • When the problem cannot be solved in a reasonable time and an approximate solution is acceptable

  • When the problem cannot be solved in a reasonable time and an exact solution is needed.

Explanation

Question 2 of 28

1

The colors of the pixels in a digital image are often represented by red, green, and blue values between 0 and 255 ( a RGB triplet). A photographer is manipulating a digital image to lighten it because all of the RGB values are less than 100, making it very dark. He does this by adding 20 to the R, G, and B values of each pixel, the overwriting the original image. What type of transformation is the photographer using on the digital image?

Select one of the following:

  • Lossless transformation

  • Lossy transformation

  • Multiband Transformation

  • Chrome Sampling Transformation

Explanation

Question 3 of 28

1

Which of the following is a true statement about data compression?

Select one of the following:

  • Data compression is only useful for files being transmitted over the internet.

  • Regardless of the compression technique used, once a data file is compressed, it cannot be restored to its original state.

  • Sending a compressed version of a file ensures that the contents of the file cannot be intercepted by an unauthorized user.

  • There are trade-offs involved in choosing a compression technique for storing and transmitting data.

Explanation

Question 4 of 28

1

A video streaming website uses 32-bit integers to count the number of times each video has been played. In anticipation of some videos being played more times than can be represented with 32 bits, the website is planning to change to 64-bit integers for the counter. Which of the following best describes the result of using 64-bit integers instead of 32-bit integers?

Select one of the following:

  • 2 times as many values can be represented.

  • 32 times as many values can be represented.

  • 2^32 times as many values can be represented.

  • 32^2 times as many values can be represented.

Explanation

Question 5 of 28

1

Select the answer that lists the units of bytes in ascending order(from smallest to largest).

Select one of the following:

  • gigabyte, megabyte, terabyte

  • megabyte, terabyte, kilobyte

  • gigabyte, terabyte, megabyte

  • kilobyte, gigabyte, terabyte

Explanation

Question 6 of 28

1

An artist makes an RGB raster image in which each pixel color is encoded with 12-bits ---4 bits for red, green, and blue.
Which of the following correctly shows the hexadecimal value for Red as a 12-bit representation?

Select one of the following:

  • F00

  • 00F

  • FF00

  • FF0000

Explanation

Question 7 of 28

1

A compression scheme for long strings of bits called run-length encoding is described as follows:
Rather than record each 0 and 1 individually, instead record "runs" of bits by storing the number of consecutive 1s and 0s that appear.
Since it's binary, any runs of 0s must be followed by a run of 1s (even if the run is only 1-bit long) and vise versa. Thus, you can store a list of small numbers that represents the alternating runs of 0s and 1s. Here is an example:
Uncompressed bits: 000000000000000111111111101111111100000000001100000000000001111111
Runs of bits: 15 10 1 8 10 2 13 7
Run length encoding: [15, 10, 1, 8, 10, 2, 13, 7]
To decompress the data back into its original binary state, you simply reverse the process. This technique is an example of what type of compression?

Select one of the following:

  • Lossy compression

  • Lossless compression

  • Fast Fourier Transform compression

  • Tailored Compression

Explanation

Question 8 of 28

1

A raw digital sound file samples a sound wave at some interval and measures the height of the wave at each point. Thus, raw sound is recorded as a list of numbers. In very broad terms the MP3 audio compression algorithm identifies frequencies and volume levels - low and high - that are outside the range of human hearing and removes the data representing these frequencies from the original. This technique results in a smaller audio file that sounds exactly the same to the human ear.
This technique is an example of what type of compression?

Select one of the following:

  • Lossy compression

  • Lossless compression

  • Fast Fourier Transform compression

  • Tailored compression

Explanation

Question 9 of 28

1

Approximately how much bigger (how many more bytes) is a megabyte than a kilobyte?

Select one of the following:

  • 1,000 times bigger

  • 100,000 times bigger

  • 1,000,000 times bigger

  • 1,000,000,000 times bigger

Explanation

Question 10 of 28

1

Which of the following is TRUE about while loops in JavaScript?

Select one of the following:

  • While loops terminate after a fixed number of loops that is pre-determined.

  • While loops terminate after a fixed number of loops that is determined after the loop executes once.

  • While loops run as long as a given boolean condition is true.

  • While loops run as long as a given boolean condition is false.

  • While loops are known as "forever loops" and never stop until the program is halted by the user.

Explanation

Question 11 of 28

1

What will be displayed as a result of the code below executing?
var a = 5;
while ( a < 5 ) {
a = a-1;
}
console.log (a);

Select one of the following:

  • 6

  • 5

  • 4

  • 0

  • Infinite loop

Explanation

Question 12 of 28

1

What will be displayed after the loop has executed?
var a = 5;
while ( a >= 3 ){
a = a - 1;
}
console.log(a);

Select one of the following:

  • 5

  • 4

  • 3

  • 2

  • Infinite Loop

Explanation

Question 13 of 28

1

What will be displayed as a result of the code below executing?
var a = 5;
while ( a < 5 ) {
a = a -1 ;
}
console.log(a);

Select one of the following:

  • 6

  • 5

  • 4

  • 0

  • Infinite Loop

Explanation

Question 14 of 28

1

The counter variable in the code below increments by 1 each time through the loop. What will the value of counter be after the following loop executes?
var counter = 0;
var n = 6;
while(n > 0){
n = n - 2;
counter = counter + 1;
}
console.log(counter)

Select one of the following:

  • 0

  • 1

  • 2

  • 3

  • 4

Explanation

Question 15 of 28

1

The index of the following string of data begins with 1 instead of 0. It is psuedocode, JavaScript begins with a 1.

data = [5, 8, 3, 4, 2, 1]
a <- data[5]
b <- data[2]
DISPLAY(a + b)

Select one of the following:

  • 4

  • 7

  • 9

  • 10

  • ab

Explanation

Question 16 of 28

1

The following array of data in in psuedocode, there for the string begins with an index of 1, rather than 0.

data [5, 8, 3, 4, 2, 1]
i <- 4
a <- data[i]
b <- data[i + 1]
DISPLAY(a + b)

Select one of the following:

  • 2

  • 3

  • 4

  • 5

  • 6

Explanation

Question 17 of 28

1

Which of the following most accurately describes Moore's Law?

Select one of the following:

  • Moore's Law describes a relationship of boolean logic statements involving AND and OR.

  • Moore's Law is the principle that one should assume that any traffic on the internet is insecure.

  • Moore's Law is the observation that computing power tends to double every two years.

  • Moore's Law explains why cracking modern cryptography is a "computationally hard" problem.

Explanation

Question 18 of 28

1

Fill in the blank of the following statement "___________ encryption is a method of encryption involving one key for both encryption and decryption."

Select one of the following:

  • Symmetric

  • Asymmetric

  • Public Key

  • SSL

Explanation

Question 19 of 28

1

A coffee shop is considering accepting orders and payments through their phone app and have decided to use public key encryption to encrypt their customers' credit card information. Is this a secure form of payment?

Select one of the following:

  • No, public key encryption allows the credit card information to be read by the public.

  • No, the internet protocols are open standards and thus everything sent over the internet is sent "in the clear."

  • Yes, public key encryption is built upon computationally hard problems that even powerful computers cannot easily solve.

  • Yes, public key encryption is secure because it transmits credit card information in binary.

Explanation

Question 20 of 28

1

Which of the following statements best describes the properties of public key encryption?

Select one of the following:

  • Public key encryption is an encryption method which relies on separate keys for encrypting and decrypting information.

  • Public key encryption is a highly secure encryption scheme that in which a single shared key is used by both the sender and receiver of the message.

  • Public key encryption makes use of certain types of problems which are easier for humans to solve than computers.

  • Public key encryption makes use of mathematical problems which no algorithm can be used to solve.

Explanation

Question 21 of 28

1

Choose the answer that is NOT a feature of Public Key Cryptography:

Select one of the following:

  • A key for decrypting is never made public

  • Using public key guarantees that only the intended recipient can decrypt the message.

  • A public key database ensures 3rd party accountability of security.

  • Allows secure communication without establishing a *shared* encryption key ahead of time.

Explanation

Question 22 of 28

1

A programmer is writing a system that is intended to be able to store large amounts of personal data. As the programmer develops the data system, which of the following is LEAST likely to impact the programmer's choices in designing the structure of the system?

Select one of the following:

  • Maintaining privacy of the information stored in the data set.

  • Scalability of the system.

  • Structuring the metadata of the information for analysis

  • The frequency of a particular item occurring in a data set.

Explanation

Question 23 of 28

1

What is a Distributes Denial of Service (DDoS) attack?

Select one of the following:

  • A coordinated effort by a group to simultaneously attempt to gain entry to foreign government's servers or systems.

  • An effort by network engineers to focus all systems on catching a user or computer that has illegally gained access.

  • An attempt to compromise a single target by flooding it with requests from multiple systems.

  • An attempt to harass or extort all customers of one or more Internet Service Providers(ISP's).

Explanation

Question 24 of 28

1

Which of the following scenarios is most characteristic of a phishing attack?

Select one of the following:

  • You accidentally run a pierce of code that automatically spreads from one computer to another, exploiting a common vulnerability.

  • You get an email from the IT support desk that asks you to send a reply email with your username and password to verify your account.

  • You get an unwanted email trying to sell you a low quality product or service that seems "fishy."

  • You accidentally install a piece of software that monitors your activity to steal personal information like your passwords, date of birth, social security number, etc.

Explanation

Question 25 of 28

1

Which of the following are true statements about digital certificates in web browsers?
I. Digital certificates are used to verify the ownership of encrypted keys used in secured communication
II. Digital certificates are used to verify that the connection to a website is fault tolerant.

Select one of the following:

  • I only.

  • II only.

  • I and II.

  • Neither I nor II.

Explanation

Question 26 of 28

1

Which of the following statements about strings in JavaScript is FALSE?

Select one of the following:

  • Strings consist of a sequence of concatenated characters.

  • Strings are indicated by quotation marks.

  • Strings with numerical digits in them are invalid.

  • A string can be empty, meaning it contains nothing.

  • Strings sometimes include spaces.

Explanation

Question 27 of 28

1

A boolean expression is an expression that evaluates to which of the following?

Select one of the following:

  • Yes/Maybe/No

  • True/False

  • Any Integer

  • Integers between 1 and 10

  • Any single character

Explanation

Question 28 of 28

1

Which of the following is NOT true about functions in programming?

Select one of the following:

  • Functions are reusable programming abstractions.

  • Functions help reduce the complexity of writing and maintaining programs.

  • Functions cannot make calls to other functions within the same program.

  • Functions help break a problem into logical chunks.

  • Once defined, a function can be called as many times as wanted from different parts of a program.

Explanation