Miracle Bugs
Quiz von , erstellt am more than 1 year ago

Study Guide for AP ECS Final.

77
0
0
Miracle Bugs
Erstellt von Miracle Bugs vor etwa 5 Jahre
Schließen

AP Exploring Computer Science Final Study Guide

Frage 1 von 28

1

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

Wähle eine der folgenden:

  • 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.

Erklärung

Frage 2 von 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?

Wähle eine der folgenden:

  • Lossless transformation

  • Lossy transformation

  • Multiband Transformation

  • Chrome Sampling Transformation

Erklärung

Frage 3 von 28

1

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

Wähle eine der folgenden:

  • 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.

Erklärung

Frage 4 von 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?

Wähle eine der folgenden:

  • 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.

Erklärung

Frage 5 von 28

1

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

Wähle eine der folgenden:

  • gigabyte, megabyte, terabyte

  • megabyte, terabyte, kilobyte

  • gigabyte, terabyte, megabyte

  • kilobyte, gigabyte, terabyte

Erklärung

Frage 6 von 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?

Wähle eine der folgenden:

  • F00

  • 00F

  • FF00

  • FF0000

Erklärung

Frage 7 von 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?

Wähle eine der folgenden:

  • Lossy compression

  • Lossless compression

  • Fast Fourier Transform compression

  • Tailored Compression

Erklärung

Frage 8 von 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?

Wähle eine der folgenden:

  • Lossy compression

  • Lossless compression

  • Fast Fourier Transform compression

  • Tailored compression

Erklärung

Frage 9 von 28

1

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

Wähle eine der folgenden:

  • 1,000 times bigger

  • 100,000 times bigger

  • 1,000,000 times bigger

  • 1,000,000,000 times bigger

Erklärung

Frage 10 von 28

1

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

Wähle eine der folgenden:

  • 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.

Erklärung

Frage 11 von 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);

Wähle eine der folgenden:

  • 6

  • 5

  • 4

  • 0

  • Infinite loop

Erklärung

Frage 12 von 28

1

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

Wähle eine der folgenden:

  • 5

  • 4

  • 3

  • 2

  • Infinite Loop

Erklärung

Frage 13 von 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);

Wähle eine der folgenden:

  • 6

  • 5

  • 4

  • 0

  • Infinite Loop

Erklärung

Frage 14 von 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)

Wähle eine der folgenden:

  • 0

  • 1

  • 2

  • 3

  • 4

Erklärung

Frage 15 von 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)

Wähle eine der folgenden:

  • 4

  • 7

  • 9

  • 10

  • ab

Erklärung

Frage 16 von 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)

Wähle eine der folgenden:

  • 2

  • 3

  • 4

  • 5

  • 6

Erklärung

Frage 17 von 28

1

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

Wähle eine der folgenden:

  • 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.

Erklärung

Frage 18 von 28

1

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

Wähle eine der folgenden:

  • Symmetric

  • Asymmetric

  • Public Key

  • SSL

Erklärung

Frage 19 von 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?

Wähle eine der folgenden:

  • 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.

Erklärung

Frage 20 von 28

1

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

Wähle eine der folgenden:

  • 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.

Erklärung

Frage 21 von 28

1

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

Wähle eine der folgenden:

  • 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.

Erklärung

Frage 22 von 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?

Wähle eine der folgenden:

  • 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.

Erklärung

Frage 23 von 28

1

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

Wähle eine der folgenden:

  • 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).

Erklärung

Frage 24 von 28

1

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

Wähle eine der folgenden:

  • 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.

Erklärung

Frage 25 von 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.

Wähle eine der folgenden:

  • I only.

  • II only.

  • I and II.

  • Neither I nor II.

Erklärung

Frage 26 von 28

1

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

Wähle eine der folgenden:

  • 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.

Erklärung

Frage 27 von 28

1

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

Wähle eine der folgenden:

  • Yes/Maybe/No

  • True/False

  • Any Integer

  • Integers between 1 and 10

  • Any single character

Erklärung

Frage 28 von 28

1

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

Wähle eine der folgenden:

  • 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.

Erklärung