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

Standardizing Meeting Day Preferences

Mark
< Prev
Next >

The scheduling tool allows club officers to submit their weekly preferred meeting day through an unvalidated free-text form field. As a result, identical intended days are recorded with differing cases, abbreviations, and trailing spaces.

Before calculating preference totals, a cleaning script must normalize entries into standard labels: “Monday”, “Tuesday”, “Wednesday”, or “Thursday” without altering user intent or dropping valid responses.

Student ID Raw Input Intended Category
S-21 mon Monday
S-22 Tues Tuesday
S-23 WEDNESDAY Wednesday
S-24 thurs Thursday

Which sequence of operations correctly normalizes the raw inputs into their standard category names?

A

Filter the dataset by removing any entry whose length is not equal to the length of the standard day name, then capitalize the first character.

B

Count the total occurrences of each unique raw string, select the most frequently submitted string, and overwrite all other submissions with that string.

C

Strip leading and trailing whitespace, convert all letters to lowercase, match the first three characters to a lookup table of standard day names, and replace the input with the corresponding full day name.

D

Convert all letters to uppercase, remove all vowels from each string, and append the suffix “DAY” to every entry.

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|