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

Filtering Media Project Submissions

Mark
< Prev
Next >

A student is writing a program to filter hypothetical video submissions for a media project. The program processes a list of records, where each record contains the video’s duration in seconds and its resolution in pixels (height). The student wants to keep only the videos that are at least 60 seconds long AND have a resolution of exactly 1080 pixels.

The program uses the following logic to filter a single record:

IF (duration >= 60 AND resolution = 1080) { KEEP record } ELSE { DISCARD record }

Video ID Duration (seconds) Resolution (pixels)
1 59 1080
2 60 1080
3 120 720
4 60 720

Based on the provided table of hypothetical video submissions, which Video IDs will be kept by the filtering program?

A

Video 2, Video 3, and Video 4

B

Video 2 only

C

Video 1 and Video 2

D

Video 2 and Video 4

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|