Question 6 of 30

You are working with city names entered by users. These names may contain inconsistent capitalization and unwanted spaces.
To standardize the data, you want to:
Remove any leading or trailing whitespace, and
Capitalize the first letter of each word (e.g., convert "new york" to "New York").
For example:
"New york " → "New York"
"lOS ANGELES" → "Los Angeles"
You are given a variable city that contains the raw input.
Which line of code correctly updates the value of cleaned_city to apply the required transformation? Select the best answer.
Answer

Suggested Answer

The suggested answer is D.

Question 7 of 30

Below are six possible summaries for your presentation:
Summary 1: "The data revealed a moderate positive correlation between age and recycling frequency. While 72% of students reported recycling paper regularly, only 39% reported recycling plastic."
Summary 2: "Analysis showed notable differences in recycling habits by material type, with paper being most recycled and plastic least recycled."
Summary 3: "Older kids recycled more than younger ones. Paper was the most recycled item—plastic got forgotten a lot."
Summary 4: "Student responses showed positive environmental habits overall, though participation varied by waste type."
Summary 5: "A lot of students said they recycle. Some didn't answer every question, so we couldn't figure out everything."
Summary 6: "We asked more than 300 students about recycling. Most said they recycle paper, but way fewer recycle plastic."
Which communication style is the best fit for Group A (data scientists) and Group B (12-year-olds), respectively? Select the best answer.
Answer

Suggested Answer

The suggested answer is A.

Question 8 of 30

You have a list of test scores, where each entry includes a student name and a score. Some students appear more than once. You want to compute the average score for each student and store the results in a dictionary. Here's the partial code block:
Exam pced-30-02: Image 1
Which code correctly replaces the # MISSING CODE comment to calculate the average score for each student? Select the best answer.
Answer

Suggested Answer

The suggested answer is A.

Question 9 of 30

You are developing a temperature control module for a laboratory incubator. Your objectives are to: generate timestamps every 10 minutes over a 3-hour span (i.e., 0 to 180 minutes), and simulate five evenly spaced target temperatures between 35.0°C and 37.0°C for system calibration.
Which code snippet correctly produces both sequences using NumPy? Select the best answer.
Answer

Suggested Answer

The suggested answer is D.

Question 10 of 30

A financial technology company is reviewing its data practices to ensure legal and ethical compliance.
Which of the following actions would support responsible data handling and align with regulations like GDPR, HIPAA, and CCPA? (Choose two.)
Answer

Suggested Answer

The suggested answer is B, D.