AP Computer Science Unit 4 Review (Edhesive)

¡Supera tus tareas y exámenes ahora con Quizwiz!

A digital file contains the following binary sequence of 24 bits: 010000110110000101110100 Which of the following types of data could the above sequence represent?

All of these

A newspaper editor has noticed that one of his writers wrote an article where he misspelled the word "accommodation", and wrote it as "accomodation" many times. Assuming that the editor doesn't know the number of times the word is used, or the number of words in an article, which of the following sets of instructions would provide an effective way of automating the process of fixing the mistake?

1) Repeat until end of article is reached: 2) Grab the next word 3) If the word is "accomodation" then replace it with "accommodation" 4) End Repeat

An audio engineer recorded a sound and digitized the recording. He noticed that the sound quality deteriorated significantly after the recording was digitized. Which of the following changes should he make in the digitizing process if he wants to ensure that the quality of recordings are better preserved when converting to a digital format in the future?

Increase the sampling rate

In the program below, x is an integer between 5 and 10 inclusive. What is the maximum possible value of answer after running the program?

20

Sort the following numbers, that are written in different bases, in numerical order from smallest to largest: 2548 AE16 101011012

2548 101011012 AE16

The program segment below is intended to move a robot in a grid to a gray square. The program segment uses the boolean GoalReached, which evaluates to true if the robot is in the gray square and evaluates to false otherwise. The robot in each grid is represented by a triangle and is initially facing left. The robot can move into a white or gray square, but cannot move into a black region.

https:// (If link broken, try this one below) https://imgur.com/6faE9a4

What figure will be drawn by the Processing script below? size(640,480); int x = 5; x = x + 10; if(x < 10) { ellipse(width/2, height/2, 320, 220); } else { quad(40, 30, 40, 10, 10, 10, 10, 30); }

A rectangle (which is not also a square)

What is the binary value corresponding to the hexadecimal value of 1AB4?

0001101010110100

Which of the following could be referred to by a 6-digit hexadecimal value? I. The color of a pixel which is formed by three 8-bit RGB color componentsII. A string made up of three unicode charactersIII. A location in a 32 megabyte memory

I and II

Which of the following are true about programming documentation?Select two answers:

It is useful to other programmers that view your code, so that they can understand what different parts of the code are intended to do. AND It allows the programmer an opportunity to attribute help, work and code from others.

When web developers specify color values for text or backgrounds, they normally use an RGB or Hexadecimal value. RGB values are comprised of three decimal values like (45, 0, 255) where the values correspond to the amounts of red, green and blue that comprise the color. The first two digits in the hexadecimal code correspond to the amount of red in a color, the next two digits, the amount of green and finally, the last two digits represent the amount of blue. What would be the corresponding hexadecimal value for the RGB value (45, 0, 255)?

#2D00FF

Images used in web page development are often raster images. What is the primary disadvantage of using raster images?

Enlarging a raster image degrades the image

Dylan and Frank have designed a compression algorithm used for directions to unknown locations. In their algorithm the direction to travel at each intersection encountered is replaced with a single letter: "E" for East, "W" for West, "N" for North and "S" for South. In addition, the string "EEE" is replaced with "A" and "SSS" is replaced with "D". Which of the following best describes the directions which are expressed as "NASSA" when compressed using Dylan and Frank's algorithm?

Go North at the first intersection, then go East at the next three intersections, then go South at the next two intersections, then go East at the next three intersections.

Which of the following best describes the results of running the program shown above?

Nothing will be displayed. The program will run indefinitely.

Which of the following is not a concern when you are thinking about whether or not to compress your files?

Security of the files

The number - 54 - is a valid number in which of the following bases?Select two answers.

Senary (base 6) AND Nonary (base 9)

A photographer has shot a photo session using RAW format. The client wishes to preview the photo shoot and requests that a series of photos be sent via email. The files are too large for most email servers and must be compressed in order to be emailed. Which of the following is correct about a compression of the files if the client wants to see the photos in the best possible quality?

The files should be compressed using a lossless compression

Which of the following statements about a work published under a Creative Commons license is true?

The work can be freely shared although there may be conditions regarding what it can be used for.

The sentence "AP CSP is the best class in the entire world" can be rewritten using various encoding schemes. Which of the following schemes would express this content in the most compact way?

Write each ASCII character as an 8-bit binary number, then rewrite the resulting binary string using Base64 encoding.


Conjuntos de estudio relacionados

Muscles of the Head, Neck, & Face: Trail Guide Workbook

View Set

Chapter 3 Board of Directors: Duties and Liability

View Set

Chapter 17 (Lecture/Quiz/eBook Quiz)

View Set

Geography Module 3: Chapters 8 - 11

View Set

Chapter 13 Psychosocial and cognitive factors in adulthood

View Set