WorksheetsAP CSP – Big Idea 2 - Data
Total questions: 13
Worksheet time: 7mins
A computer program represents a pixel’s color using three 8-bit numbers: red, green, and blue values. For example, the color (0, 0, 255) represents pure blue. What is the binary representation of the RGB triplet (120, 15, 200)?
(01111000, 00001111, 11001000)
(11110000, 11111111, 11001111)
(10000000, 00001111, 11001001)
(01111000, 11110000, 11001000)
The decimal number 225 is stored as an 8-bit binary number. Which of the following is the correct binary representation?
11100001
11011101
11100000
11110001
A program stores the result of the calculation 0.1 + 0.2 as 0.30000000000000004. Which best explains this?
Overflow error occurred.
The precision of the result is limited due to the limited amount of bits.
The computer used integer addition instead of floating-point addition.
The addition was performed in reverse order.
An application needs to represent 30 unique symbols using binary sequences. What is the smallest number of bits needed per symbol?
3
4
5
6
In which situation is lossy compression more appropriate than lossless compression?
Storing a medical X-ray image to be examined by doctors
Compressing photos to fit more photos onto a smartphone's memory
Archiving important government legal documents for future access
Saving a high quality raw image file for professional editing
A computer compresses a spreadsheet file and later restores it to the exact original version without losing any numbers. Which type of compression is demonstrated?
Lossy compression
Lossless compression
Overflow error
Approximation
A student wants to send a folder of documents from her school iPad to home computer. Which of the following situations best demonstrates the use of lossless compress of the original files?
Her iPad compresses the documents before sending it to her home computer. Her home computer restores the compressed files to their original quality before she uses them.
Her iPad compresses the documents by removing details that are not needed for her school project. The compressed documents are then sent to her home computer which she will use to interact with the documents.
Her iPad sends the original documents to her home computer. Her home computer removes metadata before she uses the files for her project.
Her iPad sends the original documents to her home computer and she goes home to interact with the sent files as is.
Byte pair encoding replaces repeated pairs of characters with unused symbols. For example, "THIS_IS_THE_BEST_WISH" can be encoded as "%#_#_%E_BEST_W#H" with % mapping to "TH" and # mapping to "IS".
Which string CANNOT be shortened using byte pair encoding?
“LOOPY_BALLOONS”
“GUITARS_ROCK”
“TATTOO_ATTACK”
“MESSY_SUCCESS”
A computer uses 8 bits to represent integers (maximum value = 255). What happens if the program computes 200 + 100?
The program produces 300 without error.
An overflow error occurs.
A round-off error occurs.
The result is automatically stored as a floating-point number.
A smartphone photo includes:
Pixel data (colors for each pixel)
Metadata (date, time, GPS location)
For which purpose would metadata be more useful than pixel data?
Counting how many people are in the image
Identifying whether the picture is of a dog or a cat
Determining where the photo was taken
Finding the dominant color in the image
A fitness app collects the following information from runners: the date, time, distance run, and GPS route.
Which of the following questions CANNOT be answered using only this data?
How many miles a runner covers in a week
Which neighborhoods the runner usually trains in
Whether the runner’s pace varies between weekdays and weekends
Whether the runner typically runs with music playing
A video streaming service records both the number of videos watched per day and the average length of each viewing session. After releasing a “short clips” feature, the number of daily views increased, while the average session length decreased.
Which hypothesis best matches this data?
The feature caused users to stop using the service.
Users became less likely to log in at all.
The feature prevented new accounts from being created.
Users are watching more short clips instead of longer videos.
A programmer wants to create an algorithm that returns the last digits of all even numbers from a list, sorted from smallest to largest.
For example, from [23, 40, 17, 82], the output should be [0, 2].
The programmer has identified the following steps:
I. Keep only even numbers
II. Extract last digits
III. Sort in ascending order
Which order of steps will achieve the desired result?
I → II → III
II → I → III
III → I → II
II → III → I
