Choosing how to earn college credit? CLEP vs AP guide
| preferred AP College board partner for AP classes
AP Computer Science Principles/Big Idea 2: Data
Start Practice TestPractice Test
About Exam
hard

Calculating Total Playback Time

Mark
< Prev
Next >

For a media project, a student analyzes a dataset of video clips. The dataset is represented as a list of integers, where each integer is the duration of a clip in seconds.

The student’s goal is to determine the total number of full minutes of content available if all clips are played back-to-back. Leftover seconds from the combined total should be ignored.

Program A divides each individual clip’s duration by 60, rounds down to the nearest whole number, and sums these values.

Program B sums all the individual clip durations, divides the total sum by 60, and rounds down to the nearest whole number.

Which program correctly achieves the student’s stated data-analysis goal, and why?

A

Program B, because combining the durations before dividing and rounding accounts for partial minutes from different clips that add up to full minutes.

B

Both programs achieve the goal, because addition and division will produce the same final integer regardless of the order of operations.

C

Neither program achieves the goal, because rounding down removes data, making it impossible to calculate the total playback time.

D

Program A, because rounding down each clip individually ensures that partial minutes are properly excluded from the final total.

Hint
Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer
Report Question

Question Leaderboard

Not enough data yet to show leaderboard.

No comments yet. Be the first to comment!

AI Tutor

How can I help?

APFIVE © 2020.
Email: apfive@apfive.org|Instagram: @_apfive_|Privacy Policy|